PET Skill (Modality Layer)
Overview
pet-skill is the NeuroClaw modality-layer interface skill responsible for all PET neuroimaging data processing tasks.
It strictly follows the NeuroClaw hierarchical design principles:
- This skill only describes WHAT needs to be done and which tool skill to delegate to.
- It contains no implementation code or concrete commands.
- All concrete execution is delegated to existing base/tool skills:
fsl-tool, freesurfer-tool, nibabel-skill, and claw-shell.
- Companion scripts in
scripts/ provide reference implementations for SUVR computation and reference region extraction.
Core workflow (never bypassed):
- Identify input PET data and tracer type (PiB, FDG, tau, or other).
- Ensure T1w structural data is available (via
smri-skill if not yet processed).
- Generate a numbered execution plan clearly stating WHAT needs to be done and which tool skill will handle each step.
- Present the full plan, estimated runtime, resource requirements, and risks to the user and wait for explicit confirmation ("YES" / "execute" / "proceed").
- On confirmation, delegate every step to the appropriate skill via
claw-shell.
- After execution, save all outputs in a clean directory structure (
pet_output/).
Research use only.
Quick Reference (Common PET Tasks)
| Task |
What needs to be done |
Delegate to which tool skill |
Expected output |
| PET-to-T1w coregistration |
Register dynamic or static PET frame to T1w using rigid-body alignment |
fsl-tool (FLIRT) |
PET in T1w native space |
| T1w-to-MNI normalization |
Warp T1w (and co-registered PET) to MNI152 template |
fsl-tool (FNIRT) or smri-skill |
PET in MNI152 standard space |
| Reference region extraction |
Extract mean signal from anatomically defined reference region (e.g., cerebellar cortex, pons, whole cerebellum) |
fsl-tool + freesurfer-tool + nibabel-skill |
Reference region mean time-activity curve |
| SUVR computation |
Compute Standardized Uptake Value Ratio = target ROI / reference region |
scripts/compute_suvr.py |
Per-region SUVR values (CSV) |
| Partial volume correction |
Apply geometric transfer matrix (GTM) or region-based PVC methods |
fsl-tool + custom |
PVC-corrected ROI values |
| Dynamic PET modeling |
Kinetic modeling (e.g., Logan plot, SUVR with dynamic frames) |
Custom analysis |
DVR or SUVR over time |
| Tracer-specific workflow |
PiB (amyloid, cerebellar cortex ref), FDG (metabolism, pons ref), tau (flortaucipir, cerebellar cortex ref) |
Full pipeline |
Tracer-appropriate SUVR maps |
Tracer-Specific Reference Regions
| Tracer |
Target |
Reference Region |
SUVR Threshold (amyloid+) |
| PiB (¹¹C-Pittsburgh Compound B) |
Amyloid-β deposition |
Cerebellar cortex (gray matter) |
SUVR > 1.42 or > 1.21 (centiloid-adjusted) |
| FDG (¹⁸F-Fluorodeoxyglucose) |
Glucose metabolism (hypometabolism pattern) |
Pons or whole cerebellum |
Lower SUVR = worse metabolism |
| Tau (¹⁸F-Flortaucipir / AV-1451) |
Tau neurofibrillary tangles |
Cerebellar cortex (gray matter) |
SUVR > 1.2–1.3 (region-dependent) |
Core Processing Pipeline
Stage 1: T1w Preprocessing (via smri-skill)
- Brain extraction, tissue segmentation, cortical parcellation (FreeSurfer)
- Required for reference region definition and PVC
Stage 2: PET-to-T1w Coregistration (via fsl-tool)
- Rigid-body registration of mean PET frame to T1w using FLIRT
- Apply transformation to full dynamic or static PET series
Stage 3: Reference Region Definition
- Use FreeSurfer parcellation to extract reference region mask in T1w space
- Common references: cerebellar cortex (
Cerebellum_Cortex in Desikan-Killiany), pons
- Project mask to PET space or keep in T1w space with partial volume correction
Stage 4: SUVR Computation (via scripts/compute_suvr.py)
- Extract mean signal from target ROI and reference region
- SUVR = mean(target) / mean(reference)
- Output per-region SUVR values as CSV
Stage 5 (Optional): Spatial Normalization to MNI
- Warp PET (in T1w space) to MNI152 using T1w-to-MNI warp
- Enable group-level voxelwise analysis
Scripts
scripts/compute_suvr.py
Computes SUVR from a PET image and ROI/reference masks.
python skills/pet-skill/scripts/compute_suvr.py \
--pet /path/to/pet_in_t1w_space.nii.gz \
--target-mask /path/to/target_roi_mask.nii.gz \
--ref-mask /path/to/reference_region_mask.nii.gz \
--output /path/to/pet_output/suvr_values.csv
Standard Output Layout
pet_output/
├── coregistration/ # PET-to-T1w registration matrices and resampled PET
├── suvr/ # SUVR maps and per-region CSV values
│ ├── suvr_values.csv
│ └── suvr_map.nii.gz
├── pvc/ # Partial volume corrected values (if requested)
├── mni/ # PET in MNI152 space (if normalization requested)
├── qc/ # Coregistration quality, reference region coverage
└── logs/
Installation (Handled by dependency-planner)
No manual installation required at this layer.
When first used, pet-skill automatically calls dependency-planner to ensure fsl-tool, freesurfer-tool, nibabel-skill, and claw-shell are ready.
Important Notes & Limitations
- PET images are typically low-resolution (~2–4 mm); coregistration to high-resolution T1w is essential.
- Reference region selection is tracer-dependent; using the wrong reference region invalidates SUVR.
- Partial volume correction is recommended for atrophy-prone populations (e.g., Alzheimer's disease).
- Dynamic PET requires frame timing information from DICOM headers or sidecar JSON.
- Static PET (single late frame) is sufficient for most clinical SUVR analyses.
- This skill is for research workflows; not for clinical decision-making.
When to Call This Skill
- After
smri-skill when T1w structural preprocessing is complete and PET data needs processing.
- When the user needs SUVR computation from amyloid (PiB), metabolism (FDG), or tau PET data.
- When PET-to-T1w coregistration or normalization to MNI space is required.
- When partial volume correction is requested for ROI-based PET quantification.
- When dataset skills (e.g.,
aibl-skill, adni-skill) delegate PET processing.
Complementary / Related Skills
smri-skill → T1w structural preprocessing (brain extraction, parcellation)
fmri-skill → if PET is used alongside fMRI for multimodal analysis
fsl-tool → FLIRT (coregistration), FNIRT (normalization), PETPVC (partial volume correction)
freesurfer-tool → cortical/subcortical parcellation for ROI definition
nibabel-skill → NIfTI I/O for mask manipulation
brain-visualization → PET overlay visualization
aibl-skill → AIBL dataset (PiB, FDG, tau PET)
adni-skill → ADNI dataset (PET data available)
Reference
Created At: 2026-05-06 12:19 HKT
Last Updated At: 2026-05-06 12:19 HKT
Author: chengwang96
1---2name: pet-skill3description: Use this skill whenever the user wants to process PET neuroimaging data including spatial normalization to T1w/MNI space, SUVR computation, reference region quantification, partial volume correction, or tracer-specific workflows (PiB amyloid, FDG metabolism, tau). Triggers include: 'PET', 'PET processing', 'SUVR', 'amyloid PET', 'FDG PET', 'tau PET', 'PiB', 'flortaucipir', 'reference region', 'partial volume correction', or any request involving PET neuroimaging data.4license: MIT License (NeuroClaw custom skill – freely modifiable within t5---6# PET Skill (Modality Layer)
7
8## Overview
9
10`pet-skill` is the NeuroClaw **modality-layer** interface skill responsible for all PET neuroimaging data processing tasks.
11
12It strictly follows the NeuroClaw hierarchical design principles:
13- This skill **only describes WHAT needs to be done** and **which tool skill to delegate to**.
14- It contains **no implementation code or concrete commands**.
15- All concrete execution is delegated to existing base/tool skills: `fsl-tool`, `freesurfer-tool`, `nibabel-skill`, and `claw-shell`.
16- Companion scripts in `scripts/` provide reference implementations for SUVR computation and reference region extraction.
17
18**Core workflow (never bypassed):**
191. Identify input PET data and tracer type (PiB, FDG, tau, or other).
202. Ensure T1w structural data is available (via `smri-skill` if not yet processed).
213. Generate a **numbered execution plan** clearly stating WHAT needs to be done and which tool skill will handle each step.
224. Present the full plan, estimated runtime, resource requirements, and risks to the user and wait for explicit confirmation ("YES" / "execute" / "proceed").
235. On confirmation, delegate every step to the appropriate skill via `claw-shell`.
246. After execution, save all outputs in a clean directory structure (`pet_output/`).
25
26**Research use only.**
27
28---
29
30## Quick Reference (Common PET Tasks)
31
32| Task | What needs to be done | Delegate to which tool skill | Expected output |
33|---|---|---|---|
34| PET-to-T1w coregistration | Register dynamic or static PET frame to T1w using rigid-body alignment | `fsl-tool` (FLIRT) | PET in T1w native space |
35| T1w-to-MNI normalization | Warp T1w (and co-registered PET) to MNI152 template | `fsl-tool` (FNIRT) or `smri-skill` | PET in MNI152 standard space |
36| Reference region extraction | Extract mean signal from anatomically defined reference region (e.g., cerebellar cortex, pons, whole cerebellum) | `fsl-tool` + `freesurfer-tool` + `nibabel-skill` | Reference region mean time-activity curve |
37| SUVR computation | Compute Standardized Uptake Value Ratio = target ROI / reference region | `scripts/compute_suvr.py` | Per-region SUVR values (CSV) |
38| Partial volume correction | Apply geometric transfer matrix (GTM) or region-based PVC methods | `fsl-tool` + custom | PVC-corrected ROI values |
39| Dynamic PET modeling | Kinetic modeling (e.g., Logan plot, SUVR with dynamic frames) | Custom analysis | DVR or SUVR over time |
40| Tracer-specific workflow | PiB (amyloid, cerebellar cortex ref), FDG (metabolism, pons ref), tau (flortaucipir, cerebellar cortex ref) | Full pipeline | Tracer-appropriate SUVR maps |
41
42---
43
44## Tracer-Specific Reference Regions
45
46| Tracer | Target | Reference Region | SUVR Threshold (amyloid+) |
47|---|---|---|---|
48| **PiB** (¹¹C-Pittsburgh Compound B) | Amyloid-β deposition | Cerebellar cortex (gray matter) | SUVR > 1.42 or > 1.21 (centiloid-adjusted) |
49| **FDG** (¹⁸F-Fluorodeoxyglucose) | Glucose metabolism (hypometabolism pattern) | Pons or whole cerebellum | Lower SUVR = worse metabolism |
50| **Tau** (¹⁸F-Flortaucipir / AV-1451) | Tau neurofibrillary tangles | Cerebellar cortex (gray matter) | SUVR > 1.2–1.3 (region-dependent) |
51
52---
53
54## Core Processing Pipeline
55
56### Stage 1: T1w Preprocessing (via `smri-skill`)
57- Brain extraction, tissue segmentation, cortical parcellation (FreeSurfer)
58- Required for reference region definition and PVC
59
60### Stage 2: PET-to-T1w Coregistration (via `fsl-tool`)
61- Rigid-body registration of mean PET frame to T1w using FLIRT
62- Apply transformation to full dynamic or static PET series
63
64### Stage 3: Reference Region Definition
65- Use FreeSurfer parcellation to extract reference region mask in T1w space
66- Common references: cerebellar cortex (`Cerebellum_Cortex` in Desikan-Killiany), pons
67- Project mask to PET space or keep in T1w space with partial volume correction
68
69### Stage 4: SUVR Computation (via `scripts/compute_suvr.py`)
70- Extract mean signal from target ROI and reference region
71- SUVR = mean(target) / mean(reference)
72- Output per-region SUVR values as CSV
73
74### Stage 5 (Optional): Spatial Normalization to MNI
75- Warp PET (in T1w space) to MNI152 using T1w-to-MNI warp
76- Enable group-level voxelwise analysis
77
78---
79
80## Scripts
81
82### `scripts/compute_suvr.py`
83Computes SUVR from a PET image and ROI/reference masks.
84
85```bash
86python skills/pet-skill/scripts/compute_suvr.py \
87 --pet /path/to/pet_in_t1w_space.nii.gz \
88 --target-mask /path/to/target_roi_mask.nii.gz \
89 --ref-mask /path/to/reference_region_mask.nii.gz \
90 --output /path/to/pet_output/suvr_values.csv
91```
92
93---
94
95## Standard Output Layout
96
97```
98pet_output/
99├── coregistration/ # PET-to-T1w registration matrices and resampled PET
100├── suvr/ # SUVR maps and per-region CSV values
101│ ├── suvr_values.csv
102│ └── suvr_map.nii.gz
103├── pvc/ # Partial volume corrected values (if requested)
104├── mni/ # PET in MNI152 space (if normalization requested)
105├── qc/ # Coregistration quality, reference region coverage
106└── logs/
107```
108
109---
110
111## Installation (Handled by dependency-planner)
112
113No manual installation required at this layer.
114When first used, `pet-skill` automatically calls `dependency-planner` to ensure `fsl-tool`, `freesurfer-tool`, `nibabel-skill`, and `claw-shell` are ready.
115
116---
117
118## Important Notes & Limitations
119
120- PET images are typically low-resolution (~2–4 mm); coregistration to high-resolution T1w is essential.
121- Reference region selection is tracer-dependent; using the wrong reference region invalidates SUVR.
122- Partial volume correction is recommended for atrophy-prone populations (e.g., Alzheimer's disease).
123- Dynamic PET requires frame timing information from DICOM headers or sidecar JSON.
124- Static PET (single late frame) is sufficient for most clinical SUVR analyses.
125- This skill is for research workflows; not for clinical decision-making.
126
127---
128
129## When to Call This Skill
130
131- After `smri-skill` when T1w structural preprocessing is complete and PET data needs processing.
132- When the user needs SUVR computation from amyloid (PiB), metabolism (FDG), or tau PET data.
133- When PET-to-T1w coregistration or normalization to MNI space is required.
134- When partial volume correction is requested for ROI-based PET quantification.
135- When dataset skills (e.g., `aibl-skill`, `adni-skill`) delegate PET processing.
136
137---
138
139## Complementary / Related Skills
140
141- `smri-skill` → T1w structural preprocessing (brain extraction, parcellation)
142- `fmri-skill` → if PET is used alongside fMRI for multimodal analysis
143- `fsl-tool` → FLIRT (coregistration), FNIRT (normalization), PETPVC (partial volume correction)
144- `freesurfer-tool` → cortical/subcortical parcellation for ROI definition
145- `nibabel-skill` → NIfTI I/O for mask manipulation
146- `brain-visualization` → PET overlay visualization
147- `aibl-skill` → AIBL dataset (PiB, FDG, tau PET)
148- `adni-skill` → ADNI dataset (PET data available)
149
150---
151
152## Reference
153- Klunk et al. (2004): PiB amyloid imaging
154- Landau et al. (2012): Amyloid imaging with PiB and florbetapir
155- Baker et al. (2017): AV-1451 tau PET imaging
156- BIDS PET extension: https://bids-specification.readthedocs.io/en/stable/04-modality-specific-files/09-positron-emission-tomography.html
157- FSL: https://fsl.fmrib.ox.ac.uk/fsl/
158- FreeSurfer: https://surfer.nmr.mgh.harvard.edu/
159
160Created At: 2026-05-06 12:19 HKT
161Last Updated At: 2026-05-06 12:19 HKT
162Author: chengwang96