[Insight-users] Basic question concerning metric

Luis Ibanez luis.ibanez at kitware.com
Wed Jul 1 16:32:46 EDT 2009


Hi Motes,


          Yes, you got it all right !


This example is evaluating the Metric between
one image and different translations of itself.

You should find that the lowest metric value
correspond to the displacement (0,0).

The purpose of the exercise is to visualize
the cost function (the Image Metric) for
values in a grid of 50 x 50 positions in the
parametric space.

That's the kind of space that the Optimizers
will have to navigate.


    Regards,


         Luis


--------------------------------------------------------
On Wed, Jul 1, 2009 at 4:27 PM, motes motes <mort.motes at gmail.com> wrote:

> I am trying the metric example in the itkSoftwareGuide page 416. This is
> what I understand so far:
>
> The following components are connected to the SSD metric:
>
> - Transform (translation)
> - Interpolator (nearest neighbor)
> - The fixed and moving images, in the example they are identical.
>
> Next the moving image is translated and for each translation the metric is
> computed:
>
>     const int rangex = 50;
>     const int rangey = 50;
>     for(int dx = -rangex; dx <= rangex; dx++){
>       for(int dy = -rangey; dy <= rangey; dy++){
>         displacement[0] = dx;
>         displacement[1] = dy;
>         const double value = metric->GetValue(displacement);
>         out << dx << "   "  << dy << "   " << value << std::endl;
>       }
>     }
>
> As I understand the call:
>
>   metric->GetValue(displacement);
>
> evaluates the metric for transform parameters contained in the displacement
> vector using the underlying connected transform.
>
> Eg when dx=dy=50 we are actually testing how good the transform that
> translates all pixels 50 units along the x and y axis aligns with  the fixed
> image - which is not very good. The optimal solution is a transform that
> translates all pixels 0 units along the x and y axis which makes sense since
> the two images are identical.
>
> To put it another way: The fixed image is compared to 50*50 translated
> versions of it self.
>
> Am I on the right track?
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090701/88485a0f/attachment-0001.htm>


More information about the Insight-users mailing list