[Insight-developers] CastImageFilter

Luis Ibanez luis.ibanez@kitware.com
Thu, 21 Mar 2002 19:29:11 -0500


Joshua Cates wrote:

That's sound pretty reasonable. A Functor will allow to reuse most of 
the code
and easily generate CastingFilters on the fly.  

Adaptors are still around by not all Iterators support them.

For this particular case using the "ImageRegionIteratorWithIndex" will 
allow
to use an adaptor smoothly. Casting was the original motivation behind 
Adaptors
and PixelAccessor so in principle that should work fine.

Luis

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

>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
>