<div dir="ltr">Dear All,<div><div><br></div><div> I tested MeanSquaresImageToImageMetricv4 with vector images using following file.</div><div>...\Modules\Registration\Metricsv4\test\itkMeanSquaresImageToImageMetricv4OnVectorTest.cxx<br>
</div><div><br></div><div> First, I changed the vector image declaration to </div><div>const unsigned int vectorLength = 25;<br></div><div><div>typedef itk::Vector<double, vectorLength> VectorType;</div>
<div>typedef itk::Image< VectorType, imageDimensionality > ImageType;</div></div><div><br></div><div>And I got the following compilation error:</div><div>error LNK2001: unresolved external symbol "public: static class itk::Vector<double,25> const itk::NumericTraits<class itk::Vector<double,25> >::Zero".<br>
</div><div><br></div><div> Would anyone know what the source of this compilation error or how to fix this? If I commented out 'New()' as follow</div><div>MetricType::Pointer metric;// = MetricType::New();</div><div>
The program can be compiled.</div><div><br></div><div> Second, I tested the metric with itk::VectorImage whose elements are</div><div>itk::VariableLengthVector. </div><div><div>typedef itk::VectorImage<double, imageDimensionality> ImageType;</div>
<div>typedef ImageType::PixelType VectorType;</div></div><div><br></div><div> I got compilation error as follow</div><div>error : 'Length': is not a member of itk::VariableLengthVector<TValueType></div><div>
error : 'Length': undeclared identifier </div><div>Both are from itkPixelTraits.h</div><div> Where does the ImageToImageMetricv4 use PixelTraits? Is there a way to fix this?</div><div><br></div><div>Thank you very much for time and help,</div>
<div><br></div><div>Best regards,</div><div><br></div><div>Ja</div><div><br></div><div> </div><div><br></div><div><br></div><div><br></div><div><br></div><div> </div></div></div>