-
Notifications
You must be signed in to change notification settings - Fork 139
List of supported image formats
MedPy does not support the loading/saving of medical images, itself but rather provides a convenient and transparent wrapper around a number of 3rd party modules. This functionality is build modular i.e. MedPy searches among the available modules for a suitable candidate to load/save the image format encountered. No 3rd party module is required to run MedPy, but without any installed, you won't be able to load or save any image.
MedPy currently can work with three different modules. Here you can find a list of these and the medical image formats they enable support for.
NiBabel enables support for:
- NifTi - Neuroimaging Informatics Technology Initiative (.nii, nii.gz)
- Analyze (plain, SPM99, SPM2) (.hdr/.img, .img.gz)
- and some others (http://nipy.sourceforge.net/nibabel/)
PyDicom:
- Dicom - Digital Imaging and Communications in Medicine (.dcm, .dicom)
WrapITK enables support for:
- NifTi - Neuroimaging Informatics Technology Initiative (.nii, nii.gz)
- Analyze (plain, SPM99, SPM2) (.hdr/.img, .img.gz)
- Dicom - Digital Imaging and Communications in Medicine (.dcm, .dicom)
- Itk/Vtk MetaImage (.mhd, .mha/.raw)
- Nrrd - Nearly Raw Raster Data (.nhdr, .nrrd)
- and many others (http://www.cmake.org/Wiki/ITK/File_Formats)
Generally we advise to use the nibabel third party tool, which is implemented in pure python and whose support for Nifti (.nii) and Analyze 7.5 (.hdr/.img) is excellent and comprehensive. If you've followed the installation instructions in this wiki, NiBabel and PyDicom should be already installed on your machine, if not, see [here](./Installing-MedPy-from-source-(Ubuntu)#wiki-4nibabel-and-pydicom) how to get them on your machine.
WrapITK a.k.a. the ITK libraries Python wrappers are the most powerful tool and furthermore make a number of additional functionality available. The problem is, that they have to be compiled from source, which is time-consuming and rather complicated. Take a look here for a detailed description.