[Insight-users] casting question

Kevin H. Hobbs kevin.hobbs.1 at ohiou.edu
Wed May 24 09:30:25 EDT 2006


If you want to convert an RGB image to a grayscale image with float as
the pixel type just change OutputImageType in
Insight/Examples/Filtering/RGBToGrayscale.cxx. If you want to change an
RGB image where each channel is an unsigned char to an RGB image where
each channel is a float, or to a vector image type where each component
of the vector is a float, cast should work.
Insight/Examples/Filtering/RGBGradientAnisotropicDiffusionImageFilter.cxx has an example of the vector cast.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://public.kitware.com/pipermail/insight-users/attachments/20060524/26ce7e34/attachment.pgp


More information about the Insight-users mailing list