Mp2rage in BIDS and FMRIPREP

Hello,

I have three mp2rage files (2 with different inversion times, and 1 UNI). I have two questions:

  1. How do I incorporate these into the BIDS structure?
  2. Can FMRIPREP use mp2rage images for skull stripping and segmentation? If so, does it use the raw (inversion) images or the UNI image?

I looked for answers on online discussions/forums but didn’t find anything conclusive. The discussions were also > 6 months ago so maybe BIDS and FMRIPREP have been updated since then…?

Thanks so much!

Best,
Anuya

Hi Anuya !

At this point, MP2RAGE has not yet been merged into the official BIDS specification-- it’s in the drafted Structural Acquisitions with Multiple Contrasts extension proposal, available here.

Because of that, FMRIPREP won’t use the images (to the best of my knowledge, though @ChrisGorgolewski, @oesteban would know best).

I believe that there was a brief meeting at OHBM to discuss the extension proposal (@KirstieJane was there, if I recall correctly), though I’m not sure what updates came out of that. Generally, if you’re using MP2RAGE in your research, it would be great to have your comments on the drafted specification !

Best,

Elizabeth

1 Like

YES! - Exactly as @emdupre said - @anuyapatil, it would be incredibly helpful if you could have a look through the BEP 001 extension and see if your data can fit into that proposal.

I wrote up a few notes about our in person meeting at OHBM here. Let me know if you have any questions :sparkles:

1 Like

Thanks for the clarification. I had found it in the BIDS Extension proposal but wasn’t sure if there were any updates on that. This is also my first time with mp2rage but once I get comfortable with it, I would add comments to the draft.

Thanks for all your help!

2 Likes

If you name your files according to BEP001 FMRIPREP will pick up the T1w, but it will treat it like any other T1 weighted image. Unfortunately the unusual structure of noise created by MP2RAGE it will most likely fail at skullstripping. If you have experience in working with MP2RAGE images (especially robust skullstripping) we would love your help adding this feature to FMRIPREP.

This is a bit strange. Normally this sequence produces four files - T1 weighted, T1 map, and two inversion maps.

well the T1 map is not always there, this depends on the license on the siemens console

About mp2rage, the way we process it, is to compute the the brain mask with the second inversion time, and then we report the mask on the UNI volume and we run freesurfer on the masked image

Cheers

The best way to deal with the noise structure in MP2RAGE images is to get rid of it - see http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0099676

Sadly, the Siemens product recon does not include this. If you have the two inversion times as complex images (mag/phase or real/imaginary), then I’ve implemented the robust method here: https://github.com/spinicist/QUIT/blob/mt/Source/Relaxometry/qimp2rage.cpp

nipype interface coming soon…

1 Like

I guess some of you are aware of this but…

I have not used it yet but I am fairly sure that the CBS tools (http://www.cbs.mpg.de/institute/software/cbs-tools) include a module to get rid of the noise in the MP2RAGE and the nighres implemetation of the toolbox also include the skull stripping module (https://nighres.readthedocs.io/en/latest/brain/mp2rage_skullstripping.html).

Maybe this could help.

1 Like

Hi @anuyapatil

Could you update me with how you dealt with the MP2RAGE data?

Currently, I have a dataset with INV1, INV2,and UNI images, and I’m looking to use fMRI Prep v1.2.5.

Thank you for your help in advance :slight_smile:

Cheers!

This is still an unresolved issue: https://github.com/poldracklab/smriprep/issues/18. Any help would be more than welcomed.

Hi @TribikramT

I am no longer using mp2rage. But when I tried my hand at it as part of a pilot project, I was having trouble skull stripping. Nighres didn’t do a good job, and getting the brainmask from INV2 and applying it to UNI still left some noise around the meninges.

If you find a better way, please let us know!

1 Like

Hi @anuyapatil, and @ChrisGorgolewski

Thank you for your replies.

I am currently collecting some pilot data, and will keep you posted if I figure out how to deal with mp2rage data.

Cheers!

Hi @ChrisGorgolewski and @emdupre

Just wondering about fMRIPrep handling MP2RAGE data.

Currently, we’re acquiring a T1_INV1, T1_INV2, and a T1_UNI image. Seeing that fMRI prep doesn’t handle MP2RAGE data, what we’ve done is:

i) Used N4BiasFieldCorrection on the T1_INV2 image

ii) Used BET to get a mask from the image from step (i)

iii) Applied the outskin_mask from step (ii) to the T1_UNI image

iv) And fed the image from step (iii) as the T1w.nii.gz to fMRIPrep.

When doing these steps, what we’ve noticed is that while fMRIPrep accepts the newly formed T1w.nii.gz image well, it struggles with skull-stripping i.e., the borders don’t get the full brain. Therefore, we were wondering whether it was possible to feed in a skull-stripped T1w.nii.gz image to fMRIprep instead, disable skull-strip in fMRIPrep, and run the rest of the preprocessing steps as normal.

Thank you.

Cheers,
Thapa

This is not possible ATM

What version of fMRIPrep you are using?

I’m using fMRIPrep v1.2.5

Could you give a quick go to fmriprep-1.4.0? We’ve improved brain extraction and it may work out for you now.

2 Likes

I wrote a Docker image for our lab that we use to preprocess MP2RAGE images in such a way that they look a bit more like traditional MPRAGE images that fmriprep can handle.

Might be of interest to some of you:
https://github.com/VU-Cog-Sci/mp2rage_preprocessing

In my experience, at submillimeter resolution, manual editing, especially the removal of the sagital sinus, is strictly necessary.

3 Likes

Hi @oesteban,

I had a go with fMRIPrep v1.4.0, and here are the results when compared to v1.2.5. It seems I’m getting the same error (see green arrows in the see images below).

Hi @Gilles_de_Hollander

Thank your for the link. I will give it a go and keep you posted.

Thank you.

Cheers,
Thapa

Any updated recommendations?
@oesteban
@TribikramT
Many thanks

Not really, the only change since these messages were posted is that now fMRIPrep allows you to feed a skull-stripped T1w image (there’s an argument to indicate this, please check the usage documentation because I don’t remember it on top of my head). So, you potentially can skull-strip the MP2RAGE on your own and pass that into fMRIPrep. Please let us know if that worked out.