Skip to content

Commit

Permalink
Merge pull request #156 from jhlegarreta/FixShellWMMeasurementLinuxCall
Browse files Browse the repository at this point in the history
BUG: Fix WM diffusion measurement Python script call for Linux
  • Loading branch information
ljod authored Sep 21, 2023
2 parents 3f74faf + 3c89a1b commit e1b19a0
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions bin/wm_apply_ORG_atlas_to_subject.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -389,22 +389,30 @@ fi

if [ $DiffMeasure == 1 ]; then

os=$(uname)

if [[ "$os" == 'Linux' ]]; then
measurement_cli_cmd=$SlicerPath" --launch "$FiberTractMeasurementsCLI
else
measurement_cli_cmd=$FiberTractMeasurementsCLI
fi

echo "<wm_apply_ORG_atlas_to_subject> Report diffusion measurements of fiber clusters."
if [ ! -f $SeparatedClustersFolder/diffusion_measurements_commissural.csv ]; then
wm_diffusion_measurements.py \
$SeparatedClustersFolder/tracts_commissural $SeparatedClustersFolder/diffusion_measurements_commissural.csv "$FiberTractMeasurementsCLI"
$SeparatedClustersFolder/tracts_commissural $SeparatedClustersFolder/diffusion_measurements_commissural.csv "$measurement_cli_cmd"
else
echo " - diffusion measurements of commissural clusters has been done."
fi
if [ ! -f $SeparatedClustersFolder/diffusion_measurements_left_hemisphere.csv ]; then
wm_diffusion_measurements.py \
$SeparatedClustersFolder/tracts_left_hemisphere $SeparatedClustersFolder/diffusion_measurements_left_hemisphere.csv "$FiberTractMeasurementsCLI"
$SeparatedClustersFolder/tracts_left_hemisphere $SeparatedClustersFolder/diffusion_measurements_left_hemisphere.csv "$measurement_cli_cmd"
else
echo " - diffusion measurements of left hemisphere clusters has been done."
fi
if [ ! -f $SeparatedClustersFolder/diffusion_measurements_right_hemisphere.csv ]; then
wm_diffusion_measurements.py \
$SeparatedClustersFolder/tracts_right_hemisphere $SeparatedClustersFolder/diffusion_measurements_right_hemisphere.csv "$FiberTractMeasurementsCLI"
$SeparatedClustersFolder/tracts_right_hemisphere $SeparatedClustersFolder/diffusion_measurements_right_hemisphere.csv "$measurement_cli_cmd"
else
echo " - diffusion measurements of right hemisphere clusters has been done."
fi
Expand All @@ -422,10 +430,18 @@ echo ""

if [ $DiffMeasure == 1 ]; then

os=$(uname)

if [[ "$os" == 'Linux' ]]; then
measurement_cli_cmd=$SlicerPath" --launch "$FiberTractMeasurementsCLI
else
measurement_cli_cmd=$FiberTractMeasurementsCLI
fi

echo "<wm_apply_ORG_atlas_to_subject> Report diffusion measurements of the anatomical tracts."
if [ ! -f $AnatomicalTractsFolder/diffusion_measurements_anatomical_tracts.csv ]; then
wm_diffusion_measurements.py \
$AnatomicalTractsFolder $AnatomicalTractsFolder/diffusion_measurements_anatomical_tracts.csv "$FiberTractMeasurementsCLI"
$AnatomicalTractsFolder $AnatomicalTractsFolder/diffusion_measurements_anatomical_tracts.csv "$measurement_cli_cmd"
else
echo " - diffusion measurements of anatomical tracts has been done."
fi
Expand Down

0 comments on commit e1b19a0

Please sign in to comment.