Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
59c18ed
ENH: add PET dataset to repo for testing
mnoergaard Apr 30, 2025
dba9c06
ENH: add petprep_hmc derivatives data
mnoergaard Apr 30, 2025
0471ba7
enh: modify BIDsLayoutIndexer so that it does not ignore the pet file
celprov May 1, 2025
d469b74
enh: copy the fMRI workflow and remove steps that are unnecessary in …
celprov May 1, 2025
64f342d
enh: create a MRIQC workflow for PET imaging. The workflow outputs FD…
celprov May 2, 2025
046864b
sty: ruff formatting
celprov May 2, 2025
3534536
fix: add PET as a supported modality
celprov May 2, 2025
70e8b5a
fix: fix bugs in the workflow
celprov May 2, 2025
b7c05e2
FIX: add traits to dictionary
mnoergaard May 2, 2025
d1067fc
FIX: webapi.py needs to be updated to accommodate upload of PET data
mnoergaard May 2, 2025
1b92a16
FIX: update FD interface
mnoergaard May 5, 2025
6049edb
Update bootstrap-pet.yml
mnoergaard May 9, 2025
359faba
FIX: maximum of 10 mm in FD, as early frames are sometimes quite high
mnoergaard May 9, 2025
e9341a7
FIX: change to max 6 FD
mnoergaard May 9, 2025
b8fd0b4
FIX: remove y-axis cutoff for FD
mnoergaard May 9, 2025
4d5a60d
ENH: add FWHM estimation to IQMs
mnoergaard May 13, 2025
f1bdd61
ENH: make FWHM estimation work on mean PET image
mnoergaard May 13, 2025
bf8865c
ENH: add FWHM estimation per frame
mnoergaard May 13, 2025
8370cd2
ENH: add hammers atlas and template data for PET normalization
mnoergaard May 16, 2025
66d94ee
ENH: add normalization workflow and extraction of time activity curves
mnoergaard May 16, 2025
adf2b31
ENH: add template brain mask
mnoergaard May 17, 2025
4b85a95
ENH: add PET to MNI registration json file for ANTs
mnoergaard May 17, 2025
e18135c
FIX: update normalization workflow to use ANTs instead of mri_coreg
mnoergaard May 17, 2025
0e93b6a
ENH: add TACs and normalization
mnoergaard May 20, 2025
98b29d2
FIX: refactor, add generate_tac_figures to qc/pet.py
mnoergaard May 20, 2025
c164f8b
ENH: update main workflow to output tac and normalization figures to …
mnoergaard May 20, 2025
eeeef22
ENH: add TACs and normalization plotting
mnoergaard May 20, 2025
259cda8
FIX: replate motion plot x-axis with time instead of frames
mnoergaard May 20, 2025
b40fa3d
FIX: forward metadata to motion plots
mnoergaard May 20, 2025
1cff6f9
FIX: update plotting and style
mnoergaard May 21, 2025
b5e5c46
ENH: add carpet plot
mnoergaard May 21, 2025
af4969b
ENH: add carpet plot to pet yml reports
mnoergaard May 21, 2025
5b6bf97
ENH: add units for PETQC
mnoergaard May 26, 2025
21595f5
ENH: Update PET workflow to capture ref_frame
mnoergaard May 26, 2025
8008dfb
ENH: add estimation of mean FWHM across frames
mnoergaard May 26, 2025
bdd80f4
ENH: add tacs tsv file to derivatives
mnoergaard May 26, 2025
eed1cc3
FIX: Update settings in pet_mni_align workflow
mnoergaard May 26, 2025
90d5aec
FIX: update tacs output node
mnoergaard May 26, 2025
37b8b99
ENH: add working nipreps.json file to data
mnoergaard May 26, 2025
3e8a145
FIX: clean up and add documentation
mnoergaard May 26, 2025
315512a
ENH: Add module-level docstring to __init__.py
mnoergaard May 26, 2025
bb38fbd
FIX: Update __all__ in mriqc/interfaces/__init__.py
mnoergaard May 26, 2025
c3cea23
FIX: style cleaning
mnoergaard May 26, 2025
fae581b
ENH: add assertions for ref_frame in test_pet.py
mnoergaard May 26, 2025
6de79aa
ENH: update README.rst with PETQC support
mnoergaard May 26, 2025
42c83b6
FIX: re-add os import to create_pet_carpet_plot
mnoergaard May 26, 2025
cccfe52
FIX: re-add nilearn plot_carpet function
mnoergaard May 26, 2025
cac40b5
FIX: re-add generate_tac_figures import
mnoergaard May 26, 2025
2cdecb6
FIX: update nipreps.json file
mnoergaard May 26, 2025
b6a70d5
ENH: add threshold to PET reference image to improve PET to template …
mnoergaard Jun 4, 2025
099a533
FIX: remove dismiss entities fra carpet and normalization
mnoergaard Jun 4, 2025
0d6ff62
FIX: add dismiss entities again
mnoergaard Jun 4, 2025
d79a831
ENH: allow trc entity for PET data + test
mnoergaard Jun 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ software engineering principles:
Its reliability is permanently checked and maintained with
`CircleCI <https://circleci.com/gh/nipreps/mriqc>`_.

