Re: [Insight-users] problems using itkVectorResampleImageFilter

Tomáš Kazmar Tomash.Kazmar at seznam.cz
Wed Sep 12 16:56:10 EDT 2007


It is kind of silly because there is already Size() and
GetNumberOfElements() that return the same information
and it is called statically from the filter:

  const unsigned int numberOfComponents = PixelType::GetNumberOfComponents();

...but it seems it would make it work:)

Tomas

# It may be silly, but would it be possible to add a  
# GetNumberOfComponents() in the VariableLengthVector class, which  
# return the number of components at runtime ?
# 
# Gaëtan
# 
# 
# Le 12 sept. 07 à 21:26, Dan Mueller a écrit :
# 
# > Hi Yogesh,
# >
# > It seems the VectorResampleImageFilter requires a pixel type which has
# > the number of dimensions defined at compile time, not run-time: any
# > type derived from FixedArray should work (eg. Vector,
# > CovariantVector). I'm not exactly sure why -- it's a little outside my
# > realm of knowledge. Any other takers?
# >
# > It should be possible to implement a templated function which can
# > delegate to a filter with the correct number of dimensions at
# > run-time:
# >    Eg. see http://public.kitware.com/pipermail/insight-users/2002- 
# > June/000513.html
# >
# > HTH
# >
# > Cheers, Dan
# >
# > On 13/09/2007, Yogesh Rathi <yogesh.rathi at gmail.com> wrote:
# >> Anybody noticed compilation problems when using  
# >> itkVectorResampleImageFilter
# >> ?
# >>
# >> I am getting the following errors when I use this filter:
# >>
# >> itkVectorInterpolateImageFunction.h:35: error: 'Dimension'
# >> is not a member of 'itk::VariableLengthVector<float>'
# >>
# >> error: no matching function for call to
# >> 'itk::VectorResampleImageFilter<itk::VectorImage<float,
# >> 3u>, itk::VectorImage<float, 3u>,
# >> double>::SetTransform 
# >> (itk::SmartPointer<itk::CenteredAffineTransform<float,
# >> 3u> >&)'
# >>
# >> itkVectorResampleImageFilter.h:120: note: candidates are: void
# >> itk::VectorResampleImageFilter<TInputImage, TOutputImage,
# >> TInterpolatorPrecisionType>::SetTransform(const
# >> itk::Transform<TInterpolatorPrecisionType,
# >> itk::VectorResampleImageFilter<TInputImage,TOutputImage,TInterpolator 
# >> PrecisionType>::ImageDimension,
# >> itk::VectorResampleImageFilter<TInputImage,TOutputImage,TInterpolator 
# >> PrecisionType>::ImageDimension>*)
# >> [with TInputImage = itk::VectorImage<float, 3u>, TOutputImage =
# >> itk::VectorImage<float, 3u>, TInterpolatorPrecisionType = double]
# >>
# >> itkVectorResampleImageFilter.txx:175: error:
# >> 'GetNumberOfComponents' is not a member of
# >> 'itk::VariableLengthVector<float>'
# >>
# >> Thanks in advance,
# >>
# >> Yogesh
# > _______________________________________________
# > Insight-users mailing list
# > Insight-users at itk.org
# > http://www.itk.org/mailman/listinfo/insight-users
# 
# --
# Gaëtan Lehmann
# Biologie du Développement et de la Reproduction
# INRA de Jouy-en-Josas (France)
# tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
# http://voxel.jouy.inra.fr
# 
# 
# 
# 
# 
# 


More information about the Insight-users mailing list