Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -7,6 +10,9 @@ Brad Sutton <bsutton@illinois.edu>
Magnetic Resonance Functional Imaging Lab <mrfil.bioen.illinois.edu>
University of Illinois at Urbana-Champaign <illinois.edu>

Create the directory structure for each participant's data before running.
This can be achieved using file_structure.sh

Use: lesion_mapper -in <FLAIR image> [options]

Required parameters:
Expand Down
14 changes: 14 additions & 0 deletions file_structure.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh

#Usage: Creates required directory structure for each subject in a list
#Author: Paul B Camacho <pcamach2@illinois.edu>

#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
2 changes: 1 addition & 1 deletion fill_nw
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]
Expand Down
20 changes: 20 additions & 0 deletions outputRemoval.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh

#Usage: cleans out all results of pipeline_example except for dcm2niix outputs
#Author: Paul B Camacho <pcamach2@illinois.edu>

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
11 changes: 7 additions & 4 deletions pipeline_example
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion slicer_nw
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down