Last active
April 11, 2020 21:40
-
-
Save gireeshkbogu/94a3b1dd223b340e22d7c0c89cb7e8c3 to your computer and use it in GitHub Desktop.
Converts .nii format to .jpg or .png format
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# source: https://pypi.org/project/med2image/ | |
# https://stackoverflow.com/questions/29640641/how-to-convert-nii-format-file-into-2d-image | |
# requirements | |
#pip3 install pydicom | |
#pip3 install med2image | |
#pip3 install pudb | |
#pip3 install pfmisc | |
#$1 = input.nii | |
#$2 = output | |
#$3 = image | |
#$4 = png | |
# converts nii to 2D image format | |
med2image --inputFile $1 --outputDir $2 --outputFileStem $3 --outputFileType $4 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment