samuelstjean / autodmri

Automated characterization of noise distributions in diffusion MRI data
MIT License
6 stars 2 forks source link

How to apply autodmri #3

Closed rosella1234 closed 4 years ago

rosella1234 commented 4 years ago

Hi, I am new to autodmri. I would like to know which is the way I can apply it to my diffusion dataset in order to know which is the noise distribution. Thank you, Rosella

samuelstjean commented 4 years ago

Hello,

It mostly depends on the type of you data, but for example if you have traditional 2D axial slices and a bunch of DWIs, the easiest way could be to measure the distribution for each slice separately like this

get_distribution data.nii.gz sigma.nii.gz N.nii.gz mask.nii.gz -v

the output file sigma and N contains the parameters of the distribution while mask contains the identified voxels belonging to that distribution. If you want to play with some examples the old data is used it over here https://zenodo.org/record/2483105.

The usage is slightly different of you have measured noise maps, but the help should indicate the correct options to use

rosella1234 commented 4 years ago

Ok. Thank you. her eis an example of data from one of the subjects of my study. Best regards, Rosella data.nii https://drive.google.com/file/d/1IdkNOLbcxJIOQGvHE1YwuEevh3QuM9Md/view?usp=drive_web

Il giorno mer 4 dic 2019 alle ore 11:37 Samuel St-Jean < notifications@github.com> ha scritto:

Hello,

It mostly depends on the type of you data, but for example if you have traditional 2D axial slices and a bunch of DWIs, the easiest way could be to measure the distribution for each slice separately like this

get_distribution data.nii.gz sigma.nii.gz N.nii.gz mask.nii.gz -v

the output file sigma and N contains the parameters of the distribution while mask contains the identified voxels belonging to that distribution. If you want to play with some examples the old data is used it over here https://zenodo.org/record/2483105.

The usage is slightly different of you have measured noise maps, but the help should indicate the correct options to use

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/samuelstjean/autodmri/issues/3?email_source=notifications&email_token=AN42AZMMBCLUBIJ65PSVNTTQW6B6LA5CNFSM4JTSM63KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEF4RIAY#issuecomment-561583107, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN42AZKQZAAZIU2U7XVZ2M3QW6B6LANCNFSM4JTSM63A .

--

Rosella Trò Ph.D Student in Bioengineering

System Neuroscience Perceptual System and Imaging Group -SyNaPSI

Department of Informatics Bioengineering Robotics and Systems engineering -DIBRIS

University of Genoa

Via All'Opera Pia 13, 16145, Genova, Italy E-mail: rosella.tro@edu.unige.it

samuelstjean commented 4 years ago

It looks like your data is already masked and motion corrected. As interpolation changes the distribution, you probably want to restart from the raw dicoms to compute and store the values before going on with the rest of your processing though.

rosella1234 commented 4 years ago

Ok , so I also have unprocessed data. An example is in the link below. However, if I give the get_distirbution command both sigma and N result black images. Thank you, Rosella unproc_3T.nii.gz https://drive.google.com/file/d/1plZso7NFun_Ky0z6HqoPIe6SymYIeoel/view?usp=drive_web

Il giorno mer 4 dic 2019 alle ore 16:29 Samuel St-Jean < notifications@github.com> ha scritto:

It looks like your data is already masked and motion corrected. As interpolation changes the distribution, you probably want to restart from the raw dicoms to compute and store the values before going on with the rest of your processing though.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/samuelstjean/autodmri/issues/3?email_source=notifications&email_token=AN42AZL6NIIWBZHKARBV4ETQW7EGZA5CNFSM4JTSM63KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEF5M4VQ#issuecomment-561696342, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN42AZLSLN6VYW6H3ML6QJLQW7EGZANCNFSM4JTSM63A .

--

Rosella Trò Ph.D Student in Bioengineering

System Neuroscience Perceptual System and Imaging Group -SyNaPSI

Department of Informatics Bioengineering Robotics and Systems engineering -DIBRIS

University of Genoa

Via All'Opera Pia 13, 16145, Genova, Italy E-mail: rosella.tro@edu.unige.it

samuelstjean commented 4 years ago

It may just be a viewer/normalisation thing. As it estimates slices per slices (in axial by default), changing the view will show you the values. You can also look at the mask to see the identified voxels, if this one is also completely black, then there is a problem somewhere indeed.

This is what I get in fact, seems decent I'd say. So each slice is it's own distribution, and the voxels identified as belonging to that distribution have a value of 1 in the mask file. I'm using my latest master, so if you get blank files then either I fixed something I forgot about or your combination of version/software/etc. does weird stuff, in which case fault is on me I guess.

For the moments

Screenshot from 2019-12-05 09-42-23 Screenshot from 2019-12-05 09-42-25 Screenshot from 2019-12-05 09-42-26

For the maximum likelihood

Screenshot from 2019-12-05 09-42-44 Screenshot from 2019-12-05 09-42-45 Screenshot from 2019-12-05 09-42-47

rosella1234 commented 4 years ago

Hi. So, here are my files from computing distribution on unprocessed data. I can just see something on the mask image. Is then correct to apply get_distribution on volumetric data and not on single slices? Thank you, Rosella

