[Insight-users] Re: 3D rigid registration

Grace Chen Grace.Chen at swri.ca
Mon Jun 5 13:58:48 EDT 2006


Hi Robert,  Thanx for your help again!
Well, I noticed that the regitration result is a bit off (around 2 pixels to
the left and to the top when overlaying the registered image on top of the
fixed image in one viewer) for small movement!  And if I center both images,
this problem is gone...but the logic here is totally wrong..... Then I
conducted an experiment by simulating big movement in the moving image.  If
I center both images, the two images are not aligned at all....  If I just
center one and then shift another, it will works well.....  If I don't
center the images at all, the result isn't good either.

So it seems to me that centering one image gives more robust result for both
big and small movement....but for small movement, it's not doing so great
either.....Is it because the way I set the max (min) step length?  But I've
tried so manny combination of numbers in the ITK examples...  it doesn't
matter what numbers I use, it kind of gives back similar results!

Toronto is getting too polluted!! :>

Grace



----- Original Message ----- 
From: "Atwood, Robert C" <r.atwood at imperial.ac.uk>
To: "Grace Chen" <Grace.Chen at swri.ca>
Sent: Monday, June 05, 2006 12:42 PM
Subject: RE: 3D rigid registration


> To me, that sounds like it is not necessary; I belive that the transform
> object contains the coordinates of the center of each image and the
> offset between them. This is only a starting point, during optimization
> the offset and the rotation can both be changed. I understand that the
> CentereedTransformInitializer determines the offset necessary for the
> centre of mass of each image to be overlappign, then sets the centre of
> rotation to this. Essentially, creating a new (internally used)
> coordinate system originating at the center of the fixed image. So ,I
> think you should not have to do that directly to the image before. It
> could be a bug! What is the weird behaviour ?
>
>
>
>
>
>  There was a bug in (at least) one of the examples that I found, I think
> it has been corrected by now (since that was last year), in which the
> center of rotation for the final transform was not applied to the final
> example image.  That confused me! If you have an old version of the
> examples, maybe that correction is missing.
>
> How's Toronto?
>
>
> -----Original Message-----
> From: Grace Chen [mailto:Grace.Chen at swri.ca]
> Sent: 05 June 2006 17:22
> To: Atwood, Robert C
> Cc: insight-users at itk.org
> Subject: 3D rigid registration
>
> Hi Robert,  Thanx for your input!
>
> I follow the ITK example religiously too.....but I still get weird
> result
> for some data sets.....since in the ITK software guide, the rigid 3D
> registration section is under the section "Centered Transforms", I
> suppose
> that we need to center the images (i.e. shifting the image so the
> coordinate
> (0,0,0) lies in the middle of the image) to get more accurate
> result...And
> that's what I did.  But it just occured to me that it might be a bug....
> because it doesn't make sense to center both images....If I am
> correct....we
> should center only one image (either one is ok), and apply the same
> shift to
> the other image.
>
> However, I need to confirm with ITK experts to make sure I am on the
> right
> track!!
>
> Grace
>
>
>
> ----- Original Message ----- 
> From: "Atwood, Robert C" <r.atwood at imperial.ac.uk>
> To: "Grace Chen" <Grace.Chen at swri.ca>; <insight-users at itk.org>
> Sent: Monday, June 05, 2006 11:50 AM
> Subject: RE: [Insight-users] 3D rigid registration
>
>
> > Dear Grace:
> >
> > I have used the Centred Transform Initializer in some code that used
> > VersoRigid3DTransform and it has given me the results I expected. Here
> > are a few lines out of the code. If I am using it incorrectly I hope
> > some one else will let me know before I get bad results.
> >
> >
> > Don't forget to use the special optimizer for this transform.
> >
> > Hope it helps,
> >
> >
> > Robert
> >
> >
> >
> >
> >
> > .....
> >
> > #include "itkCenteredTransformInitializer.h"
> > #include "itkVersorRigid3DTransform.h"
> > #include "itkVersorRigid3DTransformOptimizer.h"
> >
> > ......
> >
> >   //Transform, optimizer and metric used for the registration
> >   typedef itk::VersorRigid3DTransform< double > TransformType;
> >   typedef itk::VersorRigid3DTransformOptimizer  OptimizerType;
> >
> >  /* initializer, this automatically finds the centers of each image */
> >   typedef itk::CenteredTransformInitializer< TransformType, ImageType,
> > ImageType > TransformInitializerType;
> >
> >
> > .....
> >
> >  TransformInitializerType::Pointer initializer =
> > TransformInitializerType::New();
> >
> > .....
> >
> > // fshrinker and mshrinker are already Updated at this point
> >
> >
> >           /* set up the defaults in any case */
> >            initializer->SetTransform(   transform );
> >            initializer->SetFixedImage(  fshrinker->GetOutput() );
> >            initializer->SetMovingImage( mshrinker->GetOutput() );
> >            initializer->MomentsOn();
> >           /* this actually does the initialization using the above
> > parameters */
> >            initializer->InitializeTransform();
> > -----Original Message-----
> > From: insight-users-bounces+r.atwood=imperial.ac.uk at itk.org
> > [mailto:insight-users-bounces+r.atwood=imperial.ac.uk at itk.org] On
> Behalf
> > Of Grace Chen
> > Sent: 05 June 2006 15:51
> > To: insight-users at itk.org
> > Subject: [Insight-users] 3D rigid registration
> >
> > Hi there,
> >
> > To use VersorRigid3DTransform for 3D rigid registration, should we
> > center
> > both of the input imgaes?  It seems wrong to center both images.....If
> > we
> > need to center just one image, which one, the fixed image or the
> moving
> > image??
> >
> > Please help!  This part of using ITK can't seem to be found
> anywhere....
> > Thanx!
> >
> > Grace
> >
> > _______________________________________________
> > 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