Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Fix WM diffusion measurement Python script call for Linux #156

Merged
merged 2 commits into from
Sep 21, 2023
Merged
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
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."
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The indentation here has used a tab instead of whitespaces, hence the difference with the newly added code.

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
Loading