[Insight-users] Basic question concerning metric

motes motes mort.motes at gmail.com
Wed Jul 1 16:27:34 EDT 2009


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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090701/a65692cc/attachment.htm>


More information about the Insight-users mailing list