Il giorno gio 5 dic 2019 alle ore 09:47 Samuel St-Jean < notifications@github.com> ha scritto:

It may just be a viewer/normalisation thing. As it estimates slices per slices (in axial by default), changing the view will show you the values. You can also look at the mask to see the identified voxels, if this one is also completely black, then there is a problem somewhere indeed.

This is what I get in fact, seems decent I'd say. So each slice is it's own distribution, and the voxels identified as belonging to that distribution have a value of 1 in the mask file. I'm using my latest master, so if you get blank files then either I fixed something I forgot about or your combination of version/software/etc. does weird stuff, in which case fault is on me I guess. For the moments

[image: Screenshot from 2019-12-05 09-42-23] https://user-images.githubusercontent.com/3030760/70218758-e62a4900-1743-11ea-8d9d-c270b5721603.png [image: Screenshot from 2019-12-05 09-42-25] https://user-images.githubusercontent.com/3030760/70218759-e6c2df80-1743-11ea-89bb-06d6e978a0ae.png [image: Screenshot from 2019-12-05 09-42-26] https://user-images.githubusercontent.com/3030760/70218761-e6c2df80-1743-11ea-8025-18aa0a7925e3.png For the maximum likelihood

[image: Screenshot from 2019-12-05 09-42-44] https://user-images.githubusercontent.com/3030760/70218785-f3dfce80-1743-11ea-8482-8e5b216426fc.png [image: Screenshot from 2019-12-05 09-42-45] https://user-images.githubusercontent.com/3030760/70218786-f3dfce80-1743-11ea-9331-a9dda6697471.png [image: Screenshot from 2019-12-05 09-42-47] https://user-images.githubusercontent.com/3030760/70218787-f3dfce80-1743-11ea-9f71-b4c15d7c1308.png

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/samuelstjean/autodmri/issues/3?email_source=notifications&email_token=AN42AZNCHUF4LOU3TAQB3NLQXC52NA5CNFSM4JTSM63KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEF76RTA#issuecomment-562030796, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN42AZP2PUQ7DT6UZEED23LQXC52NANCNFSM4JTSM63A .

--

Rosella Trò Ph.D Student in Bioengineering

System Neuroscience Perceptual System and Imaging Group -SyNaPSI

Department of Informatics Bioengineering Robotics and Systems engineering -DIBRIS

University of Genoa

Via All'Opera Pia 13, 16145, Genova, Italy E-mail: rosella.tro@edu.unige.it

samuelstjean commented 4 years ago

It's not wrong per say, but it will assume that your whole volume in 4D (or in 3D if you do them separately, but that one would like make less sense) is in fact the same distribution. In that case, then your mask would be similar to my pictures, but yes your whole volume would be a single value.

Seems like you forgot to attach the files though, I can't see them somehow.

rosella1234 commented 4 years ago

Here are the files, Sorry, Rosella

Il giorno gio 5 dic 2019 alle ore 11:41 Samuel St-Jean < notifications@github.com> ha scritto:

It's not wrong per say, but it will assume that your whole volume in 4D (or in 3D if you do them separately, but that one would like make less sense) is in fact the same distribution. In that case, then your mask would be similar to my pictures, but yes your whole volume would be a single value.

Seems like you forgot to attach the files though, I can't see them somehow.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/samuelstjean/autodmri/issues/3?email_source=notifications&email_token=AN42AZK6WXIWAUVPDMCNZGLQXDLHFA5CNFSM4JTSM63KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGAJCUQ#issuecomment-562073938, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN42AZN5DMNTMXFDIJNKBSTQXDLHFANCNFSM4JTSM63A .

--

Rosella Trò Ph.D Student in Bioengineering

System Neuroscience Perceptual System and Imaging Group -SyNaPSI

Department of Informatics Bioengineering Robotics and Systems engineering -DIBRIS

University of Genoa

Via All'Opera Pia 13, 16145, Genova, Italy E-mail: rosella.tro@edu.unige.it

samuelstjean commented 4 years ago

Still nothing, it may be because you are replying to a github email and not me directly, you could try writing me instead to see.

rosella1234 commented 4 years ago

Hi I am a PhD student working on DKI and DTI maps comparison between 3T and 7T with data from HCP. In particular I am inspecting how noise model and subsequent denoising influences metrics computation. In order to do so, I denoised unprocessed HCP data with Mrtrix3 (which assumes Rician noise) and with nlsam (using parameters estimated with autodmri). I then computed SNR as the mean signal level across shells / noise level output from dwidenoise command in the case of Mrtrix and / noise std (sigma.nii.gz)in case of nlsam+autodmri. What I now would like to do, is seeing how DTI and DKI maps change with these 2 different denoising approaches. My doubt is to which kind of images apply the noise estimation and denoising, since unprocessed HCP images are raw (so signal and noise distribution are not altered in any way) but also very distorted so after denoising I should apply further processing. At the same time, processed HCP data are already denoised by eddy cleanup, so I should t apply other denoising. If you could suggest how to face with this matter I would be glad. Thank you Rosella