[Insight-developers] CastImageFilter

Miller, James V (CRD) millerjv@crd.ge.com
Fri, 22 Mar 2002 09:30:07 -0500


I think you can use the CastImageFilter as it is:

1) As long as a cast operator is defined for converting RGB to itk::Vector, it
should work out of the box.

2) You can call SetFunctor() on the CastImageFilter (defined in UnaryFunctorImageFilter) to set the
functor to anyone you would like.

There is no real problem adding the template parameter. Just not sure whether 
it is really needed to accomplish what you want.



-----Original Message-----
From: Joshua Cates [mailto:cates@cs.utah.edu]
Sent: Thursday, March 21, 2002 7:18 PM
To: Insight-Developers
Subject: [Insight-developers] CastImageFilter


Hi,

Anyone object to modifying itkCastImageFilter so that it is templated over
functor type, with default type Cast?  It seems to have been designed with
this intent.  I'm picturing scenarios where I want to cast an image of RGB
pixels into an image of itk::Vectors.  Be easy enough to subclass Cast to
perform any sort of conversion, or even just use the the adaptor classes
if they are still around.

Josh.

______________________________
 Josh Cates			
 School of Computer Science	
 University of Utah
 Email: cates@cs.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