SimpleITK / SimpleITK

SimpleITK: a layer built on top of the Insight Toolkit (ITK), intended to simplify and facilitate ITK's use in rapid prototyping, education and interpreted languages.
http://www.simpleitk.org
Apache License 2.0
892 stars 204 forks source link

How to get corresponding point coordinates from registration results? #802

Closed cs123951 closed 5 years ago

cs123951 commented 5 years ago

Hi, I have applied affine registration to get the warped image.

` import SimpleITK as sitk elastixImageFilter = sitk.ElastixImageFilter() elastixImageFilter.LogToConsoleOff()

elastixImageFilter.SetFixedImage(sitk.ReadImage(fixed_filename))
elastixImageFilter.SetMovingImage(sitk.ReadImage(moving_filename))
para = sitk.GetDefaultParameterMap("affine")
para["WriteResultImage"] = ["false"]
elastixImageFilter.SetParameterMap(para)
elastixImageFilter.Execute()

result_img = elastixImageFilter.GetResultImage()`

But I do not know how to get get corresponding point coordinates. That is, for (x0,y0,z0) in fixed image, (x1,y1,z1) in moving image, I want to find the corresponding point in the warped image. I am not sure if SimpleITK has any kind of this function.

Thank you.

zivy commented 5 years ago

You appear to be using SimpleElastix and not SimpleITK. Please ask the question on their GitHub issues,