[Insight-users] Image to Spatial Object Metric

Antonio Foncubierta antonio.foncubierta at gmail.com
Fri Jan 16 16:20:40 EST 2009


Thank you very much for your quick answer, Luis. As requested, I will give
as many details as possible:


   1. I create an itkImage using a SpatialObjectToImageFilter. This image
   contains an ellipsoid with radii 10 15 20, for instance.
   2. I want to make a registration of a certain Spatial Object with that
   Image. The starting Spatial Object is another ellipsoid with radii, for
   example, 5, 5, 5. I set the Spatial Object offset in a way so that the
   ellipsoid centre fits the Image Gravity Center (I use a MomentCalculator to
   get that value).
   3. I start the registration method using an Affine Transform, because the
   starting ellipsoid needs a scale change.
   4. The result is that the optimizer doesn't have anything to optimize,
   because the SimpleModelToImageMetric GetValue method returns the number of
   Spatial Object points in the Image (every point in the image has value=1).
   Therefore, the metric is already maximized. The result is a small ellipsoid
   fully contained inside the image.
   5. In some other cases, I located the starting spatial object outside the
   gravity center of the image and then started the registration method. The
   result then was a randomly shaped ellipsoid (it depends on where I put the
   center and the original size of it) which has all of its points inside the
   image. The Optimizer returns the same parameters once it achieves a maximum
   in the metric, no matter how many iterations I allow the registration method
   to run.

Those results have made me think that I must change the metric so that it
has a maximum when all the points are inside the image and the spatial
object volume is as high as possible.

Any ideas?

I also would like to apologize if you understood that I was reporting a
problem in the registration methods or examples (which obviously work
perfectly). My intention was to find what I am doing wrong or what I could
probably use to solve _my_ problem.

Thank you in advance,

Antonio Foncubierta


2009/1/16 Luis Ibanez <luis.ibanez at kitware.com>

>
> Hi Antonio,
>
> the ImageToSpatialObjectRegistrationMethod<> that is illustrated in the
> examples
>
>    Insight/Examples/Registration
>
>               ModelToImageRegistration1.cxx
>               ModelToImageRegistration2.cxx
>
> should, in principle, work with any of the ITK Transforms.
>
> It is likely that the problem that you faced when using an Affine transform
> are more related to:
>
>
>        A) Poor choice of parameter scaling values (the array
>           that is passed to the Optimizer in order to compensate
>           for the difference in dynamic range between Translation
>           and Rotation/Scale components.
>
>        B) Poor choice of Optmizer parameters.
>
>
> Of course, the option of writing your own Metric is always worth
> considering, but that is independent of the need for solving (A)
> and (B) properly.
>
>
> In general, when you report that something "doesn't work", it is
> very helpful to describe *exactly* what the result was, and how
> do you arrive to the conclusion that "it doesn't work".
>
> Please give us more detail on what you observed....
>
>
>    Thanks
>
>
>       Luis
>
>
>
> ---------------------------
> Antonio Foncubierta wrote:
>
>> Hello,
>>
>> I am trying to develop a Model Based Registration Method, and I started
>> using the example mentioned by the Itk Software Guide and included in the
>> 3.6 version of Insight: ***ModelToImageRegistration1.cxx***. I have been
>> trying to adapt the example to work with my data: 3D Images. Achieving that
>> was not a big deal, but I started to struggle when I wanted the Transform to
>> be an itkAffineTransform, which includes a scale change. The example
>> explicitly says that the SimpleImageToSpatialObjectMetric is designed
>> considering no scale changes, and it says it right, because the metric
>> doesn't work as I required. (It does work as expected, though).
>>
>> So my main problem now is finding a way to define a metric that maximizes
>> both the ****number of Spatial Object Points inside the Image**** and the
>> ****Spatial Object Volume****. The first one is easy, as it is exactly what
>> the above mentioned example does, but I haven't found a way to compute the
>> Transformed SpatialObject Volume.
>>
>> And that's why I ask you if any of you have found a similar problem and
>> how did you solve it. Also, if any of you know a not-as-simple metric which
>> I could use.
>>
>> Thank you in advance,
>>
>> PS: The explanation migh be very blurry, so if you don't undersrtand
>> anything of it, please, just ask. I'd rather repeat things in a different
>> way, or attach images to not having help at all ;)
>>
>> Antonio Foncubierta
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Insight-users mailing list
>> Insight-users at itk.org
>> http://www.itk.org/mailman/listinfo/insight-users
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090116/82117636/attachment.htm>


More information about the Insight-users mailing list