diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Dockerfile @@ -0,0 +1 @@ + diff --git a/README.md b/README.md index 339e84b..f9f2bb2 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ +A BIDS-compatible extended version of this tool is available at https://github.com/mrfil/lesion-mapper-bids. The new version can utilize outputs from Freesurfer and/or fMRIPrep and distinguishes between deep white matter lesions and periventricular lesions. + + lesion_mapper - A tool for mappping white matter hyperintensities. Publication at: Wetter, Hubbard, Motl, Sutton. Brain Behav. 2016 Jan 28;6(3):e00440. https://doi.org/10.1002/brb3.440 For research purposes only! Please see LICENSE.txt @@ -7,6 +10,9 @@ Brad Sutton Magnetic Resonance Functional Imaging Lab University of Illinois at Urbana-Champaign +Create the directory structure for each participant's data before running. + This can be achieved using file_structure.sh + Use: lesion_mapper -in [options] Required parameters: diff --git a/file_structure.sh b/file_structure.sh new file mode 100644 index 0000000..649d26e --- /dev/null +++ b/file_structure.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +#Usage: Creates required directory structure for each subject in a list +#Author: Paul B Camacho + +#run from subjects directory +for SUB in 001 002 003 004 005 +do + mkdir ./${SUB}/Analyze/unbiased + mkdir ./${SUB}/Analyze/bet_notunbiased + mkdir ./${SUB}/Analyze/lesions_no2fast + mkdir ./${SUB}/Analyze/bet_multispectral + mkdir ./${SUB}/Analyze/sienax_no2fast +done diff --git a/fill_nw b/fill_nw index ce637e7..d775631 100755 --- a/fill_nw +++ b/fill_nw @@ -46,7 +46,7 @@ if [ "$failed" = 1 ]; then fi # begin computation -cluster --in=${mask} --thresh=0.5 -o ${mask}_cluster --no_table +${FSLDIR}/bin/cluster --in=${mask} --thresh=0.5 -o ${mask}_cluster --no_table index_max=$(fslstats ${mask}_cluster -R | cut -d' ' -f2 | cut -d'.' -f1) index_cur=1 while [ $index_cur -le $index_max ] diff --git a/outputRemoval.sh b/outputRemoval.sh new file mode 100644 index 0000000..16b8e6b --- /dev/null +++ b/outputRemoval.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +#Usage: cleans out all results of pipeline_example except for dcm2niix outputs +#Author: Paul B Camacho + +WorkDir=/path/to/dataDirectory + +for SUB in 001 002 003 004 005 +do + cd ${WorkDir}/${SUB}/Analyze/unbiased + rm ./* + cd ${WorkDir}/${SUB}/Analyze/bet_notunbiased + rm ./* + cd ${WorkDir}/${SUB}/Analyze/lesions_no2fast + rm ./* + cd ${WorkDir}/${SUB}/Analyze/bet_multispectral + rm ./* + cd ${WorkDir}/${SUB}/Analyze/sienax_no2fast + rm ./* +done diff --git a/pipeline_example b/pipeline_example index 735a1a4..8269cc7 100755 --- a/pipeline_example +++ b/pipeline_example @@ -12,16 +12,19 @@ args="Js* TheraStride* Exert* METS* " #args="METS_[0-9][0-9]_[0-9][0-9][0-9][0-9 args+="-numthreads auto -memory 32 -maxthreads 24 -analysis Analyze -v" #args=$subs+$args -nwpipe "dcm2nii -m N ../SPACE" \ +nwpipe "dcm2niix -m N -x y -z y ../SPACE" \ $args -numthreads 1 \ - -in ../SPACE -out ../SPACE/o*.nii.gz + -in ../SPACE -out ../SPACE/*_Crop_1.nii.gz nwpipe "unbias T2.nii.gz" \ $args -outdir unbiased \ - -in ../SPACE/o*.nii.gz T2.nii.gz \ + -in ../SPACE/*_Crop_1.nii.gz T2.nii.gz \ -out T2_unbiased.nii.gz +nwpipe "dcm2niix -m N -x y -z y ../MPRAGE" \ + $args -numthreads 1 \ + -in ../MPRAGE -out ../MPRAGE/*_Crop_1.nii.gz nwpipe "unbias T1.nii.gz" \ $args -outdir unbiased \ - -in ../MPRAGE/o*.nii.gz T1.nii.gz \ + -in ../MPRAGE/*_Crop_1.nii.gz T1.nii.gz \ -out T1_unbiased.nii.gz nwpipe "bet_nw ../unbiased/T2 t2_brain -R -png -d -s -m -f 0.4 -g -0.2" \ $args -outdir bet_notunbiased \ diff --git a/slicer_nw b/slicer_nw index c0c288b..6afd611 100755 --- a/slicer_nw +++ b/slicer_nw @@ -53,7 +53,7 @@ if [ -n "$overlaycmd" ]; then overlay $overlaycmd fi - overlay 0 0 T2_unbiased -a lesionmapT2 0.9 1.1 lesionmapT2 0.9 1.1 overlay + overlay 0 0 ../unbiased/T2_unbiased.nii.gz -a ../lesions_no2fast/lesionmapT2.nii.gz 0.9 1.1 lesionmapT2 0.9 1.1 overlay midx=$(fslstats $in -C | cut -d" " -f1 | cut -d"." -f1) for it in {1..18}; do