[ITK] [ITK-users] MeanSquaresImageToImageMetricv4 with Vector images

Sureerat Reaungamornrat sureerat.r at gmail.com
Mon Jul 7 16:24:53 EDT 2014


Dear All,

   I tested MeanSquaresImageToImageMetricv4 with vector images using
following file.
...\Modules\Registration\Metricsv4\test\itkMeanSquaresImageToImageMetricv4OnVectorTest.cxx

   First, I changed the vector image declaration to
const unsigned int vectorLength = 25;
typedef itk::Vector<double, vectorLength>                     VectorType;
typedef itk::Image< VectorType, imageDimensionality > ImageType;

And I got the following compilation error:
error LNK2001: unresolved external symbol "public: static class
itk::Vector<double,25> const itk::NumericTraits<class
itk::Vector<double,25> >::Zero".

  Would anyone know what the source of this compilation error or how to fix
this? If I commented out 'New()' as follow
MetricType::Pointer metric;// = MetricType::New();
The program can be compiled.

   Second, I tested the metric with itk::VectorImage whose elements are
itk::VariableLengthVector.
typedef itk::VectorImage<double, imageDimensionality> ImageType;
typedef ImageType::PixelType VectorType;

 I got compilation error as follow
error : 'Length': is not a member of itk::VariableLengthVector<TValueType>
error : 'Length': undeclared identifier
Both are from itkPixelTraits.h
   Where does the ImageToImageMetricv4 use PixelTraits? Is there a way to
fix this?

Thank you very much for time and help,

Best regards,

Ja
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20140707/0c580f30/attachment.html>
-------------- next part --------------
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users


More information about the Community mailing list