[Insight-users] ResampleImageFilter for itk::VectorImage?
Cory Quammen
cquammen at cs.unc.edu
Thu Jul 7 15:59:48 EDT 2011
How about replacing line 161 itkVectorResampleImageFilter.txx with
const unsigned int numberOfComponents =
inputPtr->GetNumberOfComponentsPerPixel();
?
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();
> 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
>
>
--
Cory Quammen
Research Associate
Department of Computer Science
University of North Carolina at Chapel Hill
http://www.cs.unc.edu/~cquammen
More information about the Insight-users
mailing list