[Insight-users] registration initialization problem - probably a stupid error

Karthik Krishnan Karthik.Krishnan at kitware.com
Thu Sep 8 04:43:27 EDT 2005


On Thu, 2005-09-08 at 16:25 +1000, Richard Beare wrote:
> Hi,
> I'm experimenting with initializing a registration procedure that I'm
> testing on the brain proton density images used in the examples. I'm
> trying to use moment information to initialize a centered rigid 2d
> transform, but I'm not using the initializer because 1) it isn't
> available in python and 2) when I'm using my real application I will
> want to do some segmentation and use those results to initialize the
> registration.
> 
> Basically I'm doing pretty much what the moments based initializer
> does anyway - I use the image moments calculator to get centre of
> gravity and principal axes. The 2nd and 3rd parameters become the COG
> of the moving image, the 4th and 5th become the difference between the
> COGs of fixed and moving images (translation estimate). I thought the
> first parameter (which I think is the rotation about the centre
> indicated by parameters 2 and 3) would be best initialized by the
> difference in angle of the principal axes of each image. This almost
> works, but is a a couple of pixels off, which in the case of the
> artificially shifted and rotated data, seems to be too much and
> probably indicates I've made an error somewhere.

If you were using, say a Rigid2DTransform, you would do the following

transform->SetCenter( fixed_image_centroid ); // NOT Centroid of the
moving image

transform->SetAngle( angle );
transform->SetTranslation( moving_image_centroid -
fixed_image_centroid);
resample->SetTransform( transform );
resample->SetInput( moving_image );

I suspect, you are setting the center of the transform as the
moving_image_centroid instead of the fixed. 

regards
karthik


> 
> My procedure is to threshold the images, dilate a bit and compute the
> moments of that image. The dilation doesn't touch the edge. If there
> is translation but no rotation the translation estimate works
> correctly.
> 
> I'm sure I've missed something simple - can anyone see what?
> 
> Thanks
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users



More information about the Insight-users mailing list