4D
Specialized functions for 4D dose calculation and treatment planning
- matRad_doseAcc(ct, phaseCubes, cst, accMethod)
matRad dose accumulation function
call
dAcc = matRad_doseAcc(d,dvf)
- Input:
ct – matRad ct struct inclduing 4d ct, deformation vector fields, and meta information
phaseCubes – cell array of cubes to be accumulated
cst – matRad cst struct
accMethod – method used for accumulation, either direct dose mapping (DDM), energy mass transfer method (EMT), or divergent dose mapping method (DDMP)
+++ Attention +++ the deformation vector fields are in [mm]
- Output:
dAcc – accumulated dose cube
- References
[1] http://iopscience.iop.org/0031-9155/59/21/6401/ [2] http://iopscience.iop.org/0031-9155/59/1/173/
Copyright 2018-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_postprocessing(resultGUI, dij, pln, cst, stf)
- matRad postprosseing function accounting for
minimum number of particles per spot minimum number of particles per iso-energy slice
call
resultGUI = matRad_postprocessing(resultGUI, dij, pln, cst, stf)
- matRad_addMovement(ct, cst, motionPeriod, numOfCtScen, amp, varargin)
adds artificial sinosodal patient motion by creating a deformation vector field and applying it to the ct.cube by geometric transformation
call
ct = matRad_addMovement(ct, ct.motionPeriod, ct.numOfCtScen, amp)
- Input:
ct – matRad ct struct
cst – matRad cst struct
motionPeriod – the length of a whole breathing cycle (in seconds)
numOfCtScen – number of ct phases
amp – amplitude of the sinosoidal movement (in pixels)
varargin – dvfType: push or pull dvf visBool boolean flag for visualization
note – 1st dim –> x LPS coordinate system 2nd dim –> y LPS coordinate system 3rd dim –> z LPS coordinate system a positive amplitude moves the phantom to the right, anterior, inferior
- Output:
ct – modified matRad ct struct including dvf and cubes for all phases
cst – modified matRad cst struct
References
Copyright 2018-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_calc4dDose(dij, pln, stf, resultGUI, totalPhaseMatrix)
wrapper for the whole 4D dose calculation pipeline and calculated dose accumulation
call
ct = matRad_calc4dDose(ct, pln, dij, stf, cst, resultGUI)
- input
dij: matRad dij struct resultGUI: struct containing optimized fluence vector totalPhaseMatrix optional intput for totalPhaseMatrix
- output
resultGUI: structure containing phase dose, RBE weighted dose, etc
- References
Copyright 2018-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_makePhaseMatrix(timeSequence, numOfPhases, motionPeriod, motion)
- using the time sequence and the ordering of the bixel iradiation, and
number of scenarios, makes a phase matrix of size number of bixels * number of scenarios
call
timeSequence = matRad_makePhaseMatrix(timeSequence, numOfPhases, motionPeriod, motion)
- Input:
timeSequence – struct containing bixel ordering information and the time sequence of the spot scanning
numOfCtScen – number of the desired phases
motionPeriod – the extent of a whole breathing cycle (in seconds)
motion – motion scenario: ‘linear’(default), ‘sampled_period’
- Output:
timeSequence – phase matrix field added
- References
Copyright 2018-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_ImageRegistrationBase(propStruct)
Bases:
handle- matRad_ImageRegistrationBase Base class for 4D image registration
Defines the common interface for image registration classes that compute deformation vector fields (DVFs) between CT scenarios and propagate contours between them.
DVF conventions (compatible with matRad_doseAcc / matRad_addMovement):
ct.dvf{scen} has size [3 ct.cubeDim] with component order x,y,z, where x refers to the second cube dimension (columns), y to the first (rows) and z to the third (slices).
‘pull’ DVFs are defined on the reference scenario grid such that refCube(pos) corresponds to scenCube(pos - dvf(pos)).
‘push’ DVFs are defined on the scenario grid such that scenCube(pos) corresponds to refCube(pos + dvf(pos)).
dvfUnits is ‘mm’ by default, as expected by matRad_doseAcc.
Registration settings used to create the DVFs are stored in ct.dvfMetadata (fields dvfType, dvfUnits, refScen).
- References
Copyright 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.
- Property Summary
- name
user readable name of the registration algorithm
- refScen = 1
reference CT scenario index
- dvfType = 'pull'
‘pull’ or ‘push’ deformation vector fields
- dvfUnits = 'mm'
‘mm’ or ‘voxel’ - matRad’s 4D workflows (matRad_doseAcc) expect [mm]
- Method Summary
- struct(this)
Serializes the registration settings (not any patient data)
- calcDVF(this, ct)
Computes deformation vector fields between the reference CT scenario and all other scenarios and stores them in ct.dvf / ct.dvfMetadata
- propContours(this, ct, cst)
Propagates the contours of the reference CT scenario to all other scenarios using push deformation vector fields
- matRad_makeBixelTimeSeq(stf, resultGUI)
using the steering information of matRad, makes a time sequenced order according to the irradiation scheme in spot scanning
call
timeSequence = matRad_makeBixelTimeSeq(stf, resultGUI)
- Input:
stf – matRad steering information struct
resultGUI – struct containing optimized fluence vector
- Output:
timeSequence – struct containing bixel ordering information and the time sequence of the spot scanning
- References
spill structure and timing information: http://cdsweb.cern.ch/record/1182954 http://iopscience.iop.org/article/10.1088/0031-9155/56/20/003/meta
Copyright 2018-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_acc4dDose(dij, pln, ct, cst, resultGUI, accType)
wrapper for the whole 4D dose calculation pipeline and calculated dose accumulation
- call
ct = matRad_calc4dDose(ct, pln, dij, stf, cst, resultGUI)
- input
ct : ct cube pln: matRad plan meta information struct dij: matRad dij struct stf: matRad steering information struct cst: matRad cst struct resultGUI: struct containing optimized fluence vector totalPhaseMatrix optional intput for totalPhaseMatrix accType: witch algorithim for dose accumulation
- output
resultGUI: structure containing phase dose, RBE weighted dose, etc timeSequence: timing information about the irradiation
- References
Copyright 2018 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.