Skip to content

[WIP] No Dose3D patient creation enabled, better CT export - #89

Open
jhajduga wants to merge 2 commits into
developfrom
88-add-genericphantom-3mf-import-mode-with-ctdicom-export-workflow
Open

[WIP] No Dose3D patient creation enabled, better CT export#89
jhajduga wants to merge 2 commits into
developfrom
88-add-genericphantom-3mf-import-mode-with-ctdicom-export-workflow

Conversation

@jhajduga

@jhajduga jhajduga commented May 13, 2026

Copy link
Copy Markdown
Collaborator

Completed: Generic 3MF-based phantom and CT generation workflow

Implemented support for importing arbitrary 3MF/DB-based phantom geometries without constructing a patient object.

The new workflow allows geometry-only simulations to be run directly from imported 3MF models and supports generating synthetic CT data in both CSV and DICOM formats.

Completed changes:

  • added GenericPhantom as an IPhysicalVolume-based geometry module,
  • added the GenericPhantom_3mf envelope/build mode,
  • allowed PatientGeometry to operate with m_patient == nullptr,
  • added TOML-based configuration of DB/3MF geometry placement,
  • made scoring-data merging safe when no patient object is defined,
  • improved logging for CSV CT and DICOM CT export,
  • made the Python DICOM exporter robust against unknown material names,
  • extended the HU dictionary with materials available through MaterialsSvc,
  • documented the complete 3MF-based CT generation workflow in README.md.

The documentation now includes:

  • required input files,
  • an example TOML configuration,
  • build and execution commands,
  • expected output directories,
  • CSV CT export instructions,
  • DICOM CT generation instructions.

This provides a complete geometry-only workflow for importing a 3MF model and generating synthetic CT output without requiring a conventional patient definition or sensitive detector configuration.

TODO: Generalized 3MF geometry and scoring configuration

The next step is to remove the remaining hard-coded assumptions from the geometry construction and scoring workflow.

Planned work:

  • add basic aliases for biological tissues and commonly used material names, (in material service)

  • add TOML-configurable sensitive-volume selection for geometries imported from 3MF/DB,

  • allow sensitive volumes to be selected using a list of element names, database keys, logical-volume names, or other stable identifiers,

  • extend the geometry-building loop so imported elements and their roles can be defined entirely in TOML,

  • distinguish explicitly between:

    • geometry-only mode for CT generation,
    • geometry with scoring enabled,
    • conventional patient-based simulation,
  • remove the current workarounds required to run simulations without a patient definition or sensitive volume,

  • make geometry-only CT export a first-class execution mode rather than a special case of the standard simulation workflow,

  • consider adding a dedicated executable or alternative main.cpp focused exclusively on geometry import and synthetic CT generation.

A possible target configuration could allow each imported element to define:

  • its 3MF/DB identifier,
  • placement and transformation,
  • material override,
  • whether it should be scored,
  • the scoring type or sensitive-detector assignment,
  • whether it should be included in CT export.

The final goal is to make arbitrary imported geometries fully configurable from TOML, without requiring source-code changes for each new phantom.

@jhajduga jhajduga linked an issue May 13, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add GenericPhantom 3MF import mode with CT/DICOM export workflow

2 participants