shimming-toolbox / susceptibility-to-fieldmap-fft

Fourier based method to estimate B0 variation induced by a susceptibility distribution.
GNU General Public License v3.0
2 stars 0 forks source link

Use `whole-spine` data to create susceptibility maps of the spine and the brain #6

Open NathanMolinier opened 3 months ago

NathanMolinier commented 3 months ago

Description

The objective would be to generate susceptibility maps of the spine and the brain using segmentations generated for the dataset whole-spine.

Current state

Currently, segmentations of the:

Are already available in our git-annexed version of the dataset. Additional segmentations of the brain will be created using the model wmh-synthseg.

Nilser3 commented 3 months ago

Brain multi-class segmentation

Here is a segmentation applying SynthSeg 2.0 model on T1w:

image

Command line:

mri_synthseg --i whole-spine/sub-amuAL/anat/sub-amuAL_T1w.nii.gz --o brain-seg/sub-amuAL_T1w_brain.nii.gz --robust

Inference time: ~19min per subject

So, do you agree that I apply this model on all whole-spine dataset (on T1w contrast) and store it in derivatives?

may be with this name? sub-amuAL_T1w_label-brain_dseg.nii.gz

Label intensity list :

image

from SynthSeg 2.0

feedback pls @NathanMolinier @jcohenadad

jcohenadad commented 3 months ago

Great! We also need the skull, fat, skin, muscles, cartilage, eyes-- is that possible?

NathanMolinier commented 3 months ago

sub-amuAL_T1w_label-brain_dseg.nii.gz

The name proposed seems to be fine, because i don't think we plan to split the labels into different files.

fat, muscles, cartilage is that possible?

For those, I think we should use the totalseg MRI, but I'm not sure for the rest.

Nilser3 commented 3 months ago

TotalSegmentatorMRI has 3 models for segment MRI data.

Here a test for the same subject:

  1. total_mr

image classes : here

  1. tissue_types_mr (available with a license)

image classes : skeletal_muscle.nii.gz , subcutaneous_fat.nii.gz , torso_fat.nii.gz

  1. face_mr (available with a license)

image classes : face.nii.gz

For skull and eyes:

We can explore mideface tool, here a result (cropping with dilation around brain_dseg.nii.gz) but we need to improve this processing

image

jcohenadad commented 3 months ago

hum... this is not very encouraging unfortunately 😞.

I'm wondering if we should manually segment what we need in a few subjects, and then fine-tune the total-segmentation-mri model. Do you think it would produce satisfactory results?

Nilser3 commented 3 months ago

With Samseg model we can also segment the skull and the face (partially), the only detail is that it also segments MS lesions (we will not take them into account)

image Inference time: ~15min per subject

jcohenadad commented 3 months ago

Hum, this is not very convincing... A lot of important tissue is not segmented.

I'm wondering whether we should do some manual segmentation of the skull, eyes and muscles in a few subjects (using threshold-based in-painting in Slicer, that should take a few hours) and then fine-tune the model. In the long term, that will probably save us time. Especially given that all our T1w images have the same contrast (ie: model "easy" to train).

Nilser3 commented 3 months ago

Agree, for threshold-based approach, with ExtractSkin.py script it is possible to do everything in Slicer.

image

jcohenadad commented 3 months ago

@CharlesPageot do you want to give it a try? @Nilser3 can help you navigate 3D Slicer segmentation modules

CharlesPageot commented 3 months ago

Yes for sure, I'll get familiar with the tool and give it a try!

CharlesPageot commented 2 months ago

Considering that the bottom of the images is very noisy, I focused on the head-neck region. Also, instead of a threshold-based approach, which requires a lot of manual correction, I used the 'Grow from seeds' tool to segment the body and the different air regions.

These are the general steps that I used for this first subject (sub-amuAL_T1w):

Label legend

legend Maybe we group all the labels except the body to make a single air region?

Air segments

air_segmented

Body without air

body_without_air

The whole process is about 20-30 min. If this seems correct, I'll proceed with a couple more subjects.

Nilser3 commented 2 months ago

Hi @CharlesPageot I am currently segmenting all whole-spine dataset with samseg

image the names-intinsities of the output labels can be known with FreeSurferColorLUT.txt file.

I will add these masks to the git-annex.

CharlesPageot commented 2 months ago

Perfect, thank you!

jaystock commented 3 weeks ago

I would be interested in helping adding tissue conductivity and permittivity to each compartment, to allow these models to be used for EM simulations such as pTx array and pulse design.

jcohenadad commented 3 weeks ago

I would be interested in helping adding tissue conductivity and permittivity to each compartment, to allow these models to be used for EM simulations such as pTx array and pulse design.

@jaystock these information should already be available in this other repos: https://github.com/shimming-toolbox/tissue-to-MRproperty. If not, they should be added there. Looping in @sriosq

sriosq commented 3 weeks ago

Hello @jaystock , I can add this 2 options as part of the repo mentioned by prof. Julien. I would only need a list of tissue types and their respective conductivity and permitivity.