[Insight-users] Translation issue in MultiResMIRegistration

Paul Laurent l.paul at uclouvain.be
Wed Dec 22 04:10:59 EST 2010


Dear users,

I have found the solution, but I think it is a kind of bug... or a 
change in the class that affects the behavior of the application. 
Perhaps in centered transforms?
Since my initial concern was a translation, not constant but images 
dependant, I have looked for the solution on the offset computed during 
preprocessing.
I was close.
  saw a post on this mailing list from ALbert and the reply from luis 
(http://public.kitware.com/pipermail/insight-users/2009-March/029536.html) 
that says the fixed parameters need to be set up. It is not the case in 
the app since during the preprocessing, images are centered, so 
FixedParameters are the center of images, namely (0,0,0).
I tried several combinations of translation/offset and finally found that:
In SimpleAppOutput.txx
- Center the fixed and moving images to avoid the Pre- and Post-transform
- Replace SetOutputOrigin by resampler->SetOutputOrigin( 
FixedCenterer->GetOutput()->GetOrigin() );
- Replace SetInput by resampler->SetInput( MovingCenterer->GetOutput() );
- Force the origin to be the one of the fixed image using 
changeInformationFilter (SetChangeOrigin, SetOutputOrigin)
In MIMApplicationBase.txx:
- Don't forget to comment the Pre- and post-transform to compose the 
Overall transform. We don't need because images provided to resample are 
already centered...

Maybe it is not so elegant, but it works, and it is urgent!!!
If someone finds a more elegant way, share it!

Thanks,
Laurent.





More information about the Insight-users mailing list