[Insight-users] OutputType of itkVectorInterpolateImageFunction
Lydia Ng
lng at insightful.com
Thu, 29 Jan 2004 11:12:15 -0800
Hi Corinne,
The idea of VectorInterpolateImageFunction::Evaluate() returning a =
FixedArray
so that Vector, CovariantVector, FixedArray, RGBPixel etc can all use =
the
same interpolators.
In your VectorWarpImageFilter you could something similar to what is =
done in
VectorExpandImageFilter and VectorResampleImageFilter:
interpolatedValue =3D=20
m_Interpolator->EvaluateAtContinuousIndex( inputIndex );
for( unsigned int k =3D 0; k < VectorDimension; k++ )
{
outputValue[k] =3D static_cast<OutputValueType>(
interpolatedValue[k] );
}
outIt.Set( outputValue );
Note this is needed anyway in the cases when you want to output image =
type is
something other than a vector of doubles.
- Lydia
> -----Original Message-----
> From: Corinne Mattmann [mailto:mattmaco at ee.ethz.ch]
> Sent: Thursday, January 29, 2004 10:25 AM
> To: insight-users at itk.org
> Subject: [Insight-users] OutputType of =
itkVectorInterpolateImageFunction
>=20
> Hi,
>=20
> I would like to warp a vector image instead of a scalar image
> (WarpImageFilter is not working because of the interpolator used =
inside
> the filter). As there is no warp filter for vector images (as far as I
> know) I made a copy of the WarpImageFilter and substituted the
> InterpolateImageFunction with the VectorInterpolateImageFunction and =
the
> LinearInterpolateImageFunction with the
> VectorLinearInterpolateImageFunction. But now I get a compile error
> telling me that at line 206 in my copied WarpImageFilter
> (PixelType value =3D static_cast<PixelType>(m_Interpolator->Evaluate(
> point ));)
> it cannot convert from 'class itk::FixedArray<double,3>' to 'class
> itk::Vector<double,3>'.
> Why does the VectorInterpolateImageFunction not return a value =
identical
> to my input image PixelType (Vector<double,3>)?
>=20
> Thanks,
> Corinne
>=20
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users