Last active
January 29, 2019 12:52
-
-
Save arthurcgusmao/8e24c1bd253cb24ca03123b60d58dc61 to your computer and use it in GitHub Desktop.
Convert .dcm files to .jpg shell script / command line
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
#!/bin/bash | |
EXTENSION=.dcm | |
FILES=*/*.dcm | |
mkdir outputs | |
for f in $FILES | |
do | |
echo "Converting $f file..." | |
fname="$(basename $f $EXTENSION)" | |
dcmj2pnm $f outputs/$fname.jpg +oj | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment