FCP-INDI / C-PAC

Configurable Pipeline for the Analysis of Connectomes
https://fcp-indi.github.io/
GNU Lesser General Public License v3.0
62 stars 40 forks source link

SNR functionality #431

Open Angel-Fernandez opened 9 years ago

Angel-Fernandez commented 9 years ago

Hi @ranjit, @sgiavasis, @ssikka,

I've a question about the SNR functionality. Seems that the output information is the noise intensity per voxel, isn't it? If it's the case, where can i find the snr ratio (signal intensity/noise intensity) or the values to calculate it?.

Thanks

jpellman commented 9 years ago

Hi Angel-Fernandez,

What output are you referring to, and which function or interface are you using to generate it? Knowing this will help us diagnose this issue more easily.

Best, John Pellman

ccraddock commented 9 years ago

The SNR values, aka signal-to-fluctuation-ratio are calculated by dividing the mean of each voxel by its standard deviation. I believe that these are calculated from the fully preprocessed fMRI data in original space, without smoothing.

-cc

On Wed, Jan 14, 2015 at 10:55 AM, John Pellman notifications@github.com wrote:

Hi Angel-Fernandez,

What output are you referring to, and which function or interface are you using to generate it?

— Reply to this email directly or view it on GitHub https://github.com/FCP-INDI/C-PAC/issues/431#issuecomment-69937718.

Director of Imaging, Center for the Developing Brain, Child Mind Institute http://childmind.org Research Scientist VI, Nathan S. Kline Institute for Psychiatric Research http://www.rfmh.org/nki/ Co-Founder, The Neuro Bureau http://neurobureau.org Impact Story https://impactstory.org/CameronCraddock Google Scholar Citations http://scholar.google.com/citations?user=lZ9hwSsAAAAJ&hl=en GitHub https://github.com/ccraddock Share that Brain @ the International Neuroimaging Datasharing Initiative http://fcon_1000.projects.nitrc.org/! Join me 2014-10-18 @ Brainhack EDT http://brainhack.org/brainhack-edt/!

Angel-Fernandez commented 9 years ago

I'm using CPAC 0.3.8 to obtain the QC report. This is an example of one of these measures:

voxels_intensity_plot

In this first image is represented the noise intensity per voxel?

brain_plot

In this second image we can see this noise in the image represented by colors. I think that the right color bar distribuetion is not working well. The red color is for the greater quantity of noise or is the white color?. You can have a negative SNR? then the values of th right bar must start at the blue color.

Thanks

ccraddock commented 9 years ago

I am sorry that this is confusing, we will work to make it more clear. What is being plotted in the image and in the histogram is Temporal Signal to Noise Ratio. For each voxel tSNR is calculated as the voxel mean divided by its standard deviation. For tSNR, high values are better. It is hard for me to tell, but do you have any blue values in your image?

On Thu, Jan 15, 2015 at 9:47 AM, Angel-Fernandez notifications@github.com wrote:

I'm using CPAC 0.3.8 to obtain the QC report. This is an example of one of these measures:

[image: voxels_intensity_plot] https://cloud.githubusercontent.com/assets/10339281/5759100/738d2e14-9ccb-11e4-9c2c-f4c266f91146.png

In this first image is represented the noise intensity per voxel?

[image: brain_plot] https://cloud.githubusercontent.com/assets/10339281/5759126/9fdf619e-9ccb-11e4-853c-bb02adf19105.png

In this second image we can see this noise in the image represented by colors. I think that the right color bar distribuetion is not working well. The red color is for the greater quantity of noise or is the white color?. You can have a negative SNR? then the values of th right bar must start at the blue color.

Thanks

— Reply to this email directly or view it on GitHub https://github.com/FCP-INDI/C-PAC/issues/431#issuecomment-70095394.

Director of Imaging, Center for the Developing Brain, Child Mind Institute http://childmind.org Research Scientist VI, Nathan S. Kline Institute for Psychiatric Research http://www.rfmh.org/nki/ Co-Founder, The Neuro Bureau http://neurobureau.org Impact Story https://impactstory.org/CameronCraddock Google Scholar Citations http://scholar.google.com/citations?user=lZ9hwSsAAAAJ&hl=en GitHub https://github.com/ccraddock Share that Brain @ the International Neuroimaging Datasharing Initiative http://fcon_1000.projects.nitrc.org/! Join me 2014-10-18 @ Brainhack EDT http://brainhack.org/brainhack-edt/!

Angel-Fernandez commented 9 years ago

Sorry, I haven't blue pixels. I was looking for an explanation about why the right bar starts with the blue color when we never will have a value with blue color and why I've white pixels in the image that not appears in the bar. What are the white pixels? Which value represent?

