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

David Doria daviddoria at gmail.com
Thu Jul 7 16:14:00 EDT 2011


On Thu, Jul 7, 2011 at 3:52 PM, robert tamburo <robert.tamburo at gmail.com> wrote:
> A possible workaround if your application permits:
> Use an image of itk::Vector's. Vector has GetNumberOfComponents().
> Array and VariableLengthVector have GetNumberOfElements() but
> not GetNumberOfComponents()
> No such Get function exists for FixedArray, but GetNumberOfComponents() is
> defined in RGBPixel
> Is there a conceptual difference between GetNumberOfComponents() and
> GetNumberOfElements()?
> A possible solution:
> Fix VariableLengthVector to interface correctly
> with VectorResampleImageFilter (and potentially other Vector*Filters) by
> renaming GetNumberOfElements to GetNumberOfComponents() and changing
> const unsigned int numberOfComponents = PixelType::GetNumberOfComponents();
> to
> unsigned int numberOfComponents = PixelType::GetNumberOfComponents();

Yep it should work fine with itk::Image<itk::Vector> just like
itk::Image<itk::CovariantVector>. I really need it to work with
itk::VectorImage though.

David


More information about the Insight-users mailing list