userguide:design_task_functions:dtf
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
userguide:design_task_functions:dtf [2015/02/18 15:10] – external edit 127.0.0.1 | userguide:design_task_functions:dtf [2015/07/02 15:42] (current) – removed dpatenaude | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Design Task Functions (DTF) ====== | ||
- | Design Task Functions are typically higher level functions that will modify data parameters and make repeated use of the various Dose Calculation Functions and Radiotherapy Support Functions to accomplish some type of " | ||
- | ===== Aperture Design===== | ||
- | |||
- | Below is a list of the most common aperture design task function and a brief explanation of their intended usage (Specific details of each function, argument parameters, and return values are provided at the [[http:// | ||
- | |||
- | * **compute_aperture: | ||
- | * Compute the aperture without smoothing. | ||
- | * Limits mill radius. If not specified to 4.7625mm (0.1875" | ||
- | * **compute_smooth_aperture: | ||
- | * Compute an aperture smoothed with a Guassian type blur on all targets and organs | ||
- | * Limits mill radius. If not specified to 4.7625mm (0.1875" | ||
- | * **smooth_aperture: | ||
- | * Smooth an existing aperture with a Gaussian type blur. | ||
- | * **get_field_rect: | ||
- | * Gets the bounding box (in BEV) for the aperture opening (at true size not projected). | ||
- | * **compute_aperture_projection: | ||
- | * Compute the projection of the aperture onto the plane with the given Z depth | ||
- | * **compute_aperture_3d_shape: | ||
- | * Computes the final physical aperture device as a triangulated mesh | ||
- | ==== Geometry ==== | ||
- | |||
- | A beam-limiting device is typically referred to as an aperture. It limits the lateral extent of the radiation field, typically such that the beam’s eye view (BEV) projection of the target is circumscribed including provision for a penumbral margin. Since the user specifies the bixel grid parameters, a function must be available to allow for computation of the bounding field for the aperture shape to allow users to compute dose with an acceptable bixel grid. | ||
- | |||
- | The aperture device is modeled as one or more open (i.e. the radiation can pass through the defined shape) or closed (i.e. the radiation cannot pass through the defined shape) contours. The actual device blocking is achieved by shaping a high density material, either milled or with a multi-leaf collimator. The contour shapes are modeled at their intended position Zb along the beam axis. The overall aperture is bounded by the mounting apparatus that holds the aperture (typically creating circular or rectangular bounding aperture shapes). | ||
- | |||
- | The contour shape is constrained by the ability to mechanically construct the shape. Milling will be assumed as the primary mode of construction, | ||
- | |||
- | Aperture beam-limiting devices have a physical thickness which is ignored in the beam model. Only the aperture opening shape is considered during any Dosimetry App calculations. Apertures are considered to be infinitely thin and thickness of the devices and slabs will be ignored for divergence and on/off blocking (See Slopsema). | ||
- | |||
- | Refer to [[: | ||
- | ==== Computing an Aperture Shape ==== | ||
- | |||
- | This example will provide a high level walk through of calling the // | ||
- | |||
- | - Construct a // | ||
- | - <code cpp> | ||
- | // beam_geometry(std:: | ||
- | // sad: The apparent source-to-isocenter distance of the beam. A beam can have different apparent source positions | ||
- | // in the X and Y directions, so SAD is a two-dimensional value. | ||
- | beam_geometry geometry(make_vector(main_sad, | ||
- | rotation_about_axis(make_vector(1.0, | ||
- | rotation_about_axis(make_vector(0.0, | ||
- | </ | ||
- | - Construct a // | ||
- | - <code cpp> | ||
- | // struct_geom is a structure_geometry data type representing the desired contoured target volume | ||
- | triangle_mesh volume = compute_triangle_mesh_from_structure(struct_geom); | ||
- | </ | ||
- | - Define // | ||
- | - <code cpp> | ||
- | aperture_creation_params ap_params; | ||
- | |||
- | ap_params.targets.push_back(volume); | ||
- | ap_params.target_margin = 5.0; // Set margin around targets (5mm) | ||
- | ap_params.view = compute_beamline_view(geometry, | ||
- | ap_params.mill_radius = 1.6; // Set the tool radius used during aperture machining (1.6mm) | ||
- | ap_params.downstream_edge = 100.0; // Set the distance from patient side surface to isocenter along CAX (100mm) | ||
- | </ | ||
- | - The // | ||
- | - <code cpp> | ||
- | // Compute the aperture shape. Parameters are: aperture_creation_params, | ||
- | aperture aper = compute_smoothed_aperture(ap_params, | ||
- | </ | ||
- | |||
- | === Dose/Image Based Aperture Shape === | ||
- | |||
- | Using exposed Dosimetry App functions an existing dose image can be used as a target structure for aperture creation. The // | ||
- | |||
- | Specific details of each function, argument parameters, and return values are provided at the [[http:// | ||
- | |||
- | *<code cpp> | ||
- | // Create a target structure at the 50% isodose line. | ||
- | triangle_mesh dose_structure = compute_triangle_mesh_from_image(image_50_dose, | ||
- | // Push the target to the aperture_creation_params | ||
- | aperture_creation_params ap_params; | ||
- | ap_params.targets.push_back(dose_structure); | ||
- | </ | ||
- | |||
- | ==== Point vs Dual Source ==== | ||
- | |||
- | Point (single) and Dual Source apertures are created in roughly the same manner. When defining a // | ||
- | |||
- | <WRAP center 75%> | ||
- | < | ||
- | < | ||
- | </ | ||
- | |||
- | === Single Source === | ||
- | |||
- | The SAD IEC-X and IEC-Y values used during construction of the // | ||
- | |||
- | *<code cpp> | ||
- | // sad: The apparent source-to-isocenter distance of the beam. A beam can have different apparent source positions | ||
- | // in the X and Y directions, so SAD is a two-dimensional value, however, for a Single Point Source machine | ||
- | // these values match. | ||
- | double main_sad = 1000.0; | ||
- | beam_geometry geometry(make_vector(main_sad, | ||
- | rotation_about_axis(make_vector(1.0, | ||
- | rotation_about_axis(make_vector(0.0, | ||
- | </ | ||
- | |||
- | === Dual Source === | ||
- | |||
- | The SAD IEC-X and IEC-Y values used during construction of the // | ||
- | |||
- | *<code cpp> | ||
- | // sad: The apparent source-to-isocenter distance of the beam. A beam can have different apparent source positions | ||
- | // in the X and Y directions, so SAD is a two-dimensional value, with non-matching values for a Dual Source machine. | ||
- | double IEC_X = 1050.0; | ||
- | double IEC_Y = 1000.0; | ||
- | beam_geometry geometry(make_vector(IEC_X, | ||
- | rotation_about_axis(make_vector(1.0, | ||
- | rotation_about_axis(make_vector(0.0, | ||
- | </ | ||
- | ==== Aperture Mill Radius and Smoothing ==== | ||
- | |||
- | Enforcing machinability of the apertures at all evaluation steps is required in order to achieve plan vs. actual. Determining the machinable aperture shape is accomplished by performing an offset of the current “unmachinable” aperture shape by the radius of the final milling tool (in either the inward or outward direction) and then re-offsetting this result by the same distance. Machinability is enforced during aperture computation by using the // | ||
- | |||
- | Additionally, | ||
- | |||
- | The images below provide an exaggerated visual explanation of the creation options for aperture smoothing and mill radius. | ||
- | - <imgref ap_beam_setup>: | ||
- | - <imgref ap_noradiusnosmooth>: | ||
- | * Note: the dosimetry app api functions limit the mill radius if not specified to 4.7625mm (0.1875" | ||
- | - <imgref ap_radiusnosmooth>: | ||
- | - <imgref ap_radiussmooth>: | ||
- | |||
- | < | ||
- | |||
- | <WRAP center 85%> | ||
- | < | ||
- | < | ||
- | < | ||
- | </ | ||
- | |||
- | ==== Aperture Shape Manipulation ==== | ||
- | |||
- | The // | ||
- | * aperture_centerlines | ||
- | * aperture_half_planes | ||
- | * aperture_corner_planes | ||
- | * aperture_organs | ||
- | * aperture_manual_override | ||
- | |||
- | Below is a brief explanation of each of the manipulation tools and their intended effect (Specific details of each argument parameter are provided at the [[http:// | ||
- | |||
- | ** Example usage:** | ||
- | *<code cpp> | ||
- | aperture_creation_params ap_params; | ||
- | //... | ||
- | // Set the rest of the aperture_creation_params necessary | ||
- | //... | ||
- | ap_params.overrides.push_back(aperture_manual_override(make_polyset(poly), | ||
- | ap_params.half_planes.push_back(aperture_half_plane(make_vector(0., | ||
- | aperture aper = compute_smoothed_aperture(ap_params, | ||
- | </ | ||
- | === Structure Centerline === | ||
- | |||
- | Data struct // | ||
- | |||
- | The aperture centerline defines a geometry using the centerline of a structure and a fixed width margin to create a region to remove from the aperture opening. In <imgref ap_centline_setup> | ||
- | |||
- | < | ||
- | |||
- | === Aperture Organ === | ||
- | |||
- | Data struct // | ||
- | |||
- | The aperture organ defines a geometry that can be used to clip the aperture opening by the projection of the structure (into BEV), and if applicable, expanded by a margin. By setting the occlude flag, the projected organ shape used for clipping can be limited by the targets if the target is between the source and the organ. | ||
- | |||
- | In <imgref ap_organ_setup> | ||
- | |||
- | < | ||
- | |||
- | In <imgref ap_organ_setup1> | ||
- | |||
- | < | ||
- | |||
- | === Manual Override === | ||
- | |||
- | Data struct // | ||
- | \\ \\ | ||
- | Manual override allows the manipulation of the aperture opening using a constructed polyset shape. Coordinates of the points making up the polygon at to be specified in BEV at the plane of the aperture downstream edge. The aperture opening can either be expanded to or limited based on the specified shape of the override polygons. <imgref manual_override> | ||
- | |||
- | < | ||
- | |||
- | |||
- | === Aperture Half & Corner Planes === | ||
- | |||
- | Data struct // | ||
- | |||
- | The aperture half and corner planes define a geometry that can be used to remove the portion of the aperture opening in the region on the positive sides (side to which the normal points) of the planes. This feature is necessary in order to create match field aperture devices. In <imgref ap_planes>, | ||
- | |||
- | < | ||
- | |||
- | ===== Range Compensator Design ===== | ||
- | |||
- | The following example assumes you are familiar with the [[http:// | ||
- | |||
- | * **compute_optimized_rc: | ||
- | * Compute the optimal range compensator for an SOBP field with or without an existing dose. | ||
- | |||
- | Refer to [[: | ||
- | |||
- | ==== Range Compensator Optimizer Options ==== | ||
- | |||
- | The // | ||
- | |||
- | The // | ||
- | |||
- | *<code cpp> | ||
- | // The maximum number of iterations for the optimization to run. | ||
- | // Setting iteration_count = 0 creates a geometric only non optimized range compensator. | ||
- | int iteration_count; | ||
- | </ | ||
- | ==== Compute an Optimized Range Compensator ==== | ||
- | |||
- | This example will provide a high level walk through of calling the // | ||
- | |||
- | |||
- | The // | ||
- | |||
- | *<code cpp> | ||
- | // Compute the optimal range compensator (RC) for an SOBP field with or without an existing dose. | ||
- | api(fun monitored) | ||
- | // A nurbs range compensator. | ||
- | proton_degrader | ||
- | compute_optimized_rc( | ||
- | // Image 3D of patient stopping power values. | ||
- | image3 const& stopping_power_image, | ||
- | // The properties of the beam for which an RC is to be computed. | ||
- | beam_properties const& beam_props, | ||
- | // The SOBP calculation layers for the desired range and mod. | ||
- | std:: | ||
- | // The aperture for this beam. | ||
- | aperture const& aper, | ||
- | // Material properties to use for the resulting RC. | ||
- | proton_material_properties const& rc_material, | ||
- | // The downstream position of the RC on the side nearest to the patient. | ||
- | double rc_patient_side_edge, | ||
- | // Target(s) for range compensator construction. | ||
- | std:: | ||
- | // Optimization properties to use for range compensator design. | ||
- | rc_opt_properties const& rc_opts); | ||
- | </ | ||
- | |||
- | ==== Patch Field Range Compensator ==== | ||
- | |||
- | A patch field range compensator can easily be created using the target(s), ct image, and pre-existing dose. The // | ||
- | |||
- | The <imgref rc_patch_setup> | ||
- | |||
- | < | ||
- | |||
- | The target (green) is shown within the 3D image (blue & red) that represents the current dose of the target that has been delivered from another field angle. The blue values of the image represent zero dose while the red 100%. Passing this // | ||
- | |||
- | An approximation of the resulting range compensator surface is shown in <imgref rc_patch_surface> | ||
- | |||
- | < | ||
- | {{page> |
userguide/design_task_functions/dtf.1424272230.txt.gz · Last modified: 2021/07/29 18:22 (external edit)