[Insight-users] ResampleImageFilter for itk::VectorImage?

David Doria daviddoria at gmail.com
Thu Jul 7 15:40:59 EDT 2011


On Thu, Jul 7, 2011 at 3:34 PM, Cory Quammen <cquammen at cs.unc.edu> wrote:
> David,
>
> Perhaps you want to add a method GetNumberOfComponents() to
> VariableLengthVector and see if it works. If it does, this seems like
> a good addition to make.
>
> Thanks,
> Cory

The problem is that the length of a VariableLengthVector is a member:

  inline unsigned int GetNumberOfElements(void) const
  { return m_NumElements; }

versus the CovariantVector which has a static function that is called
from the VectorResampleImageFilter (the error is "cannot call member
function without object):

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

There is also the ::Dimension variable:

  itkStaticConstMacro(Dimension, unsigned int,
                      TInputImage::PixelType::Dimension);

that is not a member.

Is there an easy fix?

David


More information about the Insight-users mailing list