SimpleITK & MetaIO: changing the .raw extension

Dear all,
When I save MHD images using, is there a way to save with a different extension other than “.raw”/“.zraw”?

VTK does support that through vtkMetaImageWriter.SetRAWFileName ( is there is a similar possibility with SimpleITK?

Hello @ingmar.voigt,

Unfortunately, this is not possible in ITK/SimpleITK. The FileWriter is a generic class which is used for all file types, so there is only one output name. The mhd format is unique in that the “output file” is actually two files.

.nhdr variant from NRRD file format has the same issue.