A simple convenience script to convert between image formats. Let's look at our image first.
With medpy_info.py we can look at it's details.
In [1]:
medpy_info.py resources/flair.nii.gz
No we convert it to another format.
In [2]:
medpy_convert.py resources/flair.nii.gz output/flair.hdr
Note: if you get an error that the file already exists, you can force an overwrite by appending -f to the command. This is true for most medpy scripts.
HDR is an Analyze 7.5 format which is composed by a header file (.hdr) and a data file (.img).
In [3]:
ls output/flair.*
Checking the newly created image (we just supply the header file), we see that nothing changes except the format.
In [4]:
medpy_info.py output/flair.hdr
In [ ]: