<div>Dear all, Hi, </div>
<div> </div>
<div>I'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't a method like GetOutput() so I can get the metric by </div>
<div> </div>
<div> metric->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 <= rangex; dx++ )<br> {<br> for( int dy = -rangey; dy <= rangey; dy++ )<br> {<br> displacement[0] = dx;<br> displacement[1] = dy;<br> const double value = metric->GetValue( displacement );<br>
std::cout << dx << " " << dy << " " << value << std::endl;<br> }<br> } </div>
<div> </div>
<div> </div>