I am trying the metric example in the itkSoftwareGuide page 416. This is what I understand so far:<br><br>The following components are connected to the SSD metric:<br><br>- Transform (translation)<br>- Interpolator (nearest neighbor)<br>
- The fixed and moving images, in the example they are identical.<br><br>Next the moving image is translated and for each translation the metric is computed:<br><br> const int rangex = 50;<br> const int rangey = 50;<br>
for(int dx = -rangex; dx <= rangex; dx++){<br> for(int dy = -rangey; dy <= rangey; dy++){<br> displacement[0] = dx;<br> displacement[1] = dy;<br> const double value = metric->GetValue(displacement);<br>
out << dx << " " << dy << " " << value << std::endl;<br> }<br> }<br><br>As I understand the call:<br><br> metric->GetValue(displacement);<br>
<br>evaluates the metric for transform parameters contained in the displacement vector using the underlying connected transform.<br><br>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.<br>
<br>To put it another way: The fixed image is compared to 50*50 translated versions of it self. <br><br>Am I on the right track?<br>