pBFSLab / DeepPrep

DeepPrep: An accelerated, scalable, and robust pipeline for neuroimaging preprocessing empowered by deep learning
https://deepprep.readthedocs.io
Apache License 2.0
18 stars 6 forks source link

Manual editing of brain masks #155

Open JChRoy opened 2 weeks ago

JChRoy commented 2 weeks ago

Hi!

In DeepPrep documentation, it is specified that "the brain mask can be generated automatically and also be manually edited in this process."

Does it mean that we should store our own brain masks in "${subjects_dir}/${subject_id}/mri/brainmask.mgz" or should we edit the mri_mask arguments in the anat_brainmask process ?

Best, Jean-Charles

Ireneyou33 commented 1 week ago

Hi Jean-Charles,

It's better to edit the mri_mask argument in the ana_brainmask process based on your requirements/preferences.

Best, Irene

JChRoy commented 1 week ago

Hi Irene,

Thanks a lot!

Just out of curiosity: what would be the downsides of a manual edit of brainmask.mgz as described by Fastsurfer team in https://github.com/Deep-MI/FastSurfer/blob/dev/doc/overview/EDITING.md?

Best, Jean-Charles

Ireneyou33 commented 1 week ago

Hi Jean-Charles,

As FastSurfer detailed on their website, they incorporates manual edits and provides samples of possible edits. In contrast, DeepPrep does not support manual interventions. The FastSurfer option to "replace files and run pipeline agian" does not work for DeepPrep, as it does not re-run the pipeline with newly replaced files. Instead, DeepPrep skips all processes, as they are marked as 'completed' after the initial run.

Fortunately, DeepPrep is flexible in editing processes. If you wish to use your own file, e.g. brainmask.mgz, edit the command in the process and let the pipeline generates/copy-paste the file you need is the best choice. Also, for consistency, it is advisable to replace the dependent files as well, which are nu.mgz and mask.mgz in this case, as brainmask.mgz is generated based on them.

If needed, you can also create your own process and add it to deepprep.nf.

I hope my explaination helps you a bit.

Best, Irene

JChRoy commented 1 week ago

Hi Irene,

It makes perfectly sense. Thank you!

Best, Jean-Charles