CPAC - WM and GM masks problem

Hello,

I am new to fMRI data analysis and I would like to ask a question about the quality of the masks I am obtaining.

I run CPAC on a patient using the default parameters, and opening the files

space-MNI152NLin6ASym_label-GM_mask.nii.gz (see the GIF below)

sub-paziente1-ses-1-space-MNI152_WM

and

space-MNI152NLin6ASym_label-WM_mask.nii.gz (see the GIF below)

sub-paziente1-ses-1-space-MNI152_GM

I noticed that both of them present some parts that shouldn’t be there, like parts of the skull.

However, if for example I look at the (functional) image task-func1_space-MNI152NLin6ASym_reg-default_desc-smZstd1_reho.nii.gz

the artifact are not present and it seems there is nothing wrong with it.

Nonetheless, since we have the idea of doing a similar preprocessing to an entire dataset of images, and thus a control for each generated output is not feasible, I wanted to ask whether there is an automatic way of checking this masks in order to understand if CPAC worked well, producing masks without artifacts.

Also, is there any way to know if these kinds of artifacts can affect the analysis outputs?

I thank you in advance for your help!

Hi, thank you for reaching out!

I know you said you used default settings, but could you provide your pipeline file just so I can see? The non-skullstripped image should not be going through segmentation, so there might be an issue with the skullstripping settings.

I wanted to ask whether there is an automatic way of checking this masks in order to understand if CPAC worked well, producing masks without artifacts.
Also, is there any way to know if these kinds of artifacts can affect the analysis outputs?

We have a few QC outputs that can be configured under output_directory > quality_control > generate_quality_control_images, although these qc measures don’t provide visualizations of the tissue masks. The best way to ensure they are being created properly is to visualize them when processing completes. And yes, if segmentation isn’t working properly then this can definitely affect the outputs.

Thank you for your reply!

You find attached the pipeline file
pipeline_config.txt (69.8 KB)

Hi, sorry for the delay! Everything looks good with the skullstripping settings. Could you also post your skull-stripped brain? It will be called either desc-preproc_T1w or desc-brain_T1w. I would like to see if there are still sections of skull after masking.

Hi, no worries! Thank you for your help.

You find below the image you requested.

space-MNI152NLin6ASym-desc-preproc_T1w
space-MNI152-desc-preproc_T1w

Let me know if it was what you were asking for or you meant some other image.

Interesting, it looks like skullstripping didn’t run for the T1. Are there any crash files in your /log folder?

Hi! There are no crash files. In the log folder we have these files: