Workflow Development Guide
Workflow classes coordinate multiple processing steps behind a stable Python API and, where useful, an installed CLI command.
Current Workflow Mapping
CLI command |
Workflow class |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
Workflow Example
from physiomotion4d import WorkflowConvertHeartGatedCTToUSD
workflow = WorkflowConvertHeartGatedCTToUSD(
input_filenames=["cardiac_4d.nrrd"],
contrast_enhanced=True,
output_directory="./results",
project_name="patient_001",
registration_method="ants",
)
final_usd = workflow.process()
Adding a Workflow
Inherit from
physiomotion4d.PhysioMotion4DBase.Keep the constructor explicit and typed.
Use
self.log_info()andself.log_debug()for runtime status.Keep file I/O behavior predictable and documented.
Add a CLI wrapper only when the workflow is useful from the command line.
Add focused tests using synthetic data where possible.
Regenerate
docs/API_MAP.mdafter exposing public methods.
Risk Areas
Changes at the ITK-to-PyVista boundary, time-series transform direction, or RAS-to-Y-up USD coordinate conversion are high risk and should include focused tests plus visual or metadata validation.