[Insight-users] Compilation error: itkVectorResampleImageFilter.txx:169: error: ‘GetNumberOfComponents’ is not a member of ‘itk::FixedArray<double, 3u>’

Andreas Schuh andreas.schuh.84 at googlemail.com
Sun Jan 10 08:22:20 EST 2010


Hi Ricardo,

As the error message states, the type used as PixelType has to provide the static member GetNumberOfComponents() as the itk::VectorResampleImageFilter calls this method in order to determine the number of vector components. Thus, you have to use itk::Vector as PixelType instead of itk::FixedArray, as this type provides the GetNumberOfComponents() method.

Andreas

On Jan 10, 2010, at 8:05 AM, Ricardo Ferrari wrote:

> Hi all,
> 
> I am trying to use the  itkVectorResampleImageFilter.txx with the following image type
> 
> const int Dimension = 3;
> typedef itk::FixedArray< double, NumberOfContrasts >          ArrayPixelType;
> typedef itk::Image< ArrayPixelType, Dimension >                    ArrayImageType;
> 
> and I am getting the following compilation error. 
> 
> /usr/local/include/InsightToolkit/BasicFilters/itkVectorResampleImageFilter.txx: In member function ‘void itk::VectorResampleImageFilter<TInputImage, TOutputImage, TInterpolatorPrecisionType>::ThreadedGenerateData(const typename TOutputImage::RegionType&, int) [with TInputImage = itk::Image<itk::FixedArray<double, 3u>, 3u>, TOutputImage = itk::Image<itk::FixedArray<double, 3u>, 3u>, TInterpolatorPrecisionType = double]’:
> /home/ferrari/workspace/MIP-PROJECTS/trunk/segmentation/gmm/main.cpp:143:   instantiated from here
> /usr/local/include/InsightToolkit/BasicFilters/itkVectorResampleImageFilter.txx:169: error: ‘GetNumberOfComponents’ is not a member of ‘itk::FixedArray<double, 3u>’
> make[2]: *** [segmentation/gmm/CMakeFiles/gmm_classifier.dir/main.cpp.o] Error 1
> make[1]: *** [segmentation/gmm/CMakeFiles/gmm_classifier.dir/all] Error 2
> make: *** [all] Error 2
> 
> 
> Does anybody has already gotten this error before? Any ideas?
> 
> Thank you,
> Ricardo
> 
> _____________________________________
> 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.html
> 
> 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://www.itk.org/mailman/listinfo/insight-users



More information about the Insight-users mailing list