Skip to content

Commit

Permalink
added bash script to perform default csd processing
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Close committed Feb 10, 2013
1 parent 8baf050 commit 7b52664
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
19 changes: 19 additions & 0 deletions bash/perform_csd
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash

if [ ! -d csd ]; then
read -p "No 'csd' folder found in current directory '$PWD', do you wish to create one [y] or exit [n]: " yn
if [ $yn == "yes" ] || [ $yn == "y" ]; then
mkdir csd
else
exit
fi
fi
cd csd
average ../dwi.mif -axis 3 - | threshold - - | median3D - - | median3D - mask.mif
dwi2tensor ../dwi.mif dt.mif
tensor2FA dt.mif - | mrmult - mask.mif fa.mif
erode mask.mif -npass 3 - | mrmult fa.mif - - | threshold - -abs 0.7 sf.mif
estimate_response ../dwi.mif sf.mif response.txt
disp_profile -response response.txt
csdeconv ../dwi.mif response.txt -lmax 8 -mask mask.mif CSD8.mif
mrview ../dwi.mif
1 change: 1 addition & 0 deletions params/image/reference/donald/corpus_callosum.mif

0 comments on commit 7b52664

Please sign in to comment.