[Insight-users] BUG in VectorResampler

Bryn Lloyd blloyd at bwh.harvard.edu
Fri Aug 19 09:11:18 EDT 2005


Hi all,


There seems to be a bug in itkVectorResampler. When it is used with an
image of SymmetricSecondRankTensor pixels, only the first
PixelType::Dimension get resampled. The rest is zero...

The line  of itkVectorResampler should maybe be changed from

  const unsigned int numberOfComponents = PixelType::Dimension;

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


For e.g. SymmetricSecondRankTensor<float,3> Dimension is 3, number of
components is 6!

Changing this line maybe could cause problems with the CovariantVector
pixel type, because it does not have the method GetNumberOfComponents().
Maybe this could be added also.


I will have a look at the other Vector______ImageFilters, to see if the
same thing is happening there.


Bryn





More information about the Insight-users mailing list