API Reference¶
The toolbox map. pycemrg-image-analysis is a stateless library: every module
below accepts in-memory data and returns in-memory data — none of it reads or
writes files (except the I/O utilities, which your orchestrator calls explicitly).
For the design rationale and the orchestration pattern that ties these together,
start with Architecture.
Core: building anatomy¶
| Module | What it does | Page |
|---|---|---|
| Recipes | Named, ordered workflows (get_recipe, list_recipes) and the Recipe/WorkflowStep contracts |
Recipes & Workflows |
| Components | Connected-component cleanup of segmentation artefacts — spatial ops + semantic wrappers | Components |
Utilities: I/O & spatial queries¶
| Module | What it does | Page |
|---|---|---|
| I/O | Read/write images, INR ↔ NIfTI conversion, round-trip behaviour | I/O Utilities |
| Spatial | Voxel ↔ physical coordinate mapping, slice extraction, mesh sampling | Spatial Queries |
| Label tools | LabelDiagnostic, LabelRemapper, check_labels — reconcile non-standard label schemes |
Label Tools |
Dataset prep: super-resolution training¶
| Module | What it does | Page |
|---|---|---|
| Augmentation | Intensity & spatial augmentation for SR training pipelines | Augmentation |
| Metrics | Volume-comparison metrics (MSE, PSNR, SSIM, gradient error) | Metrics |
Looking for the orchestration pattern?
The high-level scaffold → load → run → save sequence, the logic engines
(MyocardiumLogic, ValveLogic, …), and the frozen *CreationContract
dataclasses are documented on the Architecture page.