[Insight-users] Convert mha to png images

David Doria daviddoria at gmail.com
Fri Jul 27 14:12:31 EDT 2012


> Although your problem may be that you are trying to create a png image
> out of an unsupported type for png. For example I do not believe png
> supports floating point formats. So if your image has a pixel type of
> float it probably will not work.
>
> John

If that is the case, you'd need to use a CastImageFilter to cast to an
itk::Image<unsigned char, 2> or
itk::Image<itk::CovariantVector<unsigned char, 3>, 2> as the case may
be.

http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/CastImageFilter

David


More information about the Insight-users mailing list