[Insight-users] Convert mha to png images

David Doria daviddoria at gmail.com
Fri Jul 27 10:33:45 EDT 2012


On Fri, Jul 27, 2012 at 10:28 AM, Grego <gregoris.liasis at st.ouc.ac.cy> wrote:
> Hello everybody,
>
> Does anyone know a simple way to convert .mha images to .png images?
>
> Thank you in advance.
>
> Regards
>
> Grego

Use an itk:ImageFileReader to read the .mha, then just write the image
to a png using an itk::ImageFileWriter. Simply by
writer->SetFileName("myfile.png"), the writer will write a png file
(the same way that by reader->SetFileName("myfile.mha") it will read
the mha file).

David


More information about the Insight-users mailing list