Skip to content

error in tissue_priors.sh #29

@finnlennartsson

Description

@finnlennartsson

Just installed the the feature/MCRIB_integrated branch

When running mirtk neonatal-segmentation there seems to be a problem with the conditions in tissue_priors.sh as the $age were not properly passed on to the registration and the processing was terminated.

First, a first solution was to update the lines 59-60 from

    [ $age -lt $TEMPLATE_MAX_AGE ] || { age=$TEMPLATE_MAX_AGE; }
    [ $age -gt $TEMPLATE_MIN_AGE ] || { age=$TEMPLATE_MIN_AGE; }

to

    [ $age -lt $TEMPLATE_MAX_AGE ] || { $age=$TEMPLATE_MAX_AGE; }
    [ $age -gt $TEMPLATE_MIN_AGE ] || { $age=$TEMPLATE_MIN_AGE; }

and then it runs but still complains about something in this lines. Here is the relevant output

register-multi-atlas.sh sub-PK343_ses-MR1_run-001_T2w 40 10
running /home/finn/Software/DrawEM/build/MIRTK/Packages/DrawEM/scripts/tissue-priors.sh sub-PK343_ses-MR1_run-001_T2w 40 10
creating sub-PK343_ses-MR1_run-001_T2w tissue priors
/home/finn/Software/DrawEM/build/MIRTK/Packages/DrawEM/scripts/tissue-priors.sh: line 59: [: 40: unary operator expected
/home/finn/Software/DrawEM/build/MIRTK/Packages/DrawEM/scripts/tissue-priors.sh: line 59: 40=: command not found
/home/finn/Software/DrawEM/build/MIRTK/Packages/DrawEM/scripts/tissue-priors.sh: line 60: [: 40: unary operator expected
/home/finn/Software/DrawEM/build/MIRTK/Packages/DrawEM/scripts/tissue-priors.sh: line 60: 40=: command not found
mirtk register N4/sub-PK343_ses-MR1_run-001_T2w.nii.gz /home/finn/Software/DrawEM/build/MIRTK/Packages/DrawEM/atlases/non-rigid-v2/T2/template-40.nii.gz -dofout dofs/sub-PK343_ses-MR1_run-001_T2w-tissue-atlas-40-n.dof.gz -parin /home/finn/Software/DrawEM/build/MIRTK/Packages/DrawEM/parameters/ireg.cfg -threads 10 -v 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions