ctp-skill

Compute CBF, CBV, MTT, and Tmax maps from 4D CT perfusion NIfTI series using cSVD deconvolution.

89|5|Updated Mar 25, 2026
One-click install
npx skills add https://github.com/CUHK-AIM-Group/NeuroDiscovery --skill ctp-skill-cuhk-aim-group
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ctp-skill
Source: https://github.com/CUHK-AIM-Group/NeuroDiscovery/tree/main/skills/ctp-skill
Command: npx skills add https://github.com/CUHK-AIM-Group/NeuroDiscovery --skill ctp-skill-cuhk-aim-group

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy, scipy, pandas, nibabel, matplotlib, SimpleITK, and includes scripts (resource) and references (resource) components.

What problem does it solve? Processing 4D CT perfusion time series into quantitative perfusion maps requires careful motion correction, AIF/VOF-based deconvolution, and unit validation that ad-hoc scripts often get wrong, producing unreliable CBF, CBV, MTT, and Tmax values. ## Core Features & Use Cases - Rigid Motion Correction: Align 4D CT frames to a precontrast reference frame with SimpleITK mutual-information registration, per-frame displacement metrics, and coverage masks. - cSVD Deconvolution: Compute CBF, CBV, MTT, and Tmax maps from baseline-subtracted HU curves using block-circulant truncated SVD with optional VOF-based AIF scaling. - Supplied-Map Summarization: Validate and summarize vendor-derived CBF/CBV/MTT/Tmax maps with explicit unit checks, grid matching, and ROI statistics. - Use Case: A researcher with a motion-corrected 4D CTP NIfTI series, brain mask, and AIF mask runs the compute mode to generate perfusion maps, ROI summaries, QC plots, and a run manifest for cohort analysis. ## Quick Start Run the ctp compute script on my motion-corrected 4D CT perfusion NIfTI series with my brain mask, AIF mask, and acquisition metadata JSON to produce CBF, CBV, MTT, and Tmax maps with QC outputs.

Frequently Asked Questions about ctp-skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I compute CBF, CBV, MTT, and Tmax maps from CT perfusion data?

Run the ctp.py compute mode with a motion-corrected 4D HU NIfTI series, acquisition metadata JSON, brain mask, and AIF mask. It performs baseline subtraction and block-circulant truncated SVD deconvolution, writing the four maps plus ROI summaries and QC files.

How do I motion correct a 4D CT perfusion time series?

Use motion_correct.py with the 4D NIfTI series and metadata containing baseline frame indices. It rigidly registers each frame to the first precontrast frame using SimpleITK mutual information, then outputs the corrected series, coverage mask, and per-frame displacement metrics for manual review.

Can I use this tool for ASL or DSC perfusion MRI?

No. The skill is explicitly scoped to CT perfusion with HU-based delta-signal curves and does not apply the logarithmic MR transform. For ASL or DSC perfusion MRI, use a modality-appropriate processing pipeline instead.

What input format does CT perfusion processing require?

Inputs must be 4D NIfTI in mm spatial units with HU values, plus a JSON sidecar containing frame_times_s in seconds, at least two initial baseline_frames, and a motion_corrected flag. Masks must be binary 0/1 NIfTI on the exact same grid and affine.

Why does the CTP compute step reject my acquisition timing?

The deconvolution requires uniform time spacing for the convolution matrix. If frame times are irregular, explicitly pass --resample-dt in seconds after reviewing sampling; the script interpolates without extrapolating and rejects non-uniform grids otherwise.

Are the output perfusion maps clinically validated?

No. The maps are research reference implementations without clinical validation, leakage correction, or diagnostic thresholds. They must not be used to label ischemic core, penumbra, treatment eligibility, or patient outcomes.