Commit 92d19c0f authored by Shaun Warrington's avatar Shaun Warrington
Browse files

Merge branch 'patch-191119' into 'master'

Patch 191119

See merge request !6
parents e20653fa dfac9802
......@@ -152,12 +152,21 @@ The output of XTRACT is a folder that contrains tracts in separate folders. We p
/_/\_\ |_| |_| \_\/_/ \_\____| |_| \_/ |_|\___| \_/\_/ \___|_|
Usage:
xtract_viewer -dir <xtractDir> [options]
Usage:
xtract_viewer -dir <xtractDir> -species HUMAN [options]
xtract_viewer -dir <xtractDir> -species MACAQUE [options]
xtract_viewer -dir <xtractDir> -brain <PATH> [options]
Compulsory arguments:
-dir FOLDER Path to XTRACT output folder
-dir <FOLDER> Path to XTRACT output folder
And EITHER:
-species <SPECIES> One of HUMAN or MACAQUE
OR:
-brain <PATH> The brain image to use for the background overlay - must be in the same space as tracts.
Default is the FSL_HCP065_FA map for HUMAN and F99 T1 brain for MACAQUE
Optional arguments:
......@@ -166,7 +175,4 @@ Usage:
-thr NUMBER NUMBER The lower and upper thresholds applied to the tracts for viewing
Default = 0.001 0.1
-brain The brain image to use for the background overlay - must be in the same space as tracts.
Default is the FSL_HCP065_FA map
```
......@@ -338,7 +338,7 @@ chmod +x $commands
if [ "x$SGE_ROOT" != "x" ]; then # Submit all commands to run in parallel on the cluster
# One job per tract for a CPU cluster, one job for all tracts for a GPU cluster.
if [ $gpu -eq 0 ];then
fsl_sub -q long.q -l $out/logs -N xtract -t $commands
fsl_sub -q long.q -T 2160 -l $out/logs -N xtract -t $commands
else
fsl_sub -q $FSLGECUDAQ -T 300 -l $out/logs -N xtract $commands
fi
......
#!/bin/bash
# Copyright (C) 2019 University of Oxford
......@@ -14,11 +12,20 @@ Usage() {
cat << EOF
Usage:
xtract_viewer -dir <xtractDir> [options]
xtract_viewer -dir <xtractDir> -species HUMAN [options]
xtract_viewer -dir <xtractDir> -species MACAQUE [options]
xtract_viewer -dir <xtractDir> -brain <PATH> [options]
Compulsory arguments:
-dir FOLDER Path to XTRACT output folder
-dir <FOLDER> Path to XTRACT output folder
And EITHER:
-species <SPECIES> One of HUMAN or MACAQUE
OR:
-brain <PATH> The brain image to use for the background overlay - must be in the same space as tracts.
Default is the FSL_HCP065_FA map for HUMAN and F99 T1 brain for MACAQUE
Optional arguments:
......@@ -27,8 +34,6 @@ Usage:
-thr NUMBER NUMBER The lower and upper thresholds applied to the tracts for viewing
Default = 0.001 0.1
-brain The brain image to use for the background overlay - must be in the same space as tracts.
Default is the FSL_HCP065_FA map
EOF
exit 1
}
......@@ -59,11 +64,12 @@ cL="${#cmaps[@]}" # length of array for colourmap loop control
# Set defaults
thr=0.001
uthr=0.1
brain=${FSLDIR}/data/standard/FSL_HCP1065_FA_1mm.nii.gz
str=ALL
spec=""
while [ ! -z "$1" ];do
case "$1" in
-dir) dir=$2;shift;;
-species) spec=$2;shift;;
-str) IFS=', ' read -r -a str <<< "$2";shift;;
-thr) thr=$2;uthr=$3;shift;shift;;
-brain) brain=$2;shift;;
......@@ -81,13 +87,27 @@ elif [ ! -d $dir ];then
echo "Xtract folder $dir not found"
errflag=1
fi
if [ "$uthr" == "" ];then
echo "You have set a lower threshold but not an upper threshold. Must set '-thr' using <number> <number>"
if [ "$spec" == "" ];then
if [ "$brain" == "" ];then
echo "Must set compulsory argument '-brain' OR specify '-species <SPECIES>'"
errflag=1
fi
if [ `$FSLDIR/bin/imtest $brain` -eq 0 ];then
elif [ `$FSLDIR/bin/imtest $brain` -eq 0 ];then
echo "Brain overlay file $brain not found"
errflag=1
fi
elif [ $spec == HUMAN ];then
brain=${FSLDIR}/data/standard/FSL_HCP1065_FA_1mm.nii.gz
elif [ $spec == MACAQUE ];then
brain=${FSLDIR}/etc/xtract_data/standard/F99/mri/struct_brain.nii.gz
elif [ ! "$spec" == "HUMAN" ] && [ ! "$spec" == "MACAQUE" ];then
echo "Unrecognised option '$spec'. Must set '-species' using HUMAN or MACAQUE"
errflag=1
fi
if [ "$uthr" == "" ];then
echo "You have set a lower threshold but not an upper threshold. Must set '-thr' using <number> <number>"
errflag=1
fi
if [ "$errflag" -eq 1 ];then
echo ""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment