Pinnacle Modeling

This is a summery of how to model a machine in Pinnacle from scratch, based on some training with Shan.

The Pinnacle Model

(move to its own page when big enough)

Basic Process

  1. The fluence from the linac head is computed from first principles, but modified based on input from measured data [semi-empirical]
    1. The Pinnacle model takes input dose data (PDD, profiles etc) and from this models the fluence coming from the head of the machine.
    2. It then uses further data to determine how modifiers (wedges, blocks etc) will affect fluence.
    3. Based on measured profiles, it determines its own collimator scatter factor OFc
  2. Then it projects this fluence through the dose grid to determine the TERMA at each voxel.
    1. Pinnacle takes a CT set, and overlays a dose grid
    2. The average CT# in a dose grid voxel is taken and the CT-$\rho$ table (and a $\rho_e$ correction) used to determine the electron density for that voxel. This is done for the whole grid.
    3. The TERMA in a voxel is then found (ie primary beam component for each voxel)
  3. Lastly, a superposition of TERMA and an energy deposition kernel results in the dose to a voxel. (The kernel works to intrinsically determine phantom scatter so no OFp is needed.

The Polyenergetic Kernal

Linac output is a spectrum, not monoenergetic. For each energy in the spectrum, there is a different dose deposition curve with depth. In order to have quick calculations, Pinnalce approximates the whole spectrum by summing over all energies at each depth, and weighting the resulting dose deposition by prevalence of each energy, so that a single kernel is created for the beam.

Limitations of the Pinnacle Photon Model

  • the polyenergetic kernel spectrum assumption
  • scaling of physical density to electron density
  • assumptions in how BU is modeled (no measured data is good)

Some historical planning models

  • Milan-Bentley Correction-based Model (see Metcalfe book for good description of this area)
  • Batho Power law Corrections
  • Equivalent Tissue Air Ratio (ETAR) Method — "2.5D" as each CT plane is convoled to find scatter, but the longitudinal scatter is found by assuming the neighbouring slices are uniform with an average value of the whole slice, then convoling that back. Less computationally expensive than full 3D but not as accurate either.

Physics Mode

Physics Mode has 3 components we use (brachy and stereo not used at our centre):

CT Density Tables

The definition of Hounsfield Units (HU) as goes from -1000 (air) to 0 (water), with no upper bound but typically scanners go to ~3000 so there are 4096 values (212). (bone tops out at about 1000 on this scale)

However, Pinnacle has CT Number tables, not HU tables, as its scale goes from 0 to 4000. This avoids signed integers, so uses less memory. This means you can have a shifted table (by 1000 units) if the values are mistranslated. After commissioning, test it by calcing dose to a water phantom to a reference depth and check dose is as expected. If not, check the CT table before fudging output factors!

To create a table, scan a phantom such as the RMI phantom, with plugs of known physical and electron densities. These should be scanned in a region surrounded by the solid water wheel as this provides similar scatter conditions as found for inhomogeneities within a patient (and significant changes in CT number arise otherwise). Take an average of the plug value (in a uniform region) and construct the table.

Ideally, electron density ($\rho_e$) should be used for the planning system, as the density of electrons will decide the dose deposited in tissue in the end (Compton interactions). However, a CT directly measures physical attenuation, hence Pinnacle uses physical density for its CT density table. This is an approximation, so it then applies a correction curve to convert physical density to electron density when calcing dose. In order to measure $\rho_e$ a dual energy CT is needed (differentiate attenuation from two qualities to find $\rho_e$) but this is involving and not widely used. Still, some TPS may require CT-$\rho_e$ tables.

The big kink in the CT table is where artifacts override a region due to the limitations of x-ray CT (ie, where beam hardening and partial volume effects dominate like in metallic implants).

If a table needs modification, DON'T edit it directly, but make a copy. All tables are timestamped, and if you change a table, then old plans will be unable to find the table. Then you need to re-calc, or edit the plan.Trial file.


How to create a Photon Beam Model

A simplified description is:

  • Collect appropriate beam data with measurements
  • Add a Machine (from scratch or from a template)
  • Edit Machine
    • Define the physical dimensions, scales and co-ordinates of jaws, collimator, wedges, couch, MLC, etc.
  • Add Energies
    • Add geometries for fluence modelling (sets of data which are a function of (field size, SSD, wedge) for each energy
      • Add PDD, profiles (over dref- 20cm) from BDAS for each geometry
  • Auto-model to create source and linac head model
  • Fine Tune the model to match profiles better
  • Compute Output Factors
  • Test

The best (Shan's) way of modeling the beam is as follows:

Tab 1 - Define the spectrum
A change in the spectrum will affect the PDD curve shape. Therefore we use measured PDD and model the spectrum to match our PDD. The spectrum is modeled with the polyenergetic kernel, based on published values (ie Mohan data or vendor data).

  1. Collect PDD over a range of FS using BDAS and import to Pinnacle
  2. Open the energy model, set the phantom grid size in last tab then back to the first (0.4cm is OK for starters, use 0.25cm when done to check and fine-tune)
  3. Load published or previously saved spectrum as a starting point from the Model Library.
  4. Compute PDD for each FS and have a look of computed vs measured (we are looking at the PDD past the build-up region only as the measurement for the BU region with a cylindrical chamber is wrong and we model it seperately later.)
  5. Set the 'Connect at' depth to be dref (this is our normaisation point) When the model is good, it will match regardless of 'Connect at' depth.
  6. Auto-model
    1. Load the FineTuneSpectrum Sequence
    2. Set the model as 'All Field Sizes' as this is more complete than having multiple models for single FS which are interpolated between (especially as the interpolation is based on 2ab/(a+b) which will give rubbish for say 40x5cm fields). The All FS model will have better results for highly asymmetrical fields.
    3. Start Optimization, let it run through the 7 steps.
    4. For each FS, Compute Profiles, Click Detail and look at the %Err column. <0.5% is good, <0.2% is excellent. Repeat Optimization until happy.

Tab 2 - Define the Build Up and Electron Comntamination
From MC simulation we know surface dose should be ~50% from 6MV and ~15% for 18MV. Electron Contamination (EC) from the flattening filter is an additional ~10%. We modeled the BU region to match this and not measurement, with the curve being smooth until it reaches Dmax. The best way to model it is to play with variables and see how this affects the curves. But remember physical principles of EC so that curves are realistic as well as a good match.
Pinnacle models EC in three ways: EC vs depth, EC vs FS and EC vs doff-axis.

  • The EC depth curve have a constant gradient til Dmax, and then exponentially decays to about 1cm past Dmax.
    • Set variables so that the EC depth curve is realistic (constant decay to Dmax, sharp drop to 1cm beyond and the curve has no discontinuities).
    • EC surface dose is the Y intercept for exponential model
    • Set Max Depth as ~1cm past Dmax. This is the X intercept for exp curve.
    • K describes the rate of exponential decay (ie curvature of the exp)
    • DF defines depth where linear line stops and exp begins on X axis
    • SF defines the dose where linear Y intercept is (entered as fraction of ECsurfdose/SF).
  • The EC vs FS is a linear line after ~5cm2 but has a log growth at small FS
    • Auto-modeling of C1, C2, C3 is recommended, but if using seperate FS models, use the same values fro each model (don't re-model each time).
  • EC vs Off-axis distance is modeled as a Gaussian. You set the Gaussian width. If you wish to use off-axis softening to incorporate this variable, set as 0 (square wave). There is no direct data to compare this to.
  • When done, go back and check EC hasn't changed the Dmax normalization of the rest of the PDDs in the first tab.

Tab 3 - In-Field Profile Modeling
In field, the profile shape is a result of attenuation through the flattening filter and the physical dimension of the source (target). It can be a good idea to go to the out-of-plane field and change the source size first to something close to physical (in both directions) so that horn and penumbra widths are close… see notes on the next tab.
The simple way to model the flattening filter is as a cone cut-out of the profile. (consider it a cone, which the beam passes and hence a negative of its shape is taken out of the attenuated profile). The cone is defined by radius (should be $\ge \sqrt{40^2 +40^2}$) and angle which should match the profiles. Do the 40x40 FS first, as it should match at all smaller FS then.
The other way to model the flatfilt is to define an arbitrary profile which can have discontinuous points to account for the flatfilts real curvature. However, the cone normally produces quite good results.
Then to account for unequal beam hardening across the flatfilt, we apply an off-axis softening factor (off-axis is softer than CAX as less flatfilt material is present). Play with this at dref first then check other depths. This also acts like a modifier to the cone profile, and can incorporate EC off-axis shape.

Tab 4 - Out-of-Field Profile Modeling
This looks at the penumbra width and the profile tails. Penumbra physically a factor of the effective source size (target) [broad-beam geometry etc]. To set the penumbra, check a small field (ie, 4x4cm) which has been measured with high resolution (ie diode scan). Larger source width will have a rounder/wider penumbra. This also affects the horns in-field. The tail is defined by the flattening filter scatter and transmission through the jaws. This can be different for X and Y or the same (also need MLC transmission for tertiary MLC) The scattering amount is defined by Gaussians.


Data Collection

The minimum set of measurements needed to commission an open field are:

Data Type SSD Depth Field Size Detector Notes
PDD 90 variable 4x4 to 40x40 small cylindrical / diode used for spectrum
PDD 100 variable 4x4 to 40x40 small cylindrical / diode used for TMR derivation
Profiles 90 dref, 5, 10, 20 4x4 to 40x40 Diode used for in-plane and penumbra modeling
cell-content cell-content cell-content cell-content cell-content cell-content
cell-content cell-content cell-content cell-content cell-content cell-content

Practical Tip: Alignment of the tank for profiles
Check the source is aligned to CAX by fixing a chamber to a physical wedge. Expose and measure, then rotate the coll (with wedge and chamber attached) 90º and repeat. If chamber reading varies then the source is not aligned to the colimator axis of rotation.
If source is on CAX, then check the chamber is aligned to CAX. Do a profile scan, mirror it and locate the centre (CAX correction in software). Now repeat the scan to check the software correction is correct.
Lastly, check the tank arm motor is OK by scanning left-to-right, then repeating the profile right-to-left and comparing.

Practical Tip: Measuring Penumbra
Defined as distance from D80% to D20%. Typical width is 2-5mm dependingon FS and jaws.
Ideally, 1 data point for every 10% in profile higher would be nice (every 0.2mm?). At least measure to 1mm resolution (depends on detector resolution).

Exam Tips: Tank Questions
Typical tank questions and mistakes include:

  • Gain (ie, background measurements should be re-taken whenever gain is changed as they are not amplified in Wellhodfer setup)
  • Reference Monitor ((ie, theoretically we could use a diode for field and a chamber for monitor.. its just a ratio.. but Wellhofer only lets you have one bias for both meters)
  • CAX (ie, not setting linac CAX parallel to tank chamber vertical direction)
  • deff (ie, double correcting, correcting the wrong way, giving the wrong correction for cylindrical chambers for photons (0.6r) compared to electrons (0.5r), assuming all parallel plate chambers have 1mm windows (Markus has 0.5mm) etc.
  • deff for upright chamber positions: how do you find it? (this is off the top of my head) First, measure PDD with chamber vertical and with normal deff offset. Find dmax. Now scan PDD with chamber upright. Horizontal(dmax - deff) = Vertical (dmax - deff), therefore deff, vert = dmax, vert - dmax, hor.

Modeling MLC Round Ends

Pinnacle has a table of Leaf Position vs offset for compensating for the MLC Round End effect Leaf Position is the physical position of the leaf, which for Varian is the same as the light field position at 100cm SSD, as Varian calibrate MLC position to the light field.
Offset is the offset in the radiation field from the light field due to partial transmission adn rounded geometry. This is measured using film.

Modeling Physical Wedges

Profiles and PDD are needed for various FS and SSD for each wedge. This creates the fluence just beyond the wedge. Density, source-wedge-distance, physical height profile and length of the wedge are also needed to determine fluence. Measure physical height and length with calipers, get SWD from manuals (check distance definition).

Wedge scatter is not considered in Pinacle. If you fudge the physical height profile to match measured data at one SSD, it will not match at all other SSD's. If fudging is needed, do so at a median clinical SSD (ie, 90cm) so it is a good match over most of the clinical range.

The Manufacturers code is sent in DICOM files and used by the R&V, so it must match the R&V code.

The in-plane modeling is a 360º rotation of a vector, so it isn't much use for modifying [non-radially symmetric] wedge fields. However, you can use it to lower the horns of wedge profiles, which are smaller than open fields due to beam hardening.

Order of modeling physical wedges:

  1. Inital setup: source-wedge distance, wedge physical density, physical wedge profile
  2. Get the spectrum from PDD automodel
  3. Do empirical energy-specific modeling for the inplane (non-wedge) profile first at the largest FS… flatfilt profile, off axis soft scat.
  4. Now do the wedge-gradient profile, adjusting the wedge-compensator scatter factor and physical wedge profile.
  5. If you can't get it good, adjust the flatfilt arbitrary profile, but you have to redo the inplane profile then.
  6. After doing the largest FS [40x20 for <60º else 40x15], work down to 5x5. Make sure you have a model for the smallest and largest FS so that Pinnacle can interpolate between them (if you make an All FS model, the PDD will be rubbish due to poor wedge scatter modeling creating bad spectrums). Need at least 26.7cm2, 20cm2 and 5cm2 models.
  7. Check 10x10 and 15x15 fields, if the model isn't good, maybe add models for these fields.

Practical Tip: Measure PDD and profiles in a clinically relevant setup (ie, SSD=90cm) as the wedge model will change significantly with SSD, so best to make it good for the most common average SSD.

Practical Tip: Setting up the tank for physical wedge scans
Tank water surface is always horizontal. Therefore the beam needs to be perpendicular to the surface. Easiest way is to project the crosswire shadow on a chamber and lower the chamber to see if the shadow tracks it. The crosswire shadow visually defines inplane and crossplane directions, and a wedge should be orthogonal to these. Shake the wedge to check it is not loose, and then visually look that it is mounted straight (quick fix in exam is to turn coll to make it align to tank, but don't do this for commissioning).

EDW Modeling

Pinnacle uses Varian's Golden STT (60 degree, defined for each energy). The only modification you can make is the transmission factor. DON'T edit the Golden STT file, it gets messy!

Because of the limited control of the EDW, we create a second EDW only machine. For this machine the EDW is added, then the open field profiles modified until the EDW profiles match (EDW delivery is part open field, part jaw sweep). This does however invalidate the open fields and so this machine should never be used for open beams or physical wedges!

Assume EDW PDD are the same as for open fields (almost are as there is no spectrum change, and a real pain to measure). Get EDW profiles from a chamber array (1D or 2D)… NOTE: the non-wedge direction profile is also different from an open field due to different Sc at each point in the EDW delivery.

Output Factors

Set your calibration point (Pinnacle asks for 10cm or more depth as this does not contain electron contamination)
The cGy/MU at this point is the TMR(dcal) !!!
Calculate output factors, then test regular fields vs measured factors over a range of depths (normal commissioning tables). Manually change factors that deviate from measurements and then recompute and repeat the comparison. Long and Tedious.


Electron Modeling

to be added…

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License