[Insight-users] casting question

smythek at u.washington.edu smythek at u.washington.edu
Wed May 24 11:08:55 EDT 2006


Thanks!


On Wed, 24 May 2006, Kevin H. Hobbs wrote:

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




More information about the Insight-users mailing list