[Insight-users] Convert png to mha image format

David Doria daviddoria at gmail.com
Tue Oct 18 13:02:10 EDT 2011


On Tue, Oct 18, 2011 at 12:59 PM, David Brayford <dbrayford at gmail.com> wrote:
> Does anyone know how I can convert a .png image into a .mha image
> format, either using a software application or some code in ITK?

Just use an itkImageFileReader followed by an itkImageFileWriter.
Passing a filename with .mha as the file exetension to SetFileName of
the writer will automatically write the mha file you are looking for.

David


More information about the Insight-users mailing list