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

[antsBrainExtraction.sh] Output directory ignored when using "-q" argument. #1519

Closed
mathdugre opened this issue Mar 29, 2023 · 2 comments
Closed

Comments

@mathdugre
Copy link
Contributor

Describe the problem

Running antsBrainExtraction.sh with the -q flag ignores the -o flag.

To Reproduce

Execution without the -q create the output folder as expected.

$ TMPLT="/opt/templates/OASIS"
$ DATASET="LMU_2"
$ SUBJECT_ID="0025362"
$ antsBrainExtraction.sh \
>  -d 3 \
>  -a /data/input/sub-${SUBJECT_ID}/ses-1/anat/sub-${SUBJECT_ID}_ses-1_run-1_T1w.nii.gz \
>  -e ${TMPLT}/T_template0.nii.gz \
>  -m ${TMPLT}/T_template0_BrainCerebellumProbabilityMask.nii.gz \
>  -o /data/output/${DATASET}/sub-${SUBJECT_ID}/

Will run Atropos segmentation with K=3. Classes labeled in order of mean intensity. Assuming CSF=1, GM=2, WM=3

The output directory "/data/output/LMU_2/sub-0025362" does not exist. Making it.

With the -q flag, it create a temporary folder in the current directory. Then it fails to run.

$ TMPLT="/opt/templates/OASIS"
$ DATASET="LMU_2"
$ SUBJECT_ID="0025362"
$ antsBrainExtraction.sh \
>  -q \
>  -d 3 \
>  -a /data/input/sub-${SUBJECT_ID}/ses-1/anat/sub-${SUBJECT_ID}_ses-1_run-1_T1w.nii.gz \
>  -e ${TMPLT}/T_template0.nii.gz \
>  -m ${TMPLT}/T_template0_BrainCerebellumProbabilityMask.nii.gz \
>  -o /data/output/${DATASET}/sub-${SUBJECT_ID}/

Will run Atropos segmentation with K=3. Classes labeled in order of mean intensity. Assuming CSF=1, GM=2, WM=3

The output directory "/path/to/working/directory//tmp20758/" does not exist. Making it.
---------------------  Running antsBrainExtraction.sh on hostname  ---------------------

--------------------------------------------------------------------------------------
 Bias correction of anatomical images (pre brain extraction)
   1) pre-process by truncating the image intensities
   2) run N4
--------------------------------------------------------------------------------------

Expected output was not produced.  The N4 corrected image doesn't exist:

System information (please complete the following information)

  • OS: ubuntu
  • OS version: focal-20221019
  • Type of system: Docker container

ANTs version information

  • ANTs code version:
$ antsRegistration --version
ANTs Version: v2.4.2.post12-gf022d4f
Compiled: Nov 28 2022 21:17:54
  • ANTs installation type: Compiled from source in a Docker container using f022d4f
@cookpa
Copy link
Member

cookpa commented Mar 29, 2023

Try -q 1

@mathdugre
Copy link
Contributor Author

That did the trick. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants