[Insight-users] Masks & registration

Laurent PAUL Laurent.Paul at orto.ucl.ac.be
Wed May 10 08:10:03 EDT 2006


 Hi users,

I've got a problem with masks & registration.
I use MeanSquaresImageToImageMetric and VersorRigid3DTransform for the
registration process.
Since I have regions of interest, I tried to pass at least 1 mask to the
metric. It seems to be ok as I test it with IsInside() method with two
points (one in and one out).
My first question is if I use SetDefaultOutsideValue(0) for the mask, any
value different from 0 will be considered as Inside, right?


Then, I read a message which deals with nearly the same problem:
http://public.kitware.com/pipermail/insight-users/2005-September/014948.html

This is an (interesting) extract:
> "Sure, as you pointed out, if you start off with a horrible initial
>misalignment, in the worst case, the regions don't overlap and the metric
>never gets computed.  Usually, in a registration application, if you've
>gone through the trouble of specifying relevant regions in both the
fixed >and moving image regions, you already have some idea of the
initial >transform and there is no excuse for not specifying an initial
transform >that guarantees significant overlap between the two masks.
>
> (This will of course only happen if you've specified *both* a fixed and
>moving image mask, and not if just specify one of them. )"
>

I am in this case, where I know regions of interest.
I understand the intialization problem but how initialize the
registration?
So far, I used the CenteredVersorTransformInitializer:
   initializer->SetTransform (transform);
   initializer->SetFixedImage (FixedImage);
   initializer->SetMovingImage (MovingImage);
   initializer->MomentsOn();

What I understood is that initialisation is made upon Mass center. Is mass
center calculation takes account of the mask, I mean only region contained
in the mask?
I tried too with initializer->GeometryOn();
but I've got an error at runtime. Is it safe to use "GeometryOn"?


More, I know initialisation is quite ok. There is just a translation error.
I tried (without using Initializer):
  TransformType::OutputVectorType InitialTranslation;
  InitialTranslation[0] = 80;
  InitialTranslation[1] = 0;
  InitialTranslation[2] = 0;
  transform->SetTranslation( InitialTranslation );
Registration's result is bad and stops. I saw that transform center is
[0,0,0].
So, I first use intializer (to compute transform center) and
OverrideTranslation with mine.
Is there a better way to initialise the registration?


If I specify a MovingMask, even with good initialization, registration
stops with this error message: All the points mapped to outside of the
moving volume.
So, my last question is: Is mask initialized with the initialtransform?

Sorry for the long message but I had to be clear.

Laurent.



More information about the Insight-users mailing list