Skip to content

Commit

Permalink
Clarified documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jcohenadad committed Jul 16, 2021
1 parent d81998a commit 90d8378
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 88 deletions.
39 changes: 14 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,20 @@ At the end of the processing, you can review:
|9584 |17.143453301063012|21.092693041826486|1.1247654335215769|
|9418 |19.558182966645223|19.61176661536486 |1.1093208813636863|

## Description of the analysis

## Description of the scripts
Two NIfTI files are required: an initial scan and a re-scan without repositioning. The analysis script `process_data.sh`
includes the following steps:

- Check if a mask for the spinal cord and/or gray matter already exists. If not, segment them automatically.
- Register the second scan to the first one. Use nearest-neighbour interpolation to preserve noise properties.
- Compute white matter mask by subtracting the spinal cord and the gray matter masks.
- Compute `SNR_diff` using the two-image subtraction method (Dietrich et al. J Magn Reson Imaging, 2007).
- Compute `SNR_mult` using the first scan (Griffanti et al., Biomed Sign Proc and Control, 2012).
- Compute `Contrast` by dividing the mean signal in the GM by that in the WM, on a slice-by-slice basis and then
average across slices.

## Simulations

* [simu_create_phantom.py](./simu_create_phantom.py): Generate synthetic phantom
of WM and GM that can be used to validate the proposed evaluation metrics. The phantoms are generated with random noise,
Expand All @@ -55,30 +67,7 @@ This script is particularly useful for processing the large amount of files
generated by the phantom construction.
* [simu_make_figures.py](./simu_make_figures.py): Make figures to assess
metrics sensitivity to image quality. Run after simu_process_data.py
* [make_figures_compare_SNR.py](./make_figures_compare_SNR.py): Make figures to assess
the correlation between SNR_single and SNR_diff.

## Analysis

Two NIfTI files are required: an initial scan and a re-scan without repositioning.

### Pre-processing
- The second image is registered to the first in order to compute the SNR using the two-image subtraction method.
- The spinal cord and gray matter of each image are segmented automatically.
- White matter segmentation is generated by subtracting the gray matter segmentation from the cord segmentation.

### Signal-to-noise ratio (SNR):
The SNR is determined with two different methods: SNR_diff and SNR_single.
- SNR_diff is computed with SCT using the two-image subtraction method (Dietrich et al. J Magn Reson Imaging, 2007).
- SNR_single is computed from a single image (Griffanti et al., Biomed Sign Proc and Control, 2012).

### Contrast:
The mean signal is computed in the white matter and gray matter of image 1. The contrast is then computed according to the following equation:

~~~
Contrast = abs(mean(WM) - mean(GM)) / min{mean(WM),mean(GM)}
~~~


## Configuration of Niftyweb server
- make sure the script WMGM is declared in `PATH`
- add an entry to the crontab that points to the Daemon. Example (to edit, use `crontab -e`):
Expand Down
63 changes: 0 additions & 63 deletions make_figures_compare_SNR.py

This file was deleted.

0 comments on commit 90d8378

Please sign in to comment.