Structures
Dose volumes often contain structures of interest (e.g. the PTV or an OAR) where one may want to compute dose, or determine various metrics.
This section describes how to use structures to:
- Load structures from file.
- Create dose points within a given structure
- Tag dose points based on which structure they are in.
Creating Structures
One can load a mesh file using load_structure_from_ply
. Currently, only .ply
files are supported.
structure = load_structure_from_ply("mesh.ply")
This returns a Meshes.SimpleMesh
, as provided by Meshes.jl.
Currently, loading structures direct from a DICOM RT Structure Set is not supported. Structures stored in DICOM files are not in a "friendly" mesh format, and usually require some modification before they can be used. There are many tools available which convert DICOM structures into a suitable mesh file (e.g. 3D Slicer).
Coordinate Transformations
One can apply general transformations to any structure by calling the transform
or transform!
function:
T = fixed_to_bld(0., 0., 1000.)
transform(structure, T)
T
is a general transformation as provided by CoordinateTransformations.jl. In this example, the helper function fixed_to_bld
is used to create a transformation from the IEC Fixed to IEC BLD coordinate system. See Coordinate Transformations for more details.