PETQC support
-------------
*MRIQC* also provides workflows for quality control of positron emission
tomography (PET) images. When PET data are detected in a BIDS dataset,
the PETQC pipeline runs automatically and generates PET-specific IQMs and
HTML reports. Further details can be found in the
`documentation <https://mriqc.readthedocs.io/en/latest/petqc.html>`__.

Citation
--------
.. topic:: **When using MRIQC, please include the following citation:**
Expand Down
1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Contents
measures
reports
workflows
petqc
dsa
license
changes
Expand Down
27 changes: 27 additions & 0 deletions docs/source/petqc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.. _petqc:

PETQC workflows
***************

MRIQC includes experimental support for positron emission tomography (PET) quality
control. When PET data are present in a BIDS dataset, the ``pet`` workflow is
initialized automatically and generates PET-specific image quality metrics.

Running PETQC
-------------

Executing PETQC does not require additional command line options beyond the
standard *MRIQC* interface. Simply run::

mriqc <bids_root> <output_dir> participant

MRIQC will detect ``pet`` images and process them along with other modalities.

Interpreting PETQC outputs
--------------------------

Individual HTML reports for each PET run are written to
``<output_dir>/reports``. Summary metrics are collated in
``<output_dir>/pet.csv`` and a group report is produced when the ``group`` level
is executed. These outputs mirror those of the MRI workflows and can be used to
identify artifacts or outlier scans.
6 changes: 3 additions & 3 deletions mriqc/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
os.environ['PYTHONWARNINGS'] = 'ignore'


SUPPORTED_SUFFIXES: tuple[str, ...] = ('T1w', 'T2w', 'bold', 'dwi')
SUPPORTED_SUFFIXES: tuple[str, ...] = ('T1w', 'T2w', 'bold', 'dwi', 'pet')

