[Insight-users] Re: Landmark Based transform initializer
Karthik Krishnan
Karthik.Krishnan at kitware.com
Tue May 24 11:24:19 EDT 2005
Kevin,
To the best of my knowledge the class is doing the right thing and so is
your code, (you've swapped the moving and fixed landmark roles).
Lines 86-87 of your code should read as, which is what you had earlier.
initializer->SetFixedLandmarks( fixedLandmarks );
initializer->SetMovingLandmarks( movingLandmarks );
With the following command line args: I get the second cow to overlap
pretty well with the
http://crab-lab.zool.ohiou.edu/kevin/Slice_Landmark_Registration/cow_0.jpeg
> 11:06AM $ ./itk_landmark_transform cow_0.mhd cow_1.mhd
> transformed_cow.mhd 97 245 331 61 88 240 334
> 74
Fixed Landmark: [97, 245] Moving landmark [88, 240] Transformed fixed
Landmark : [87.6235, 240.254]
Fixed Landmark: [331, 61] Moving landmark [334, 74] Transformed fixed
Landmark : [334.377, 73.7459]
Possible sources of confusion are:
1. The fixed landmarks after transformation through the transform
produced should have the same values as the moving landmarks. Not the
other way around.
2. Use InsightApplications/ImageViewer to view your .mhd output. The
y-axis you are looking at might be flipped with respect to the image
co-ordinates. It helps to use a viewer built using ITK, so you never
have any co-ordinate confusion.
karthik
Kevin H. Hobbs wrote:
>On Mon, 2005-05-23 at 06:49 -0400, Karthik Krishnan wrote:
>
>
>>Kevin:
>>
>>The class supports the Rigid2DTransform as well as the
>>VersorRigid3DTransform now. Please update your cvs repository. For usage,
>>please see the test
>>Testing/Code/Common/itkLandmarkBasedTransformInitializerTest.cxx
>>
>>Thanks
>>Regards
>>Karthik
>>
>>
>
>
>I've put up a bit of code using the new
>itkLandmarkBasedTransformInitializer.
>
>http://crab-lab.zool.ohiou.edu/kevin/Slice_Landmark_Registration/itk_landmark_transform.cxx
>
>It's mostly cobbled together from
>Insight/Examples/Filtering/ResampleImageFilter6.cxx and
>Testing/Code/Common/itkLandmarkBasedTransformInitializerTest.cxx
>
>The transform seems to have rotated the moving image in the wrong
>direction.
>Fixed image:
> http://crab-lab.zool.ohiou.edu/kevin/Slice_Landmark_Registration/cow_0.jpeg
>Moving image:
> http://crab-lab.zool.ohiou.edu/kevin/Slice_Landmark_Registration/cow_1.jpeg
>Difference of fixed and moving image:
> http://crab-lab.zool.ohiou.edu/kevin/Slice_Landmark_Registration/cow_diff_0_1.jpeg
>Difference of fixed and translated moving image:
> http://crab-lab.zool.ohiou.edu/kevin/Slice_Landmark_Registration/cow_diff_0_trans_1.jpeg
>
>Did I mess something up with the transform, centers of rotation and the
>like?
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20050524/be54d5b9/attachment.html
More information about the Insight-users
mailing list