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

Functional outputs (brain mask and T1w) #123

Open vascosa opened 2 months ago

vascosa commented 2 months ago

Greetings,

I was wondering if I'd be useful to make BOLD T1w-space outputs optional, as they are generated even when another output space is defined. The only reason would be to save space.

In a related note, the BOLD brain-mask file is only generated T1w space even when the defined output space is the default, for example. For now I am just applying the transform to the T1w space mask, but I reckon this should be generated in the intended output space.

Let me know if you agree and if you want any assistance with implementing these changes.

NingAnMe commented 2 months ago

Hi, @vascosa, We're working on fixing this problem. In the future, the output space users expect will replace the default output space, instead of adding more space on top of the default.

NingAnMe commented 2 weeks ago

Hi, @vascosa,

We still need T1w space data to calculate confounds in the new version(24.1.0). Therefore, T1w space data is retained. Moreover, in DeepPrep the T1w space is the same as Recon space. So, we can resample the masks in the Recon result to 2mm to fit the T1w space data. This is commonly used in individualized analysis.

Perhaps we can default the output to the temporary directory, and then move it to the result directory if needed.

vascosa commented 2 weeks ago

Hi,

I think the solution of only moving to the results directory is good. I'm actually more concerned with not getting the brain mask in the MNI space, as I would like to be able to mask subjects in the target space without having to use a template mask or manually applying the transform to the T1 mask.

In fact, could you point me towards how to apply the transform to the T1w-space mask. Some transform involving this file I suppose (sub-XXX_from-T1w_to-MNI152NLin6Asym_desc-joint_trans.nii.gz)?

Cheers, Vasco