<div>Dear all, Hi, </div>
<div> </div>
<div>I&#39;m trying to get the metric as output of the example </div>
<div> </div>
<div>MeanSquaresImageToImageMetric1.cxx</div>
<div> </div>
<div> </div>
<div> Unfortunately there isn&#39;t  a method like GetOutput() so I can get the metric by </div>
<div> </div>
<div> metric-&gt;GetOutput();</div>
<div> </div>
<div>and then  write the metric in a file as an image. </div>
<div> </div>
<div>However at the end of this example, they use the displacement to get the values of the metric at points defined by the displacement, see below the method that implement this. </div>
<div>Do I have to give the displacement vector as input to get the value of the metric by GetValu() ? How to know the range  ? They use translations as transformation.</div>
<div> </div>
<div>Thank you </div>
<div>Haj </div>
<div> </div>
<div> </div>
<div> MetricType::TransformParametersType displacement( Dimension );</div>
<div>  const int rangex = 50;<br>  const int rangey = 50;</div>
<div>  for( int dx = -rangex; dx &lt;= rangex; dx++ )<br>    {<br>    for( int dy = -rangey; dy &lt;= rangey; dy++ )<br>      {<br>      displacement[0] = dx;<br>      displacement[1] = dy;<br>      const double value = metric-&gt;GetValue( displacement );<br>
      std::cout &lt;&lt; dx &lt;&lt; &quot;   &quot;  &lt;&lt; dy &lt;&lt; &quot;   &quot; &lt;&lt; value &lt;&lt; std::endl;<br>      }<br>    } </div>
<div> </div>
<div> </div>