CoBrALab / RABIES

fMRI preprocessing pipeline and analysis tools adapted for rodent images. Visit the full documentation at https://rabies.readthedocs.io/en/stable/
Other
35 stars 14 forks source link

Include SIGMA template in RABIES for -rat preprocessing. #255

Open grandjeanlab opened 1 year ago

grandjeanlab commented 1 year ago

Lots of potential rat RABIES users. would be great to facilitatet this workflow.

I suggest shipping RABIES with SIGMA template (some SIGMA assets need to be tweaked for rabies, e.g. binary WM/VEN/VASC masks).

@David Barriere. Thoughts?? Need to consider license, automatic template download (currently SIGMA download requires login credentials which might break RABIES image creation), and tailored assets (binary masks).

DavidBarriere commented 1 year ago

@grandjeanlab I fully agree to include SIGMA definitely in RABIES. I need to discuss the licence with the relevant departments and colleagues. As RABIES is an open source processing pipeline, it won't be a matter of debate.

My thoughts : If other more precise masks are required, (I understand for white matter and vascular it's correct ?), I think additional works would be needed.

1/ Regarding better mask of WM, I am happy to tell you that FA, ADC, B0 and RGB templates are available within the SIGMA space from the initial samples and could be used to define more accurate masks of WM in a V2 release of SIGMA which will be release in mid-2023.

2/ if you think about creating vascular masking and/or vascular mapping (and why not a vascular atlas ?) some 3D-fUS or/and MR 3D-TOF data should be required to process a population-based mask, template and finally atlas. I am interested to create such tools, which could be very usefull for future especially for fUS data normalization and analysis. Additional raws data are needed here, but it is feasible with a good approach. If Raw data are multicentic = jackpot !

If additional resources are needed, please let me know.

Gab-D-G commented 1 year ago

Hi both of you, thanks for the input! I'd be happy to include SIGMA as a --rat_atlas option.

For clarification, the WM,CSF and vascular masks are optional, so that does not have to hold us off in implementing at least a first version lacking those masks. The consequences are that these masks then cannot be used for confound regression, and a CSF mask is necessary for ICA AROMA. For the sake of running preprocessing, they can be replaced with the brain mask. If masks then become available later, they can be easily integrated, and I welcome contributions/propositions for which masking strategy would benefit the workflow.

I will need instructions for downloading the template similarly to https://github.com/CoBrALab/RABIES/blob/master/scripts/install_DSURQE.sh, or I welcome pull requests if one of you can write it yourself.

grandjeanlab commented 1 year ago

quickly re-masks, most masks are incl in SIGMA already (except vascular, which is a relic of grandjean et al. Neuroimage 2020), they only need to be binarized with a sensible threshold.

DavidBarriere commented 1 year ago

After talking with my colleagues and institutions no problem to include SIGMA in rabies. Regarding the CSF I am agree that binarization of the CSF prior in SIGMA with a correct threshold to include broadlly the ventricules is a good option to deliver a good CSF mask. I am more puzzled to use a similar approach for WM. As I discussed in the SIGMA paper, the WM prior embedd the thalamus because of the myelin content of thalamus, which drags the contrast of thalamic voxels to the WM cluster over the segmentation process. So a simple binarization with the actual WM prior would include thalamus and regressing the thalamic signal is not a good idea for a large range of paragdims. To solve this, a WM mask could be created using a combination of binarized ROIs of WM such as corpus callosum, anterior comissure, etc. which could be isolated from the SIGMA Atlas to provide an accurate WM mask. I can do this little work and provide you the masks of WM and CSF but I need to know at which resolution you need them.

Regarding the instruction for downloading the template, may I just send it to you Gabriel ?

gdevenyi commented 1 year ago

Hi @DavidBarriere sorry for losing this thread, we'll be happy to have instructions/files posted here in the list, or you can send us a private email. Do you plan to distribute these newly generated items, or will we just do it for our purposes?

I can do this little work and provide you the masks of WM and CSF but I need to know at which resolution you need them.

We'll have them at whatever your standard resolution is for the atlas, the pipeline has the features to resample everything internally.

DavidBarriere commented 1 year ago

Hello Gabriel, Sorry for the delay, we were under evaluation by the ministry these last weeks. Yes I planed to distribute the SIGMA V2 under the same conditions as the V1 (NITRC).

I can send you the SIGMA V2 for a direct integration of the best version of the SIGMA in RABIES. By email ?

D

gdevenyi commented 1 year ago

Yes, we're happy to accept a copy with documentation whatever way you prefer. @Gab-D-G will likely be the one to integrate :+1:

colon-perez commented 1 year ago

Any update on this? I am trying to specify SIGMA but I get this error

raise ValueError(f"--anat_template file {opts.anat_template} doesn't exists.") ValueError: --anat_template file /home/SIGMA_Wistar_Rat_Brain_TemplatesAndAtlases_Version1.2.1/SIGMA_Rat_Anatomical_Imaging/SIGMA_Rat_Anatomical_InVivo_Template/SIGMA_InVivo_Brain_Template.nii doesn't exists.

Do I have to save it somewhere specific or how should I specify to use the rat templates with RABIES?

gdevenyi commented 1 year ago

Please open your own issue and fully describe what you're attempting. As far as we know externally specified atlases work properly.