Skip to content

Instantly share code, notes, and snippets.

@stowler
Created May 15, 2013 18:59
Show Gist options
  • Save stowler/5586397 to your computer and use it in GitHub Desktop.
Save stowler/5586397 to your computer and use it in GitHub Desktop.
scratch pad script from early training with Jen
#!/bin/bash
# scratch pad script for inital training with Jen
# [email protected]
# this is a short script to loop QA for Joe's data
seriesList="4 5 6 7 8 9"
parentDicomDir=~/Downloads/Fiji.app/DICOMSTORE/CDA101/MR/20130429/135538.453000/1
bxhDir=~/Downloads/bxh_xcede_tools-1.10.7-lsb30.x86_64/bin/
outDir=/tmp/autoQA
# rm -fr ${outDir}
# mkdir ${outDir}
#
# for seriesNumber in ${seriesList}; do
# echo "number of files for series ${seriesNumber}:"
# ls -1 ${parentDicomDir}/${seriesNumber} | wc -l
# ${bxhDir}/dicom2bxh ${parentDicomDir}/${seriesNumber}/* ${outDir}/fmriSeries${seriesNumber}.bxh
# ls -l ${outDir}
# ${bxhDir}/bxh2analyze --nii -b -s ${outDir}/fmriSeries${seriesNumber}.bxh ${outDir}/fmriSeries${seriesNumber}
# fslreorient2std ${outDir}/fmriSeries${seriesNumber}.nii ${outDir}/fmriSeries${seriesNumber}_MNI
# done
ls -l ${outDir}
echo ""
echo ""
# echo "Now use fslview to confirm that each .nii is reasonable and ready to be reoriented. Or, if inspecting reoriented _MNI volumes, that each volume is oriented consistent with the MNI152 template."
# cd ${outDir}
# fslview &
# cd ${outDir}
# ${bxhDir}/fmriqa_generate.pl fmriSeries*.bxh qaReport_6runs
cd ${bxhDir}/..
bin/fmriqa_generate.pl ${outDir}/fmriSeries*.bxh ${outDir}/qaReport_6runs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment