Atlas-based segmentation from MRI scans

155 views
Skip to first unread message

benseal...@gmail.com

unread,
Jun 9, 2020, 8:16:57 AM6/9/20
to Deformetrica
Hello,

I would like to segment MRI fetal scans of the brain using an atlas. I already reconstructed my MRI scans to an high definition volume and I have a fetal-brain atlas with my tissues of interest. Now, I need to segment the scans using my atlas and I think that Deformetrica is a suitable tool. However, I don't know exactly how to proceed. 

More precisely, I have my reconstructed image to segment as a nifty volume: "Image_to_segment.nii.gz", my atlas image as a nifty volume "Atlas_image.nii.gz" and my atlas image with the labels "Atlas_image_labelled.ni.gz". I work on Ubuntu 18.04 and I already installed Deformetica.

How could I know proceed to segment my images using Deformetica?

Thanks in advance,

Kind regards,

Alexandre Bense

Alexandre Bône

unread,
Jun 11, 2020, 2:52:05 AM6/11/20
to Deformetrica
Hello Alexandre, 

Thank you for your interest. 

You now need to compute the registration of Image_to_segment.nii.gz to Atlas_image.nii.gz. See https://gitlab.com/icm-institute/aramislab/deformetrica/-/wikis/2_tutorials/2.1_registration. You will obtain a deformed version of your atlas that (hopefully) matches your image to segment. 
I have never tried to register fetal-brain scans. Very interesting project ! 

Best, 
Alex 

benseal...@gmail.com

unread,
Jul 20, 2020, 12:38:06 PM7/20/20
to Deformetrica
Hello Alexandre, 

Thank you for your answer and for deformetrica, which is an amazing tool.

After solving some constrast issues, I exactly used your method and it worked. More precisely, after the registration my Atlas_image.nii is accurately deformed to match my Image_to_segment.nii. 

However, I do not know how to proceed to apply the same deformation to my Atlas_image_labelled.nii, which only contains labels from the different brain areas. With my deformed Atlas_image_labbelled.nii, I could then segment my images.

How should I proceed to solve this issue?

Thanks in advance.

Best,
Alexandre

Alexandre Bône

unread,
Jul 21, 2020, 9:07:38 AM7/21/20
to Deformetrica
Hello Alexandre,

Great to hear that your registration worked. 

I think what your are looking for is the shooting procedure (see https://gitlab.com/icm-institute/aramislab/deformetrica/-/wikis/2_tutorials/2.6_shooting). 
Unfortunately, only trilinear interpolation is available for now, when I think you would ideally need nearest neighbor interpolation in your case (if your atlas contains more than one label, say K). As a workaround, I would advise to perform K individual shootings of your atlas, represented in a one-hot fashion. 

Best, 
Alex



benseal...@gmail.com

unread,
Jul 22, 2020, 11:32:49 AM7/22/20
to Deformetrica
Hello Alexandre,

I followed your advice and tried to shoot only one label. First, it's important to notice that I ran the shooting example and everything worked fine.

Then, I tried to shoot my label_image.nii with only one label. To do so, I took the model.xml from the example and I changed the object type as Image instead of Surface Mesh. Of course, I also changed the template, the control points and the momenta. Then I used the order "deformetrica compute model.xml" and I obtained an output file. However, I got the error "Intel MKL ERROR: Parameter 1 was incorrect on entry to vsExp" and my output images weren't deformed. 

Did I miss something?

Thanks in advance,

Best,
Alexandre

Alexandre Bône

unread,
Jul 23, 2020, 11:03:05 AM7/23/20
to Deformetrica
Hello Alexandre, 

Could you please give me the whole console log ? 

Best, 
Alex 

benseal...@gmail.com

unread,
Jul 23, 2020, 6:11:52 PM7/23/20
to Deformetrica
Hello Alex,

Here it is:

(deformetrica) alexandre.bense:~/Downloads/deformetrica$ deformetrica compute model.xml 
Logger has been set to: WARNING
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.

Intel MKL ERROR: Parameter 1 was incorrect on entry to vsExp.

Intel MKL ERROR: Parameter 1 was incorrect on entry to vsExp.

Intel MKL ERROR: Parameter 1 was incorrect on entry to vsExp.

Intel MKL ERROR: Parameter 1 was incorrect on entry to vsExp.

Intel MKL ERROR: Parameter 1 was incorrect on entry to vsExp.

Intel MKL ERROR: Parameter 1 was incorrect on entry to vsExp.

Intel MKL ERROR: Parameter 1 was incorrect on entry to vsExp.

Intel MKL ERROR: Parameter 1 was incorrect on entry to vsExp.

Intel MKL ERROR: Parameter 1 was incorrect on entry to vsExp.

Intel MKL ERROR: Parameter 1 was incorrect on entry to vsExp.
(deformetrica) alexandre.bense:~/Downloads/deformetrica$

Best,
Alexandre

Alexandre Bône

unread,
Jul 24, 2020, 3:54:09 AM7/24/20
to Deformetrica
Hello Alexandre,

Indeed, this is not super helpful. 

Could you try to perform your shooting, but using your reference atlas image (the one you used to estimate the registration model) instead of the label image ? 
If this does not work, could you please try to run the image shooting example https://gitlab.com/icm-institute/aramislab/deformetrica/-/tree/master/examples/shooting/image/2d/snowman ?

Best, 
Alex 

benseal...@gmail.com

unread,
Jul 24, 2020, 6:13:21 AM7/24/20
to Deformetrica
Hello Alex,

With the reference atlas image the shooting is also not working and the image (Nifti format) is not deformed. Thus I tried with the image shooting example and for once the shooting is working and the snowman (PNG format) is well deformed. Perhaps the problem is coming from the Nifti format.

Best,
Alexandre


Reply all
Reply to author
Forward
0 new messages