[Insight-developers] Template parameters

Daniel J. Blezek, Ph.D. blezek@crd.ge.com
Thu, 1 Mar 2001 14:58:01 -0500 (EST)


Hi all,

  I'm digging into the Insight code, and noticed some inconsistancies is
how template paramaters are being used.  In one case:

template <class TPixel, unsigned int VDimension=2>
class ITK_EXPORT NeighborhoodOperatorImageFilter :
    public ImageToImageFilter< Image<TPixel, VDimension>,
                               Image<TPixel, VDimension> > 


In another:

template <class TInputImage, class TOutputImage>
class ITK_EXPORT ShrinkImageFilter:
    public ImageToImageFilter<TInputImage,TOutputImage>


In another:

template <class TImage>
class ITK_EXPORT ThresholdImageFilter:public ImageToImageFilter<TImage,TImage>


Case:
1.  Specified the pixel type and dimension
2.  Specified both input and output image types, not really necessary,
    shrink should not change the pixel type of the data
3.  Use only one image type for both input and output

I think this raises a fundamental question about how to specify a filter.
Do we specify by pixel type and dimension, or by input/output type, or
just one type?

Ideas?
-dan

--
Daniel Blezek, Ph.D.
blezek@crd.ge.com
Visualization and Computer Vision Program
Electronic Systems Lab
GE Corporate Research & Development