[Insight-users] ResampleImageFilter for itk::VectorImage?
robert tamburo
robert.tamburo at gmail.com
Thu Jul 7 15:52:23 EDT 2011
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();
On Thu, Jul 7, 2011 at 3:40 PM, David Doria <daviddoria at gmail.com> wrote:
> 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
> _____________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110707/e70318f7/attachment.htm>
More information about the Insight-users
mailing list