Architecture Overview

PhysioMotion4D is an early-beta scientific Python package built from workflow classes plus reusable segmentation, registration, geometry, image, and USD components. Runtime classes inherit from PhysioMotion4DBase for logging and consistent configuration.

Architecture Diagram

CLI scripts / tutorials
       |
       v
Workflow classes
   |       |       |       |
   v       v       v       v
ITK images  Segmentation  Registration  PyVista meshes
   |              |             |             |
   +--------------+-------------+-------------+
                      |
                      v
            ContourTools / TransformTools
                      |
                      v
           ConvertVTKToUSD / vtk_to_usd
                      |
                      v
              OpenUSD / Omniverse

Workflow Classes

WorkflowConvertHeartGatedCTToUSD

Orchestrates 4D CT loading, segmentation, image registration, contour transformation, and animated USD generation.

WorkflowConvertCTToVTK

Converts one CT image into labeled VTK surface and voxel-mesh outputs.

WorkflowCreateStatisticalModel

Builds a PCA statistical shape model from aligned population meshes.

WorkflowFitStatisticalModelToPatient

Applies a template or PCA model to patient surfaces with model-registration stages.

WorkflowReconstructHighres4DCT

Reconstructs high-resolution 4D CT frames using time-series registration to a fixed high-resolution reference.

WorkflowConvertVTKToUSD

Wraps VTK-to-USD conversion for repository workflows and CLI use.

Key Boundaries

Image processing uses ITK images. Surface and volume meshes use PyVista/VTK. USD export converts those meshes to OpenUSD and applies the repository’s RAS-to-Y-up transform at the VTK-to-USD boundary.

The installed CLI commands are thin wrappers around these workflow classes. They are the best executable references for supported API usage.