DEFAULT_MEMORY_MIN_GB: float = 0.01
DSA_MESSAGE: str = """\
Expand Down Expand Up @@ -510,10 +510,10 @@ def init(cls) -> None:
# Ignore all modality subfolders, except for func/ or anat/
re.compile(
r'^/sub-[a-zA-Z0-9]+(/ses-[a-zA-Z0-9]+)?/'
r'(beh|fmap|pet|perf|meg|eeg|ieeg|micr|nirs)'
r'(beh|fmap|perf|meg|eeg|ieeg|micr|nirs)'
),
# Ignore all files, except for the supported modalities
re.compile(r'^.+(?<!(_T1w|_T2w|bold|_dwi))\.(json|nii|nii\.gz)$'),
re.compile(r'^.+(?<!(_T1w|_T2w|bold|_pet|_dwi))\.(json|nii|nii\.gz)$'),
]

if cls.participant_label:
Expand Down
24 changes: 24 additions & 0 deletions mriqc/data/atlas/petref-mni_registration_precise_000.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"collapse_output_transforms": true,
"convergence_threshold": [1e-6, 1e-6, 1e-6],
"convergence_window_size": [20, 20, 10],
"dimension": 3,
"interpolation": "Linear",
"metric": ["Mattes", "Mattes", "Mattes"],
"metric_weight": [1, 1, 1],
"number_of_iterations": [[1000, 500, 250], [500, 250, 100], [100, 50, 30]],
"output_transform_prefix": "pet_to_mni",
"output_warped_image": true,
"radius_or_number_of_bins": [32, 32, 32],
"sampling_percentage": [0.5, 0.5, 1.0],
"sampling_strategy": ["Regular", "Regular", "None"],
"shrink_factors": [[4, 2, 1], [4, 2, 1], [4, 2, 1]],
"sigma_units": ["vox", "vox", "vox"],
"smoothing_sigmas": [[6, 3, 1], [4, 2, 1], [2, 1, 0]],
"transform_parameters": [[0.1], [0.1], [0.1, 3.0, 0.0]],
"transforms": ["Rigid", "Affine", "SyN"],
"use_histogram_matching": [true, true, true],
"winsorize_lower_quantile": 0.01,
"winsorize_upper_quantile": 0.99,
"write_composite_transform": false
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
96 changes: 96 additions & 0 deletions mriqc/data/atlas/tpl-SPM_space-MNI152_dseg.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
index name
1 TL_hippocampus_R
2 TL_hippocampus_L
3 TL_amygdala_R
4 TL_amygdala_L
5 TL_anterior_temporal_lobe_medial_part_R
6 TL_anterior_temporal_lobe_medial_part_L
7 TL_anterior_temporal_lobe_lateral_part_R
8 TL_anterior_temporal_lobe_lateral_part_L
9 TL_parahippocampal_and_ambient_gyrus_R
10 TL_parahippocampal_and_ambient_gyrus_L
11 TL_superior_temporal_gyrus_middle_part_R
12 TL_superior_temporal_gyrus_middle_part_L
13 TL_middle_and_inferior_temporal_gyrus_R
14 TL_middle_and_inferior_temporal_gyrus_L
15 TL_fusiform_gyrus_R
16 TL_fusiform_gyrus_L
17 cerebellum_R
18 cerebellum_L
19 brainstem_excluding_substantia_nigra
20 insula_posterior_long_gyrus_L
21 insula_posterior_long_gyrus_R
22 OL_lateral_remainder_occipital_lobe_L
23 OL_lateral_remainder_occipital_lobe_R
24 CG_anterior_cingulate_gyrus_L
25 CG_anterior_cingulate_gyrus_R
26 CG_posterior_cingulate_gyrus_L
27 CG_posterior_cingulate_gyrus_R
28 FL_middle_frontal_gyrus_L
29 FL_middle_frontal_gyrus_R
30 TL_posterior_temporal_lobe_L
31 TL_posterior_temporal_lobe_R
32 PL_angular_gyrus_L
33 PL_angular_gyrus_R
34 caudate_nucleus_L
35 caudate_nucleus_R
36 nucleus_accumbens_L
37 nucleus_accumbens_R
38 putamen_L
39 putamen_R
40 thalamus_L
41 thalamus_R
42 pallidum_L
43 pallidum_R
44 corpus_callosum
45 Lateral_ventricle_excluding_temporal_horn_R
46 Lateral_ventricle_excluding_temporal_horn_L
47 Lateral_ventricle_temporal_horn_R
48 Lateral_ventricle_temporal_horn_L
49 Third_ventricle
50 FL_precentral_gyrus_L
51 FL_precentral_gyrus_R
52 FL_straight_gyrus_L
53 FL_straight_gyrus_R
54 FL_anterior_orbital_gyrus_L
55 FL_anterior_orbital_gyrus_R
56 FL_inferior_frontal_gyrus_L
57 FL_inferior_frontal_gyrus_R
58 FL_superior_frontal_gyrus_L
59 FL_superior_frontal_gyrus_R
60 PL_postcentral_gyrus_L
61 PL_postcentral_gyrus_R
62 PL_superior_parietal_gyrus_L
63 PL_superior_parietal_gyrus_R
64 OL_lingual_gyrus_L
65 OL_lingual_gyrus_R
66 OL_cuneus_L
67 OL_cuneus_R
68 FL_medial_orbital_gyrus_L
69 FL_medial_orbital_gyrus_R
70 FL_lateral_orbital_gyrus_L
71 FL_lateral_orbital_gyrus_R
72 FL_posterior_orbital_gyrus_L
73 FL_posterior_orbital_gyrus_R
74 substantia_nigra_L
75 substantia_nigra_R
76 FL_subgenual_frontal_cortex_L
77 FL_subgenual_frontal_cortex_R
78 FL_subcallosal_area_L
79 FL_subcallosal_area_R
80 FL_pre-subgenual_frontal_cortex_L
81 FL_pre-subgenual_frontal_cortex_R
82 TL_superior_temporal_gyrus_anterior_part_L
83 TL_superior_temporal_gyrus_anterior_part_R
84 PL_supramarginal_gyrus_L
85 PL_supramarginal_gyrus_R
86 insula_anterior_short_gyrus_L
87 insula_anterior_short_gyrus_R
88 insula_middle_short_gyrus_L
89 insula_middle_short_gyrus_R
90 insula_posterior_short_gyrus_L
91 insula_posterior_short_gyrus_R
92 insula_anterior_inferior_cortex_L
93 insula_anterior_inferior_cortex_R
94 insula_anterior_long_gyrus_L
95 insula_anterior_long_gyrus_R
118 changes: 118 additions & 0 deletions mriqc/data/bootstrap-pet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
package: mriqc
title: "{filename} :: MRIQC's PET report"
sections:
- name: Summary
reportlets:
- bids:
datatype: figures
desc: summary
suffix: pet
extension: [.html]

- name: Motion Correction Reports
reportlets:
- bids:
datatype: figures
desc: fd
extension: [.png]
caption: Framewise Displacement.
subtitle: FD
style:
max-width: 800px

- bids:
datatype: figures
desc: rotation
extension: [.png]
caption: Rotation components of motion correction.
subtitle: Rotation Metrics
style:
max-width: 800px

- bids:
datatype: figures
desc: translation
extension: [.png]
caption: Translation components of motion correction.
subtitle: Translation Metrics
style:
max-width: 800px

- name: Normalization Report
reportlets:
- bids:
datatype: figures
desc: norm
extension: [.svg]
caption: Spatial normalization to standard (MNI) space. The visualization dynamically transitions between subject PET and template images.
subtitle: Normalization Report
static: false
style:
max-width: 800px

- name: Time-Activity Curves (TACs)
reportlets:
- bids:
datatype: figures
desc: tacsCortical
extension: [.png]
caption: Cortical regions TACs.
subtitle: Cortical TACs
style:
max-width: 800px

- bids:
datatype: figures
desc: tacsSubcortical
extension: [.png]
caption: Subcortical regions TACs.
subtitle: Subcortical TACs
style:
max-width: 800px

- bids:
datatype: figures
desc: tacsVentricular
extension: [.png]
caption: Ventricular regions TACs.
subtitle: Ventricular TACs
style:
max-width: 800px

- bids:
datatype: figures
desc: tacsOther
extension: [.png]
caption: Other regions TACs.
subtitle: Other TACs
style:
max-width: 800px

- bids:
datatype: figures
desc: carpet
extension: [.svg]
caption: Carpet plots of the time-activity curves
subtitle: Carpet Plots
style:
max-width: 800px

- name: About
nested: true
reportlets:
- custom: errors
path: '{reportlets_dir}/{run_uuid}'
captions: "<em>MRIQC</em> may have recorded failure conditions."
title: Errors
- metadata: "input"
settings:
folded: true
id: 'about-metadata'
caption: |
Thanks for using <em>MRIQC</em>. The following information may assist in
reconstructing the provenance of the corresponding derivatives.
title: Reproducibility and provenance information

plugins:
- module: nireports.assembler
path: data/rating-widget/bootstrap.yml
Loading
Loading