sequencing

MLC leaf sequencing algorithms for converting fluence maps to deliverable photon IMRT plans.

class matRad_PhotonSequencerAbstract(pln)

Bases: matRad_SequencerBase

Constructor, forwards to the base class. An explicit constructor chain is required so that property assignment from pln persists under Octave.

Property Summary
numOfMLCLeafPairs = 80
sequencingLevel = 5
Method Summary
sequence(this, w, stf)
initBeam(this, stf, wCurr)
sequencing2ApertureInfo(this, sequence, stf)

MLC parameters:

plotSegments(this, sequencing)

create the sequencing figure

static isAvailable(pln, machine)
static aperture2collimation(pln, stf, sequence, visBool)
class matRad_SequencingPhotonsEngelLeaf(pln)

Bases: matRad_PhotonSequencerAbstract

Property Summary
name = 'Photons Engel Leaf Sequencer'
shortName = 'engel'
possibleRadiationModes = {'photons'}
Method Summary
sequence(this, w, stf)
static isAvailable(pln, machine)

see superclass for information

class matRad_SequencingPhotonsXiaLeaf(pln)

Bases: matRad_PhotonSequencerAbstract

Property Summary
name = 'Photons Xia Leaf Sequencer'
shortName = 'xia'
possibleRadiationModes = {'photons'}
mode = 'rl'

sliding window (sw) or reducing level (rl)

Method Summary
sequence(this, w, stf)
static isAvailable(pln, machine)

see superclass for information

class matRad_SequencingPhotonsSiochiLeaf(pln)

Bases: matRad_PhotonSequencerAbstract

Property Summary
name = 'Photons Siochi Leaf Sequencer'
shortName = 'siochi'
possibleRadiationModes = {'photons'}
Method Summary
sequence(this, w, stf)
decomposePort(~, map)

Returns tops and bases of a fluence matrix “map” for Siochi leaf sequencing algorithm (rod pushing part). Accounts for collisions and tongue and groove (Tng) effects.

convertToSegments(this, shapes, shapesWeight, k, tops, bases)

Convert tops and bases to shape matrices. These are taken as to be the shapes of uniform level/elevation after the rods are pushed.

differentSlab(~, tops, bases, level)

Returns 1 if slab level is different than slab level-1 0 otherwise

static isAvailable(pln, machine)

see superclass for information

class matRad_ParticleSequencer(pln)

Bases: matRad_SequencerBase

matRad_ParticleSequencer: Sequencer for scanned particle delivery. Computes the spot delivery order and timing (spill / lateral scanning model), e.g. for 4D dose calculation. It does not modify the fluence.

Constructor, forwards to the base class. An explicit constructor chain is required so that property assignment from pln persists under Octave.

Property Summary
name = 'Particle IMPT Scanning Sequencing'
shortName = 'IMPT'
possibleRadiationModes = {'protons','helium','carbon','oxygen'}
weightPencilBeam = 1e6
esTime = 3*10^6

[mu s] time required for synchrotron to recharge it’ spill

spillRechargeTime = 2*10^6

[mu s] number of particles generated in each spill

spillSize = 4*10^10
scanSpeed = 10

[m/s] speed of synchrotron’s lateral scanning in an IES

spillIntensity = 4*10^8

number of particles per second

Method Summary
sequence(this, w, stf)
calcSpotOrder(~, stf)
calcSpotTime(this, sequence, w, stf)
static isAvailable(pln, machine)

see superclass for information

static makePhaseMatrix(sequence, numOfPhases, motionPeriod)
matRad_engelLeafSequencing(resultGUI, stf, dij, numOfLevels, visBool)

multileaf collimator leaf sequencing algorithm for intensity modulated beams with multiple static segments accroding to Engel et al. 2005 Discrete Applied Mathematics

call

resultGUI = matRad_engelLeafSequencing(resultGUI,stf,dij,numOfLevels,visBool)

Input:
  • resultGUI – resultGUI struct to which the output data will be added, if this field is empty resultGUI struct will be created

  • stf – matRad steering information struct

  • dij – matRad’s dij matrix

  • numOfLevels – number of stratification levels

  • visBool – toggle on/off visualization (optional)

Output:

resultGUI – matRad result struct containing the new dose cube as well as the corresponding weights

References

[1] http://www.sciencedirect.com/science/article/pii/S0166218X05001411


Copyright 2015-2026 the matRad development team.

This file is part of the matRad project. It is subject to the license terms in the LICENSE file found in the top-level directory of this distribution and at https://github.com/e0404/matRad/LICENSE.md. No part of the matRad project, including this file, may be copied, modified, propagated, or distributed except according to the terms contained in the LICENSE file.


matRad_sequencing2ApertureInfo(Sequencing, stf)

matRad function to generate a shape info struct based on the result of multileaf collimator sequencing

call

apertureInfo = matRad_sequencing2ApertureInfo(Sequencing,stf)

Input:
  • Sequencing – matRad sequencing result struct

  • stf – matRad steering information struct

Output:

apertureInfo – matRad aperture weight and shape info struct

References

