[Insight-users] Masks & registration
Luis Ibanez
luis.ibanez at kitware.com
Thu May 11 10:22:34 EDT 2006
Hi Paul,
Thanks for clarifying your description.
It helps a lot to use a consitent terminology.
Regards,
Luis
=================
Laurent PAUL wrote:
> Hi Luis,
>
> My Fixed Image and his corresponding mask are in the same coordinate system.
> Idem for Moving Image, since I created these masks with FixedDictionary
> and MovingDictionary respectively for Fixed and Moving Images.
>
> When I talk about absolute coordinates, I mean spatial coordinates,
> opposed to Image index, and so when I say "mask hasn't the same absolute
> coordinates as Initially transformed MovingImage", you should read, mask
> hasn't the same spatial coordinate than the movingImage (in the reference
> system of the fixed Image).
>
> Thanks,
>
> Laurent.
>
>
>>Hi Laurent,
>>
>>The ITK registration framework supports the use of a Fixed image Mask
>>and a Moving image Mask. Each one of them is expected to be in the
>>reference system of the respective image. That is:
>>
>>The Fixed image mask is in the reference system of the Fixed Image
>>The Moving image mask is in the reference system of the Moving Image
>>
>>You don't need to map the masks. Simply use them in the space where
>>they have been generated. Presumably you created these mask by using
>>some sort of segmentation algorithm.
>>
>>There is no notion of "absolute" coordinates in the ITK registration
>>framework. You should explicitly talk about the coordinate system of
>>the "Fixed" image, or the coordinate system of the "Moving" image.
>>
>>
>> Regards,
>>
>>
>> Luis
>>
>>
>>======================
>>Laurent PAUL wrote:
>>
>>>Hi Luis,
>>>
>>>If I want to use masks, I can first apply a AND filter on Image and Mask
>>>and use the result as fixed and moving Image.
>>>If I really need masks, I'll try.
>>>
>>>Another question on masks: if I use mask, Do I have to initially
>>>transform
>>>the mask with the same InitialTransform applied on the MovingImage? I
>>>think my problem could come from there, mask hasn't the same absolute
>>>coordinates as Initially transformed MovingImage.
>>>
>>>Thanks for your help.
>>>
>>>Laurent.
>>>
>>>
>>>
>>>
>>>>Hi Laurent,
>>>>
>>>>The Transform Initializers do not take into account the Masks.
>>>>
>>>>They compute the Moments/Geometry on the entire images.
>>>>
>>>>Note that a better way to initialize your registration is to
>>>>use the LandmarkBasedTransformInitializer.
>>>>
>>>>http://www.itk.org/Insight/Doxygen/html/classitk_1_1LandmarkBasedTransformInitializer.html
>>>>
>>>>It requires the user to provide at couple of homologous points
>>>>in both images, but it will increase a lot the quality of your
>>>>initialization.
>>>>
>>>>
>>>>
>>>> Regards,
>>>>
>>>>
>>>> Luis
>>>>
>>>>
>>>>
>>>>======================
>>>>Laurent PAUL wrote:
>>>>
>>>>
>>>>>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.
>>>>>_______________________________________________
>>>>>Insight-users mailing list
>>>>>Insight-users at itk.org
>>>>>http://www.itk.org/mailman/listinfo/insight-users
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>>
>>>
>>>_______________________________________________
>>>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