[Insight-developers] itkVector and itkRGBPixel

Stephen R. Aylward aylward@unc.edu
Thu, 23 Jan 2003 19:50:46 -0500


I would really welcome RGBPixel being a subclass of itkVector.

Otherwise what we do is read the image directly with MetaIO.   I think 
itkIOLib can also be extended to recognize Vector<T,3> as a supported 
pixel type...

s

Joshua Cates wrote:
> Hi,
> 
> Often I find myself in the situation of needing to read a color image and
> process it as a numerical vector.  The problem with this situation is that
> the itk file IO objects do not seem to handle reading data directly into
> vector images.  They do work with RGBPixel, but since RGBPixel is not a
> subclass of itkVector, it has no arithmetic operations defined and cannot
> be used as a numerical pixel type.  So I'm stuck with casting outside of
> the pipeline, which is not an ideal situation.
> 
> How do others handle this problem?  I propose either defining an
> appropriate functor for casting from RGBPixel<T> to Vector<T, 3> (is this
> even possible given the constraints imposed upon us by microsoft?), or
> making RGBPixel a subclass of Vector.
> 
> Thanks,
> 
> Josh.
> 
> 
> ______________________________
>  Josh Cates			
>  School of Computer Science	
>  University of Utah
>  Email: cates@sci.utah.edu
>  Phone: (801) 587-7697
>  URL:   http://www.sci.utah.edu/~cates
> 
> 
> 
> _______________________________________________
> Insight-developers mailing list
> Insight-developers@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-developers


-- 
===============================================
Dr. Stephen R. Aylward
Assistant Professor of Radiology
Adjunct Assistant Professor of Computer Science
http://caddlab.rad.unc.edu
aylward@unc.edu
(919) 966-9695