Angel-Fernandez commented 8 years ago

Hi, again.

I've a new question. The tsnr is in decibels? are you using 10 x log(snr) or 20 x log(snr)?

Thanks a lot.

jpellman commented 8 years ago

Hi Angel,

The tsnr is not in decibels. It is just the voxel mean divided by the standard deviation.

Angel-Fernandez commented 8 years ago

Thanks John,

I'm sorry but I've another questions. The std is from each voxel for all the time series? Please, how you are calculating the std from each voxel? Is calculated from from the noise out the brain in each slice? You are aligning the images before to calculate the snr?.

Thanks in advance

ccraddock commented 8 years ago

tSNR is the average of the voxel over time divided by the standard deviation of its time course

On Thu, Oct 8, 2015 at 12:55 PM, Angel-Fernandez notifications@github.com wrote:

Thanks John,

I'm sorry but I've another questions. The std is from each voxel for all the time series? Please, how you are calculating the std from each voxel? Is calculated from from the noise out the brain in each slice? You are aligning the images before to calculate the snr?.

Thanks in advance

— Reply to this email directly or view it on GitHub https://github.com/FCP-INDI/C-PAC/issues/431#issuecomment-146620669.

Director of Imaging, Center for the Developing Brain, Child Mind Institute http://childmind.org Director, Computational NeuroImaging Lab http://computational-neuroimaging-lab.org/, Nathan S. Kline Institute for Psychiatric Research http://www.rfmh.org/nki/ Co-Founder, The Neuro Bureau http://neurobureau.org Impact Story https://impactstory.org/CameronCraddock Google Scholar Citations http://scholar.google.com/citations?user=lZ9hwSsAAAAJ&hl=en GitHub https://github.com/ccraddock Share that Brain @ the International Neuroimaging Datasharing Initiative http://fcon_1000.projects.nitrc.org/! Join me 2015-10-23 @ Brainhack Americas http://brainhack.org/Americas/! The GigaScience Brainhack Thematic Series http://brainhack.org/brainhack-thematic-series-call-for-papers/ is open for your submission.

Angel-Fernandez commented 8 years ago

Thanks very helpfull Cameron,

My problem is that when I calculate the tsnr(voxel) = mean(voxel)/std(voxel). I'm obtaining very high values like 200 when in C-PAC for the same image I obtain 12. I'm sure that i'm doing wrong something.

Thanks again

ccraddock commented 8 years ago

not necessarily, it could be that we are doing something wrong. Could you provide us with info to reproduce your problem? I am assuming that this is the output of the QC page for C-PAC, is that correct? Are you sure that the data you are using in the calculation is the same as what is being used for C-PAC's calculatin? i.e. is it from the correct stage of processing?

On Thu, Oct 8, 2015 at 1:07 PM, Angel-Fernandez notifications@github.com wrote:

Thanks very helpfull Cameron,

My problem is that when I calculate the tsnr(voxel) = mean(voxel)/std(voxel). I'm obtaining very high values like 200 when in C-PAC for the same image I obtain 12. I'm sure that i'm doing wrong something.

Thanks again

— Reply to this email directly or view it on GitHub https://github.com/FCP-INDI/C-PAC/issues/431#issuecomment-146625881.

Director of Imaging, Center for the Developing Brain, Child Mind Institute http://childmind.org Director, Computational NeuroImaging Lab http://computational-neuroimaging-lab.org/, Nathan S. Kline Institute for Psychiatric Research http://www.rfmh.org/nki/ Co-Founder, The Neuro Bureau http://neurobureau.org Impact Story https://impactstory.org/CameronCraddock Google Scholar Citations http://scholar.google.com/citations?user=lZ9hwSsAAAAJ&hl=en GitHub https://github.com/ccraddock Share that Brain @ the International Neuroimaging Datasharing Initiative http://fcon_1000.projects.nitrc.org/! Join me 2015-10-23 @ Brainhack Americas http://brainhack.org/Americas/! The GigaScience Brainhack Thematic Series http://brainhack.org/brainhack-thematic-series-call-for-papers/ is open for your submission.

Angel-Fernandez commented 8 years ago

This is C-PAC's output

snr_a

I'm doing a script in Matlab to obtain the same marker to integrate it into XNAT for BIMCV(Spain, Valencia) http://ceib.san.gva.es/

First I'm realigning the images with SPM and after I'm calculating the tsnr for each voxel. with this formula: tsnr(voxel) = mean(voxel)/std(voxel)

My results are these

montage_tsnr

In both cases I'm using the same fMRI. The image matrix values are obtained from the nifti image.

Another question is what do you do when all the voxels have the same tonality an his std is 0, in this case the resultant tsnr is NaN.