Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ITK Elastix deformation field Issue #209

Open
BH4DKC opened this issue Apr 4, 2023 · 0 comments
Open

ITK Elastix deformation field Issue #209

BH4DKC opened this issue Apr 4, 2023 · 0 comments

Comments

@BH4DKC
Copy link

BH4DKC commented Apr 4, 2023

Hello,

I am trying to use itk elastix to estimate the deformation happened between two images (Suppose to be ultrasound images, but I am using some known deformation data to verify the results first). I am obtaining the deformation field by using:

deformation_field = itk.transformix_deformation_field(moving_image, result_transform_parameters)

Then I store the data to csv files using:

def_array_x = np.array(deformation_field[:,:,1])
def_array_x = pd.DataFrame(def_array_x)
def_array_x.to_csv("x_deformation_field.csv")
def_array_y = np.array(deformation_field[:,:,0])
def_array_y = pd.DataFrame(def_array_y)
def_array_y.to_csv("y_deformation_field.csv")

After that, I compute the pixel size in x and y direction of the input images and convert the pixel deformation field to actual displacement. However, my result does not come close to the actual at all, but I have no idea what I have done wrong, or I am not supposed to use the deformation_field that way.

Please help me with this issue and if needed, I can upload the code I have, right now, the deformation field code is in python, but the converting to displacement code is in MATLAB.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant