populse / mia_processes

The default processes repository for mia
Other
1 stars 2 forks source link

[test] Compare CerebVascularReact CO2_inahalation pipeline to AMIGO #41

Closed manuegrx closed 3 months ago

manuegrx commented 1 year ago

Compare CerebVascularReact CO2_inahalation pipeline to AMIGO --> check on subject Alej

manuegrx commented 1 year ago

Comparison done on subject test alej170316 using the common physio regressor (not the individual one).

There are differences in the results obtain with MIA compare to the one obtains with AMIGO. The beta image are not exactly the same (different pixel values but they are close)

If we are looking the preprocessing data, they do not have exactly the same pixel values (see norm anat, smoothed func and mean func), so beta images can not be exactly the same

AMIGOvsMIA_alej (in this figure left : AMIGO and right: MIA)

Possible explanations:

Next step:

manuegrx commented 1 year ago

Version of SPM / matlab used for AMIGO (MAC) : spm12 (6409 2015-04-16 not standalone ) and matlab2015

Two different tests have been done:

Used T1 and functional data from AMIGO in MIA

For T1, "alej_test_std_anat_001.nii" image has been used. The image has been first reoriented using as_reoriented function from nibabel ( `t1.as_reoriented(np.array([[0, -1],[1, -1], [2, 1]])).

For functional data , the images "alej_test_stdhypc12***.nii" have been concatenated with concat_images from nibabel (with check_affines=False) and the output image has been reoriented as the T1.

For both data, voxel values are not the same as the one obtained with the conversion used in MIA (with mriconv).

Oriented data have been used as input for the C02_inhalation pipeline.

Result obtained in MIA are different from the result from AMIGO → differences in NIfTI conversion are not the only explanation

Used the preprocessed images from AMIGO in MIA

We use AMIGO's smoothed functional data, the realgments parameters and the mask_002 in MIA. For smoothed functional data, the "swralej_test_stdhypc12***.nii" images have been concatenated with concat_images from nibabel. C02_inhalation pipeline was adapted to remove all preprocessing: image

Voxel values of the beta images obtained with MIA are really close to the one obtained with AMIGO but they are not exactly the same → it could be due either the SPM version (and Matlab) ( or maybe to to a difference in default parameters for level one design brick)

image

TO DO

If the differences are explained only be the differences in the conversion and by SPM/matlab version, it seems to be useful to evaluate the impact on several subjects. It will be easier with the final report , so I propose to wait for this report before to continuing the comparison.

Maybe it will be also useful to check all the default parameters

servoz commented 3 months ago

With the same SPM, Matlab (License), general parameters (CVR_Reg == 'physio', Mov_Reg == 'Y', Art_Reg == 'N' in Amigo) for Mia and Amigo.

Impact of conversion.

The main difference with the target lies in the middle cerebral artery. Could there be an issue with the mask? To ensure accuracy, we will need to review and compare all the steps, and perhaps give more attention to mask production.

servoz commented 3 months ago

At this stage of the investigation, two differences remain:

servoz commented 3 months ago
servoz commented 3 months ago

After an in-depth study of the pipeline and the bricks that make it up, we were able to fix a number of issues, and today we have a result that is very close to that achieved at Amigo.

As an example, we can see that the IL from GLM are very similar and are now perfectly within the uncertainty range of the method: Mia2 Amigo2

A few differences remain, but these have been explained and can be corrected if necessary. In my opinion, at this stage, these differences do not influence the result sufficiently to make it a priority to implement changes that could lead to their removal.

These are:

We can ask ourselves whether these differences are more an improvement or a reduction in the quality of the data. At this stage I'm unable to say. Maybe the results in Mia are better than in Amigo ... or not!

The tests were carried out with a standard regressor (not the patient's) and without using ART (Artifact Detection Tools).

I think this ticket can now be closed. There are still a few things to be sorted out in the automatic report, but another ticket already exists for that (#67).