Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue about segmentation result with data including lesion-mask #267

Open
shz8012 opened this issue Sep 27, 2021 · 2 comments
Open

Issue about segmentation result with data including lesion-mask #267

shz8012 opened this issue Sep 27, 2021 · 2 comments

Comments

@shz8012
Copy link

shz8012 commented Sep 27, 2021

Hi,

I had a dataset of stroke patients(T1w, fmri, lesion-mask) and tried to run fmriprep to get structural and functional results.
Lesion-mask image was placed and named correctly.

When I checked the images of segmentation (e.g./.../fmriprep/sub-FCS029/anat/sub-FCS029_label-GM_probseg.nii.gz), I found that there were values in the voxels belonging to lesion-mask, as shown below (red is lesion-mask)
image

However, I would like to get segmentation results with voxels value of 0 at the location of lesion, like this:
image
(I used Atropos with mask to get this segmentation result, forgive me for forgetting to skull stripping)

Here were my question:

  1. In the workflow of fmriprep, was lesion-mask used in segmentation?
  2. Was the output of node fmriprep_wf.single_subject_FCS029_wf.anat_preproc_wf.brain_extraction_wf.atropos_wf.01_atropos the source of segmentation results?
  3. What nodes were lesion-mask used for ? (what I know was fmriprep_wf.single_subject_FCS029_wf.anat_preproc_wf.anat_norm_wf.registration)

Thanks!
shz8012

@effigies effigies transferred this issue from nipreps/fmriprep Sep 27, 2021
@effigies
Copy link
Member

To answer the questions, we'll need to know the version of fMRIPrep you were using. Your full command and a listing of our input dataset would also be helpful.

The segmentation results will be either FAST or FreeSurfer derived, depending on your command and version. The lesion mask is only currently used in normalization. It seems sensible to also use it in skull-stripping and segmentation; if you have example commands of how that would be done normally, that would be a great help.

@shz8012
Copy link
Author

shz8012 commented Sep 27, 2021

I am sorry about that.

Here is additional information:

  • fmriprep version: 20.2.1(docker)
  • command:
 fmriprep-docker \
/data/disk1/test/ \
/data/disk1/test_output \
--participant-label sub-FCS029 \
--cifti-output 91k --fs-license-file /opt/software/freesurfer/license.txt \
--use-aroma --user $(id -u):$(id -g) 
  • input data:
    image

  • segmentation command using lesion-mask:
    To exclude changes in parameters, I used the exact same command as in node
    fmriprep_wf.single_subject_FCS029_wf.anat_preproc_wf.brain_extraction_wf.atropos_wf.01_atropos

Atropos --image-dimensionality 3 --initialization KMeans[3] \
--intensity-image /scratch/fmriprep_wf/single_subject_FCS029_wf/anat_preproc_wf/brain_extraction_wf/inu_n4_final/mapflow/_inu_n4_final0/sub-FCS029_T1w_corrected.nii.gz \
--likelihood-model Gaussian \
--mask-image /scratch/fmriprep_wf/single_subject_FCS029_wf/anat_preproc_wf/brain_extraction_wf/atropos_wf/get_brainmask/tpl-OASIS30ANTs_res-01_label-brain_probseg_trans_resampled_maths_maths.nii.gz \
--mrf [0.1,1x1x1] --convergence [3,0] \
--output [sub-FCS029_T1w_corrected_labeled.nii.gz,POSTERIOR_%02d.nii.gz] --use-random-seed 1 

The only difference was that mask image that followed flag --mask-image is a mask that did not contain lesion region (the mask image like this):
image

I was looking forward to fmriprep taking more account of lesion data in the future!

Thanks
shz8012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants