Skip to content

Commit

Permalink
Make even/odd checking use Pos_Neg_b0
Browse files Browse the repository at this point in the history
  • Loading branch information
coalsont authored Nov 16, 2023
1 parent 4ac3e5e commit 400e7f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DiffusionPreprocessing/DiffPreprocPipeline_PreEddy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ main() {

# if the number of slices are odd, check that the user has a way to deal with that
if [ "${EnsureEvenSlices}" == "false" ] && [ "${TopupConfig}" == "${HCPPIPEDIR_Config}/b02b0.cnf" ] ; then
dimz=$(${FSLDIR}/bin/fslval ${outdir}/topup/Pos_b0 dim3)
dimz=$(${FSLDIR}/bin/fslval ${outdir}/topup/Pos_Neg_b0 dim3)
if [ $(isodd $dimz) -eq 1 ]; then
log_Msg "Input images have an odd number of slices. This is incompatible with the default topup configuration file."
log_Msg "Either supply a topup configuration file that doesn't use subsampling (e.g., FSL's 'b02b0_1.cnf') using the --topup-config-file=<file> flag (recommended)"
Expand Down Expand Up @@ -533,7 +533,7 @@ main() {
fi

if [ "${EnsureEvenSlices}" == "true" ]; then
dimz=$(${FSLDIR}/bin/fslval ${outdir}/topup/Pos_b0 dim3)
dimz=$(${FSLDIR}/bin/fslval ${outdir}/topup/Pos_Neg_b0 dim3)
if [ $(isodd $dimz) -eq 1 ]; then
echo "Removing one slice from data to get even number of slices"
for filename in Pos_Neg_b0 Pos_b0 Neg_b0 ; do
Expand Down

0 comments on commit 400e7f1

Please sign in to comment.