[Insight-developers] using VectorInterpolateImageFunction with images of CovariantVectors

Luis Ibanez luis.ibanez@kitware.com
Tue, 12 Nov 2002 16:14:45 -0500


Hi Josh,

The itk::CovariantVector class was recently modified in order
to make possible its use with the VectorInterpolateImageFunction.
( this happened on 10/23/02 )


The difficulty was that VectorInterpolateImageFunction access
the dimension as "VectorDimension" but the CovariantVector
used to call its dimension = "CovariantVectorDimension".

The header was then changed to make this "VectorDimension".


It should be working now....
are you testing this with a recent checkout ?


As you said, it is easy to generalize the VectorInterpolator
to accept any Array (actually FixedArray). It will be a matter
of deciding how to name the Dimension.

Vector and CovariantVector derive both from FixedArray.

FixedArray calls its dimension "Length". We could add
another enum ( / static int) to have a "Dimension"
that could be used by the interpolator.


BTW that will be quite helpful with a pending problem
we have in the registration framework. Currently we
cannot register RGB images. The first obstacle for
this type of registration is the lack of interpolators
that can act on RGBpixels. (the second obstacle is the
lack of image metrics).

Conveniently RGBPixel<> already derives from FixedArray,
so generalizing the VectorInterpolateImageFunction to
accept FixedArrays will solve both problems.


Does anybody see a possible conflict with these changes ?


     Luis



=====================================================

Joshua Cates wrote:

> Hi,
> 
> There seems to be no way to use the VectorInterpolateImageFunction
> subclasses with images of CovariantVectors (FixedArrays), i.e. the output 
> of GradientImageFilter.  Does anyone have a workaround for this?
> 
> At first glance, looks like VectorInterpolateImageFunction could be
> rewritten to accept any FixedArray, instead of limiting to just
> itk::Vector.  It could then support itk::Vector and itk::CovariantVector.
> 
> Thanks,
> 
> Josh.
> 
> ______________________________
>  Josh Cates			
>  School of Computer Science	
>  University of Utah
>  Email: cates@sci.utah.edu
>  Phone: (801) 587-7697
>  URL:   www.cs.utk.edu/~cates
> 
> 
> 
> _______________________________________________
> Insight-developers mailing list
> Insight-developers@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-developers
> 
>