Copyright 2015-2026 the matRad development team.

This file is part of the matRad project. It is subject to the license terms in the LICENSE file found in the top-level directory of this distribution and at https://github.com/e0404/matRad/LICENSE.md. No part of the matRad project, including this file, may be copied, modified, propagated, or distributed except according to the terms contained in the LICENSE file.


matRad_siochiLeafSequencing(resultGUI, stf, dij, numOfLevels, visBool)

multileaf collimator leaf sequencing algorithm for intensity modulated beams with multiple static segments according to Siochi (1999)International Journal of Radiation Oncology * Biology * Physics, originally implemented in PLUNC (https://sites.google.com/site/planunc/)

Implemented in matRad by Eric Christiansen, Emily Heath, and Tong Xu

call

resultGUI = matRad_siochiLeafSequencing(resultGUI,stf,dij,numOfLevels) resultGUI = matRad_siochiLeafSequencing(resultGUI,stf,dij,numOfLevels,visBool)

Input:
  • resultGUI – resultGUI struct to which the output data will be added, if this field is empty resultGUI struct will be created

  • stf – matRad steering information struct

  • dij – matRad’s dij matrix

  • numOfLevels – number of stratification levels

  • visBool – toggle on/off visualization (optional)

Output:

resultGUI – matRad result struct containing the new dose cube as well as the corresponding weights

References

[1] https://www.ncbi.nlm.nih.gov/pubmed/10078655


Copyright 2015-2026 the matRad development team.

This file is part of the matRad project. It is subject to the license terms in the LICENSE file found in the top-level directory of this distribution and at https://github.com/e0404/matRad/LICENSE.md. No part of the matRad project, including this file, may be copied, modified, propagated, or distributed except according to the terms contained in the LICENSE file.


matRad_aperture2collimation(pln, stf, sequencing, apertureInfo)

matRad function to convert sequencing information / aperture information into collimation information in pln and stf for field-based dose calculation

call

[pln,stf] = matRad_aperture2collimation(pln,stf,sequencing,apertureInfo)

Input:
  • pln – pln file used to generate the sequenced plan

  • stf – stf file used to generate the sequenced plan

  • sequencing – sequencing information (from resultGUI)

  • apertureInfo – apertureInfo (from resultGUI)

Output:
  • pln – matRad pln struct with collimation information

  • stf – matRad stf struct with shapes instead of beamlets

References

Copyright 2022-2026 the matRad development team. Author: wahln

This file is part of the matRad project. It is subject to the license terms in the LICENSE file found in the top-level directory of this distribution and at https://github.com/e0404/matRad/LICENSE.md. No part of the matRad project, including this file, may be copied, modified, propagated, or distributed except according to the terms contained in the LICENSE file.


matRad_xiaLeafSequencing(resultGUI, stf, dij, numOfLevels, visBool)

multileaf collimator leaf sequencing algorithm for intensity modulated beams with multiple static segments according to Xia et al. (1998) Medical Physics

call

resultGUI = matRad_xiaLeafSequencing(resultGUI,stf,dij,numOfLevels) resultGUI = matRad_xiaLeafSequencing(resultGUI,stf,dij,numOfLevels,visBool)

Input:
  • resultGUI – resultGUI struct to which the output data will be added, if this field is empty resultGUI struct will be created

  • stf – matRad steering information struct

  • dij – matRad’s dij matrix

  • numOfLevels – number of stratification levels

  • visBool – toggle on/off visualization (optional)

Output:

resultGUI – matRad result struct containing the new dose cube as well as the corresponding weights

References

[1] http://online.medphys.org/resource/1/mphya6/v25/i8/p1424_s1


Copyright 2015-2026 the matRad development team.

This file is part of the matRad project. It is subject to the license terms in the LICENSE file found in the top-level directory of this distribution and at https://github.com/e0404/matRad/LICENSE.md. No part of the matRad project, including this file, may be copied, modified, propagated, or distributed except according to the terms contained in the LICENSE file.

class matRad_SequencerBase(pln)

Bases: handle

matRad_SequencerBase: Abstract base class for all matRad sequencers. Defines the common interface and the factory/lookup machinery (see getSequencerFromPln / getAvailableSequencers) shared by the photon leaf sequencers and the particle spot sequencer.

Constructs standalone sequencer with or without pln

Property Summary
isSequencer = true

const boolean for inheritance quick check

name

Descriptive Name

shortName

Short name for referencing

possibleRadiationModes

Possible radiation modes for the respective Sequencer

radiationMode

Radiation Mode

visMode = 0

vis bool

Method Summary
setDefaults(this)

set default values from MatRad_Config

warnDeprecatedProperty(this, oldProp, msg, newProp)
assignPropertiesFromPln(this, pln, warnWhenPropertyChanged)

Assign properties from pln.propSeq to the sequencer

sequence(this, w, stf)
static getSequencerFromPln(pln, warnDefault)

Returns a sequencer instance selected from the given pln struct, falling back to the configured default sequencer if none fits.

static getAvailableSequencers(pln, optionalPaths)
static isAvailable(pln, machine)