Skip to content

Commit 8f89d15

Browse files
[DOC] Add documentation for reconstruction method option (#1300)
* document reconstruction method option and clarify file reader error * Apply suggestions from code review Co-authored-by: AliceJoubert <[email protected]> * fix broken adni link * add link to adni pet documentation --------- Co-authored-by: AliceJoubert <[email protected]>
1 parent c76cb63 commit 8f89d15

File tree

5 files changed

+73
-67
lines changed

5 files changed

+73
-67
lines changed

clinica/utils/pet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class ReconstructionMethod(str, Enum):
3939
4040
For ADNI specific reconstruction methods, see:
4141
42-
https://adni.loni.usc.edu/methods/pet-analysis-method/pet-analysis/
42+
https://adni.loni.usc.edu/data-samples/adni-data/neuroimaging/pet/
4343
"""
4444

4545
# Reconstruction methods defined in the BIDS specifications

docs/Pipelines/PET_Introduction.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,27 @@ bids
3535
└─ sub-CLNC001_ses-M000_trc-18FFDG_pet.nii.gz
3636
```
3737

38+
## Reconstruction methods
39+
40+
PET data can be reconstructed into the spatial distribution of the injected radio-tracer through various methods.
41+
The specification of the method used to reconstruct a given image is supported by the [BIDS standard](https://bids-specification.readthedocs.io/en/stable/04-modality-specific-files/09-positron-emission-tomography.html#pet-recording-data).
42+
43+
There exists four reserved values:
44+
45+
- `acdyn`: for reconstructions with attenuation correction of dynamic data
46+
- `acstat`: for reconstructions with attenuation correction of static data
47+
- `nacdyn`: for reconstructions without attenuation correction of dynamic data
48+
- `nacstat`: for reconstructions without attenuation correction of static data
49+
50+
In addition to these values, when working with ADNI data, the following values are possible:
51+
52+
- `coregdyn`: Corresponds to "ADNI processing steps 1"
53+
- `coregavg`: Corresponds to "ADNI processing steps 2"
54+
- `coregstd`: Corresponds to "ADNI processing steps 3"
55+
- `coregiso`: Corresponds to "ADNI processing steps 4"
56+
57+
See [this page](https://adni.loni.usc.edu/data-samples/adni-data/neuroimaging/pet/) for more information.
58+
3859
## Reference regions used for intensity normalization
3960

4061
In neurology, an approach widely used to allow inter- and intra-subject comparison of [PET](../glossary.md#pet) images is to compute standardized uptake value ratio ([SUVR](../glossary.md#suvr)) maps.

docs/Pipelines/PET_Linear.md

Lines changed: 26 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,17 @@
44
This pipeline performs spatial normalization to the MNI space and intensity normalization of [PET](../glossary.md#pet) images.
55
Its steps include:
66

7-
- affine registration to the [MNI152NLin2009cSym](https://bids-specification.readthedocs.io/en/stable/99-appendices/08-coordinate-systems.html#template-based-coordinate-systems)
8-
template [Fonov et al., [2011](https://doi.org/10.1016/j.neuroimage.2010.07.033),
9-
[2009](https://doi.org/10.1016/S1053-8119(09)70884-5)] in MNI space with the
10-
SyN algorithm [[Avants et al., 2008](https://doi.org/10.1016/j.media.2007.06.004)]
11-
from the [ANTs](http://stnava.github.io/ANTs/) software package
12-
[[Avants et al., 2014](https://doi.org/10.3389/fninf.2014.00044)];
13-
- intensity normalization using the average [PET](../glossary.md#pet) uptake in reference regions
14-
resulting in a standardized uptake value ratio ([SUVR](../glossary.md#suvr)) map;
15-
- cropping of the registered images to remove the background.
7+
- affine registration to the [MNI152NLin2009cSym](https://bids-specification.readthedocs.io/en/stable/99-appendices/08-coordinate-systems.html#template-based-coordinate-systems) template [Fonov et al., [2011](https://doi.org/10.1016/j.neuroimage.2010.07.033), [2009](https://doi.org/10.1016/S1053-8119(09)70884-5)] in MNI space with the SyN algorithm [[Avants et al., 2008](https://doi.org/10.1016/j.media.2007.06.004)] from the [ANTs](http://stnava.github.io/ANTs/) software package [[Avants et al., 2014](https://doi.org/10.3389/fninf.2014.00044)]
8+
- intensity normalization using the average [PET](../glossary.md#pet) uptake in reference regions resulting in a standardized uptake value ratio ([SUVR](../glossary.md#suvr)) map
9+
- cropping of the registered images to remove the background
1610

1711
!!! note "Clinica & BIDS specifications for PET modality"
1812
Since Clinica `v0.6`, PET data following the official specifications in BIDS version 1.6.0 are now compatible with Clinica.
1913
See [BIDS](../../BIDS) page for more information.
2014

2115
## Prerequisites
2216

23-
You need to have performed the [`t1-linear`](../T1_Linear) pipeline on your T1-weighted MR images.
17+
You need to have performed the [`t1-linear`](./T1_Linear.md) pipeline on your T1-weighted MR images.
2418

2519
## Dependencies
2620

@@ -37,36 +31,35 @@ clinica run pet-linear [OPTIONS] BIDS_DIRECTORY CAPS_DIRECTORY ACQ_LABEL
3731

3832
where:
3933

40-
- `BIDS_DIRECTORY` is the input folder containing the dataset in a
41-
[BIDS](../../BIDS) hierarchy;
42-
- `CAPS_DIRECTORY` is the output folder containing the results in a
43-
[CAPS](../../CAPS/Introduction) hierarchy;
44-
- `ACQ_LABEL` is the label given to the PET acquisition, specifying the tracer
45-
used (`trc-<acq_label>`). It can be for instance '18FFDG' for
46-
<sup>18</sup>F-fluorodeoxyglucose or '18FAV45' for <sup>18</sup>F-florbetapir;
47-
- The reference region is used to perform intensity normalization (i.e.
48-
dividing each voxel of the image by the average uptake in this region)
49-
resulting in a standardized uptake value ratio ([SUVR](../glossary.md#suvr)) map. It can be
50-
`cerebellumPons` or `cerebellumPons2` (used for amyloid tracers) and `pons`
51-
or `pons2` (used for FDG). See [PET introduction](./PET_Introduction.md) for
52-
more details about masks versions.
53-
54-
By default, cropped images (matrix size 169×208×179, 1 mm isotropic voxels) are
55-
generated to reduce the computing power required when training deep learning
56-
models. Use the `--uncropped_image` option if you do not want to crop the image.
57-
58-
The pipeline also offers the possibility to save the [PET](../glossary.md#pet) image in the T1w space
59-
after rigid transformation using the `--save_pet_in_t1w_space` option.
34+
- `BIDS_DIRECTORY` is the input folder containing the dataset in a [BIDS](../BIDS.md) hierarchy
35+
- `CAPS_DIRECTORY` is the output folder containing the results in a [CAPS](../CAPS/Introduction.md) hierarchy
36+
- `ACQ_LABEL` is the label given to the PET acquisition, specifying the tracer used (`trc-<acq_label>`). It can be for instance '18FFDG' for <sup>18</sup>F-fluorodeoxyglucose or '18FAV45' for <sup>18</sup>F-florbetapir
37+
- The reference region is used to perform intensity normalization (i.e. dividing each voxel of the image by the average uptake in this region) resulting in a standardized uptake value ratio ([SUVR](../glossary.md#suvr)) map.
38+
It can be `cerebellumPons` or `cerebellumPons2` (used for amyloid tracers) and `pons` or `pons2` (used for FDG).
39+
See [PET introduction](./PET_Introduction.md) for more details about masks versions.
40+
41+
By default, cropped images (matrix size 169×208×179, 1 mm isotropic voxels) are generated to reduce the computing power required when training deep learning models.
42+
Use the `--uncropped_image` option if you do not want to crop the image.
43+
44+
It is possible to select only images based on a [specific reconstruction method](./PET_Introduction.md#reconstruction-methods) with the `--reconstruction_method` option.
45+
46+
!!! warning
47+
It can happen that a [BIDS](../BIDS.md) dataset contains several [PET](../glossary.md#pet) scans for a given subject and session.
48+
In this situation, these images will differ through at least one [BIDS](../BIDS.md) entity like the tracer or the reconstruction method.
49+
When running the `pet-linear` pipeline, clinica will raise an error if more than one image matches the criteria provided through the command line.
50+
To avoid that, it is important to specify values for these options such that a single image is selected per subject and session.
51+
52+
The pipeline also offers the possibility to save the [PET](../glossary.md#pet) image in the T1w space after rigid transformation using the `--save_pet_in_t1w_space` option.
6053

6154
!!! note
62-
The arguments common to all Clinica pipelines are described in [Interacting with Clinica](../../InteractingWithClinica).
55+
The arguments common to all Clinica pipelines are described in [Interacting with Clinica](../Software/InteractingWithClinica.md).
6356

6457
!!! tip
6558
Do not hesitate to type `clinica run pet-linear --help` to see the full list of parameters.
6659

6760
## Outputs
6861

69-
Results are stored in the following folder of the [CAPS hierarchy](../../CAPS/Specifications/#pet-imaging-data): `subjects/<participant_id>/<session_id>/pet_linear`.
62+
Results are stored in the following folder of the [CAPS hierarchy](../CAPS/Specifications.md#pet-imaging-data): `subjects/<participant_id>/<session_id>/pet_linear`.
7063

7164
The main output files are:
7265

@@ -100,5 +93,4 @@ You can now use the [ClinicaDL framework](https://clinicadl.readthedocs.io/) pre
10093
resulting in images of size 169×208×179 with 1 mm isotropic voxels.
10194

10295
!!! tip
103-
Easily access the papers cited on this page on
104-
[Zotero](https://www.zotero.org/groups/2240070/clinica_aramislab/collections/8AEDUMZB).
96+
Easily access the papers cited on this page on [Zotero](https://www.zotero.org/groups/2240070/clinica_aramislab/collections/8AEDUMZB).

docs/Pipelines/PET_Surface.md

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<!-- markdownlint-disable MD033 MD046 -->
22
# `pet-surface` - Surface-based processing of PET images
33

4-
This pipeline performs several processing steps for the analysis of PET data on the cortical surface
5-
[[Marcoux et al., 2018](https://doi.org/10.3389/fninf.2018.00094)]:
4+
This pipeline performs several processing steps for the analysis of PET data on the cortical surface [[Marcoux et al., 2018](https://doi.org/10.3389/fninf.2018.00094)]:
65

76
- co-registration of PET and T1-weighted MR images;
87
- intensity normalization;
@@ -19,7 +18,7 @@ This pipeline relies mainly on tools from **[FreeSurfer](https://surfer.nmr.mgh.
1918

2019
## Prerequisite
2120

22-
You need to have performed the [`t1-freesurfer`](../T1_FreeSurfer) pipeline on your T1-weighted MR images.
21+
You need to have performed the [`t1-freesurfer`](./T1_FreeSurfer.md) pipeline on your T1-weighted MR images.
2322

2423
## Dependencies
2524

@@ -38,13 +37,12 @@ clinica run pet-surface [OPTIONS] BIDS_DIRECTORY CAPS_DIRECTORY ACQ_LABEL
3837

3938
where:
4039

41-
- `BIDS_DIRECTORY` is the input folder containing the dataset in a [BIDS](../../BIDS) hierarchy.
42-
- `CAPS_DIRECTORY` acts both as an input folder (where the results of the `t1-freesurfer` pipeline are stored) and as the output folder containing the results in a [CAPS](../../CAPS/Introduction) hierarchy.
40+
- `BIDS_DIRECTORY` is the input folder containing the dataset in a [BIDS](../BIDS.md) hierarchy.
41+
- `CAPS_DIRECTORY` acts both as an input folder (where the results of the `t1-freesurfer` pipeline are stored) and as the output folder containing the results in a [CAPS](../CAPS/Introduction.md) hierarchy.
4342
- `ACQ_LABEL` is the label given to the PET acquisition, specifying the tracer used (`trc-<acq_label>`).
4443
- The reference region is used to perform intensity normalization (i.e. dividing each voxel of the image by the average uptake in this region) resulting in a standardized uptake value ratio (SUVR) map.
45-
It can be `cerebellumPons` or `cerebellumPons2` (used for amyloid tracers) or `pons` or `pons2` (used for FDG).
46-
- `PVC_PSF_TSV` is the TSV file containing the `psf_x`, `psf_y` and `psf_z` of the PSF for each PET image. It is expected to be generated by the user.
47-
More explanation is given in [PET Introduction](../PET_Introduction) page.
44+
It can be `cerebellumPons` or `cerebellumPons2` (used for amyloid tracers) or `pons` or `pons2` (used for FDG).
45+
- `PVC_PSF_TSV` is the TSV file containing the `psf_x`, `psf_y` and `psf_z` of the PSF for each PET image. It is expected to be generated by the user. More explanation is given in [PET Introduction](./PET_Introduction.md) page.
4846

4947
!!! info
5048
Since the release of Clinica v0.3.8, the handling of PSF information has changed.
@@ -55,8 +53,9 @@ More explanation is given in [PET Introduction](../PET_Introduction) page.
5553

5654
Pipeline options:
5755

58-
- `-np`: This parameter specifies the number of threads to run in parallel.
59-
We recommend using `your_number_of_cpu - 1`.
56+
- `--reconstruction_method`: Select only images based on a [specific reconstruction method](./PET_Introduction.md#reconstruction-methods).
57+
- `-np`: This parameter specifies the number of threads to run in parallel. We recommend using `your_number_of_cpu - 1`.
58+
6059
Please note that PETPVC is extremely demanding in terms of resources and may cause the pipeline to crash if many subjects happen to be partial volume corrected at the same time (Error : `Failed to allocate memory for image`).
6160
To mitigate this issue, you can do the following:
6261

@@ -108,7 +107,7 @@ surface at equal distance between the white matter/gray matter interface and the
108107
TSV files summarizing the regional statistics on the labelled atlases (Desikan and Destrieux).
109108

110109
!!! note
111-
The full list of output files from the `pet-surface` pipeline can be found in [The ClinicA Processed Structure (CAPS) specifications](../../CAPS/Specifications/#pet-surface-surface-based-processing-of-pet-images).
110+
The full list of output files from the `pet-surface` pipeline can be found in [The ClinicA Processed Structure (CAPS) specifications](../CAPS/Specifications.md/#pet-surface---surface-based-processing-of-pet-images).
112111

113112
<center>![PET surface results](../img/PET_Surface/PET_Surface.jpg)</center>
114113
*<center><small>FDG PET SUVR projected onto the cortical surface (left hemisphere) for (from left to right) a cognitively normal subject (CN), a patient with Alzheimer’s disease (AD), a patient with semantic variant primary progressive aphasia (svPPA) and a patient with logopenic variant primary progressive aphasia (lvPPA).
@@ -148,11 +147,6 @@ The second row is the same signal for each subject, but warped to FsAverage afte
148147
Easily access the papers cited on this page on
149148
[Zotero](https://www.zotero.org/groups/2240070/clinica_aramislab/items/collectionKey/RGVVHC5W).
150149

151-
## Support
152-
153-
- You can use the [Clinica Google Group](https://groups.google.com/forum/#!forum/clinica-user) to ask for help!
154-
- Report an issue on [GitHub](https://github.com/aramis-lab/clinica/issues).
155-
156150
## Appendix I: Diagram of the pipeline execution
157151

158152
<center>![Diagram of the pipeline execution](https://www.frontiersin.org/files/Articles/400789/fninf-12-00094-HTML-r1/image_m/fninf-12-00094-g001.jpg)</center>

docs/Pipelines/PET_Volume.md

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ This pipeline performs several processing steps on [PET](../glossary.md#pet) dat
88
- inter-subject spatial normalization of the PET image into MNI space based on the DARTEL deformation model of SPM [[Ashburner, 2007](http://dx.doi.org/10.1016/j.neuroimage.2007.07.007)];
99
- intensity normalization using the average PET uptake in reference regions resulting in a standardized uptake value ratio ([SUVR](../glossary.md#suvr)) map;
1010
- parcellation into anatomical regions based on an atlas and computation of average values within each region.
11-
The list of available atlases can be found [here](../../Atlases).
11+
The list of available atlases can be found [here](../Atlases.md).
1212

1313
!!! note "Clinica & BIDS specifications for PET modality"
1414
Since Clinica `v0.6`, PET data following the official specifications in BIDS version 1.6.0 are now compatible with Clinica.
15-
See [BIDS](../../BIDS) page for more information.
15+
See [BIDS](../BIDS.md) page for more information.
1616

1717
## Prerequisite
1818

19-
You need to have performed the [`t1-volume`](../T1_Volume) pipeline on your T1-weighted MR images.
19+
You need to have performed the [`t1-volume`](./T1_Volume.md) pipeline on your T1-weighted MR images.
2020

2121
## Dependencies
2222

@@ -35,18 +35,24 @@ clinica run pet-volume [OPTIONS] BIDS_DIRECTORY CAPS_DIRECTORY GROUP_LABEL ACQ_L
3535

3636
where:
3737

38-
- `BIDS_DIRECTORY` is the input folder containing the dataset in a [BIDS](../../BIDS) hierarchy.
39-
- `CAPS_DIRECTORY` acts both as an input folder (where the results of the `t1-volume-*` pipeline are stored) and as the output folder containing the results in a [CAPS](../../CAPS/Introduction) hierarchy.
40-
- `GROUP_LABEL` is the label of the group that is associated to the DARTEL template that you had created when running the [`t1-volume`](../T1_Volume) pipeline.
38+
- `BIDS_DIRECTORY` is the input folder containing the dataset in a [BIDS](../BIDS.md) hierarchy.
39+
- `CAPS_DIRECTORY` acts both as an input folder (where the results of the `t1-volume-*` pipeline are stored) and as the output folder containing the results in a [CAPS](../CAPS/Introduction.md) hierarchy.
40+
- `GROUP_LABEL` is the label of the group that is associated to the DARTEL template that you had created when running the [`t1-volume`](./T1_Volume.md) pipeline.
4141
- `ACQ_LABEL` is the label given to the PET acquisition, specifying the tracer used (`trc-<acq_label>`).
4242
- The reference region is used to perform intensity normalization (i.e. dividing each voxel of the image by the average uptake in this region) resulting in a standardized uptake value ratio ([SUVR](../glossary.md#suvr)) map.
4343
It can be `cerebellumPons` or `cerebellumPons2` (used for amyloid tracers) or `pons` or `pons2` (used for FDG).
4444

4545
Pipeline options:
4646

47-
- `--pvc_psf_tsv`: TSV file containing the `psf_x`, `psf_y` and `psf_z` of the PSF for each PET image.
48-
More explanation is given in [PET Introduction](../PET_Introduction) page.
47+
- `--pvc_psf_tsv`: TSV file containing the `psf_x`, `psf_y` and `psf_z` of the PSF for each PET image. More explanation is given in [PET Introduction](./PET_Introduction.md#partial-volume-correction-pvc) page.
4948
- `--smooth`: a list of integers specifying the different isotropic full width at half maximum ([FWHM](../glossary.md#fwhm)) in millimeters to smooth the image. Default value is: 0, 8 (both without smoothing and with an isotropic smoothing of 8 mm)
49+
- `--reconstruction_method`: Select only images based on a [specific reconstruction method](./PET_Introduction.md#reconstruction-methods).
50+
51+
!!! warning
52+
It can happen that a [BIDS](../BIDS.md) dataset contains several [PET](../glossary.md#pet) scans for a given subject and session.
53+
In this situation, these images will differ through at least one [BIDS](../BIDS.md) entity like the tracer or the reconstruction method.
54+
When running the `pet-volume` pipeline, clinica will raise an error if more than one image matches the criteria provided through the command line.
55+
To avoid that, it is important to specify values for these options such that a single image is selected per subject and session.
5056

5157
!!! info
5258
Since the release of Clinica v0.3.8, the handling of PSF information in the TSV file has changed: `fwhm_x`, `fwhm_y`, `fwhm_z` columns have been replaced by `psf_x`, `psf_y`, `psf_z` and the `acq_label` column has been added.
@@ -61,9 +67,7 @@ More explanation is given in [PET Introduction](../PET_Introduction) page.
6167

6268
## Outputs
6369

64-
Results are stored in the following folder of the
65-
[CAPS hierarchy](../../CAPS/Specifications/#pet-volume-volume-based-processing-of-pet-images):
66-
`subjects/<participant_id>/<session_id>/pet/preprocessing`.
70+
Results are stored in the following folder of the [CAPS hierarchy](../CAPS/Specifications.md#pet-volume---volume-based-processing-of-pet-images): `subjects/<participant_id>/<session_id>/pet/preprocessing`.
6771

6872
The main output files are:
6973

@@ -108,8 +112,3 @@ The main output files are:
108112

109113
!!! tip
110114
Easily access the papers cited on this page on [Zotero](https://www.zotero.org/groups/2240070/clinica_aramislab/items/collectionKey/INDXD9QQ).
111-
112-
## Support
113-
114-
- You can use the [Clinica Google Group](https://groups.google.com/forum/#!forum/clinica-user) to ask for help!
115-
- Report an issue on [GitHub](https://github.com/aramis-lab/clinica/issues).

0 commit comments

Comments
 (0)