optimization

Local functions

class matRad_DoseOptimizationFunction(dataStruct)

matRad_DoseOptimizationFunction. Superclass for objectives and constraints. This is the superclass for all objectives and constraints to enable easy one-line identification.


Copyright 2019-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

Display name of the Objective. Needs to be implemented in sub-classes.

parameterNames

Cell array of Display names of the parameters. Needs to be implemented in sub-classes.

parameterTypes

Cell array of parameter types. Valid types are ‘dose’, ‘numeric’, or a cell list of string options. Needs to be implemented in sub-classes.

parameters
robustness = 'none'

Robustness setting -> may be removed from the DoseObjective class in a future release

Method Summary
struct()
getDoseParameters()

get only the dose related parameters.

setDoseParameters(doseParams)

set only the dose related parameters.

assignCommonPropertiesFromStruct(s)
static createInstanceFromStruct(s)
static availableRobustness()
static convertOldOptimizationStruct(old_s)

Converts old version obejctives to current format

matRad_collapseStf(stf, mode)

matRad collapse stf function for simulation of 3D conformal treatments. Function to supress intensity-modulation for photons in order to simulate 3D conformal treatments.

call

stf = matRad_collapseStd(stf)

Input:
  • stf – steering information

  • mode – collpase mode, beam or ray

Output:

dijNew – collapsed dose influence matrix

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_SFUDoptimization(pln, cst, dij, ct, stf)

Calculation of single field uniform dose (SFUD) optimization If provided the dij matrix is used for optimisation, otherwise single beam dijs are calculated (memory saving).

call

[resultGUI] = matRad_SFUDoptimization(pln, cst, dij) or [resultGUI] = matRad_SFUDoptimization(pln, cst, [], ct, stf)

Input:
  • pln – matRad pln struct

  • cst – matRad cst struct

  • dij – matRad dij struct (optional)

  • ct – matRad ct struct (optional, only needed if no dij provided)

  • stf – matRad stf struct (optional, only if needed no dij provided)

Output:
  • resultGUI – struct containing optimized fluence vector, dose, and (for biological optimization) RBE-weighted dose etc.

  • (info – struct containing information about optimization)

References

[1] https://ro-journal.biomedcentral.com/articles/10.1186/s13014-016-0705-8


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_getObjectivesAndConstraints()

matRad steering information generation

call

classNames = matRad_getObjectivesAndConstraints()

Output:

classNames – contains class names (row 1) and display descriptions (row 2) of all available objectives

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_calcInversDVH(volume, doseVec)

matRad inverse DVH (Dose Volume Histogram) calculation

call

dose = matRad_calcInversDVH(volume,doseVec)

Input:
  • volume – rel volume of structure

  • doseVec – dose vector of specific structure

Output:

dose – dose that corresponds to rel volume

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_collapseDij(dij, mode)

matRad collapse dij function for simulation of 3D conformal treatments. Function to supress intensity-modulation for photons in order to simulate 3D conformal treatments.

call

dijNew = matRad_collapseDij(dij)

Input:
  • dij – dose influence matrix

  • mode – collpase mode, beam or ray

Output:

dijNew – collapsed dose influence matrix

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_clearUnusedVoxelsFromDij(cstOnDoseGrid, dij, scenarios)

matRad function to set the voxels in dij that are not used for optimization.

call

[dij] = matRad_clearUnusedVoxelsFromDij(cst, dij) [dij] = matRad_clearUnusedVoxelsFromDij(cst, dij, scenarios) [dij, mask] = matRad_clearUnusedVoxelsFromDij(cst, dij) [dij, mask] = matRad_clearUnusedVoxelsFromDij(cst, dij, scenarios)

Input:
  • cstInDoseGrid – cst (on dose grid)

  • dij – dij struct

  • scenarios (optional) – explicitly define the scenario indexes that need to be cleared

Output:
  • dij – cleared dij struct

  • mask (optional) – cell array containig the mask that has been applied to every ct scenario


Copyright 2023-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.