[Insight-developers] Using ConstantPadImageFilter on vector images
Lydia Ng
lng@insightful.com
Thu, 27 Dec 2001 15:10:33 -0800
Hi All,
I would like to use ConstantPadImageFilter
on vector images (i.e. where the image pixel is
of type itk::Vector<someScalar,vectorDimension>).
The existing implementation does not work because as
it requires the used of NumericsTraits<PixelType>::Zero
to initialize the padding value to "zero".
Currently, NumericsTraits for itk::Vector's are not defined.
I am not sure how to go about defining a generic
NumericsTraits for Vector. Does one have to explicitly
specialize NumericsTraits for every combination
of *someScalar* and *vectorDimension*?
My other option is to create a vector version
of the filter (i.e. a VectorConstantPadImageFilter) but
that seems to be an awful lot of code duplication.
Any suggestions?
Cheers,
Lydia