brainlife / app-freesurfer

Freesurfer segments the t1w anatomical data into functionally different parts of the brain. Segmentation/parcellation can then be fed to many other subsequent analysis.
https://doi.org/10.25663/bl.app.0
8 stars 4 forks source link

The -cw256 flag seems to be ignored in version 7.1.1 #11

Closed giulia-berto closed 2 years ago

giulia-berto commented 2 years ago

The -cw256 flag seems to be ignored in version 7.1.1 when running FreeSurfer with highres option, see also https://www.mail-archive.com/freesurfer@nmr.mgh.harvard.edu/msg70337.html. Running qatools.py in a subshell doesn't seem to solve the issue. We may try to use the new FreeSurfer release 7.3.2.

giulia-berto commented 2 years ago

@giulia-berto

soichih commented 2 years ago

Running qatools.py under subshell will fix the underlying issue. It just makes the qatools.py step to be optional. By the way, the qatools.py seems to be generating output image in .png format (not .jpg) We need to update freesurfer.sh to look for output.png. @giulia-berto would you like to update it?

giulia-berto commented 2 years ago

I ran a test, and even if qatools.py ran in a subshell, the job failed with the same error: IndexError: index 260 is out of bounds for axis 2 with size 256. Sure, I can update it, can you give me writing access to this repository?

soichih commented 2 years ago

Sorry, I meant to say "will not fix the underlying issue".

You should be able to read/write to this repo now.

giulia-berto commented 2 years ago

Patched with

(
echo "running qatools.sh to generate qa image"
qatools.py --subjects_dir freesurfer --screenshots --subjects output --output_dir qa
) || echo "failed to run qatools"

for now. At least the job will end successfully (even though qatools.py will fail with the -cw256 flag).