Created
December 15, 2012 10:42
-
-
Save fishkingsin/4293570 to your computer and use it in GitHub Desktop.
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
a=1 | |
folder=$@ | |
target_folder=YOUR_TARGET_FOLDER_TO_PLACE_TIF | |
mkdir $target_folder/$folder | |
cd ./$folder | |
for i in $(ls *.dcm) | |
do | |
new=$(printf "%04d.tif" ${a}) #04 pad to length of 4 | |
convert ${i} -auto-level -depth 8 -normalize -resize 50% ${new} | |
mv ${new} $target_folder/$folder | |
let a=a+1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment