Skip to content

Commit 388c44f

Browse files
committed
further conversion
1 parent 8b56e35 commit 388c44f

29 files changed

+1048
-29
lines changed

docs/algorithms/doseCalc/doseengines.rst

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,21 @@
55
Dose Engines
66
============
77

8+
.. currentmodule:: matRad.doseCalc.+DoseEngines
9+
10+
.. autoclass:: matRad.doseCalc.+DoseEngines.@matRad_DoseEngineBase.matRad_DoseEngineBase
11+
:show-inheritance:
12+
:members:
13+
:undoc-members:
14+
15+
.. autoclass:: matRad.doseCalc.+DoseEngines.@matRad_ParticleFREDEngine.matRadParticleFREDEngine
16+
:show-inheritance:
17+
:members:
18+
:undoc-members:
19+
820
.. automodule:: matRad.doseCalc.+DoseEngines
921
:members:
1022
:undoc-members:
1123
:show-inheritance:
12-
:private-members:
24+
:private-members:
25+

docs/algorithms/optimization.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,21 @@ Optimization
55
============
66

77
.. automodule:: matRad.optimization
8+
:members:
9+
:undoc-members:
10+
:show-inheritance:
11+
:private-members:
12+
13+
Optimization problems
14+
---------------------
15+
16+
.. autoclass:: matRad.optimization.@matRad_OptimizationProblem.matRad_OptimizationProblem
17+
:members:
18+
:undoc-members:
19+
:show-inheritance:
20+
:private-members:
21+
22+
.. autoclass:: matRad.optimization.@matRad_OptimizationProblemDAO.matRad_OptimizationProblemDAO
823
:members:
924
:undoc-members:
1025
:show-inheritance:

docs/api/biomodels.rst

Lines changed: 0 additions & 14 deletions
This file was deleted.

docs/api/config.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ The class also provides logging functionality enabling control over output via l
1616
:undoc-members:
1717
:show-inheritance:
1818
:private-members:
19+
:no-index:

docs/api/gui.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.. _gui:
2+
3+
###
4+
GUI
5+
###
6+
7+
.. automodule:: matRad.gui
8+
:members:
9+
:undoc-members:
10+
:show-inheritance:
11+
:private-members:
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
.. _obj_constr:
2+
3+
======================
4+
Optimization Functions
5+
======================
6+
7+
Currently, matRad implements objectives and constraints for the optimization of dose distributions.
8+
All Objectives derive from the :class:`matRad_DoseOptimizationFunction` class and differentiate between dose :ref:`objectives <objectives>` and :ref:`constraints <constraints>`.
9+
10+
.. _objectives:
11+
12+
Dose Objectives
13+
---------------
14+
15+
.. automodule:: matRad.optimization.+DoseObjectives
16+
:members:
17+
:undoc-members:
18+
:show-inheritance:
19+
:private-members:
20+
21+
.. _constraints:
22+
23+
Dose Constraints
24+
----------------
25+
26+
.. automodule:: matRad.optimization.+DoseConstraints
27+
:members:
28+
:undoc-members:
29+
:show-inheritance:
30+
:private-members:
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.. _optimizers:
2+
3+
==========
4+
Optimizers
5+
==========
6+
7+
.. automodule:: matRad.optimization.optimizer
8+
:members:
9+
:undoc-members:
10+
:show-inheritance:
11+
:private-members:

docs/api/root.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.. _root:
2+
3+
#########################################
4+
Startup Functions in matRad's Root Folder
5+
#########################################
6+
7+
.. automodule:: matRad/..

docs/datastructures/cst.rst

Lines changed: 130 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,132 @@
11
.. _cst:
22

3-
======================
4-
The cst Data Structure
5-
======================
3+
==================
4+
The cst cell Array
5+
==================
6+
7+
The constraints of all defined volumes of interest (VOIs) are stored inside the ``cst`` cell array. It is structured as follows:
8+
9+
.. _cst-cell:
10+
11+
Screenshot of the cst-cell:
12+
.. image:: /images/cstCellScreenshot.png
13+
:alt: Screenshot of the cst cell
14+
15+
.. list-table:: Structure of the cst cell array
16+
:header-rows: 1
17+
18+
* - Column
19+
- Content
20+
- Description
21+
* - **1**
22+
- :ref:`VOI index <VolInd>`
23+
- Number to identify the VOI
24+
* - **2**
25+
- :ref:`VOI name <VolName>`
26+
- String describing the VOI
27+
* - **3**
28+
- :ref:`VOI type <VolType>`
29+
- Specification whether the VOI is an organ at risk (OAR), a target volume or should be ignored
30+
* - **4**
31+
- :ref:`Voxel indices <VoxInd>`
32+
- Vectors containing the indices of all voxels of the CT that are covered by the VOI. Stored as a cell array of vectors (for enabling handling of multiple scenarios)
33+
* - **5**
34+
- :ref:`Tissue parameters <TissParam>`
35+
- Structure containing information about the tissue of the VOI and its overlap priority
36+
* - **6**
37+
- :ref:`Dose objectives <DoseParam>`
38+
- Cell array containing information about the functions used to calculate the objective & constraint function value
39+
* - **7**
40+
- Precomputed Contours
41+
- After GUI startup, this column contains precomputed contour data for display
42+
43+
.. _VolInd:
44+
45+
VOI index
46+
---------
47+
48+
All defined VOIs are enumerated starting with 0.
49+
50+
.. _VolName:
51+
52+
VOI name
53+
--------
54+
55+
The VOI name is a string containing an organ name or a short description of the volume (e.g. ``BODY``, ``Liver``, ``GTV``, ...).
56+
57+
.. _VolType:
58+
59+
VOI type
60+
--------
61+
62+
The VOI type specifies how the volume is considered during treatment planning:
63+
64+
.. list-table:: VOI types and their handling during treatment planning
65+
:header-rows: 1
66+
67+
* - VOI type
68+
- Handling during treatment planning
69+
* - **TARGET**
70+
- The VOI will be covered with spot positions (protons / carbon ions) and bixels (photons) as defined in the :ref:`stf struct <stf>`. During the fluence optimization, it will be considered according to the defined :ref:`dose objectives <DoseParam>`.
71+
* - **OAR**
72+
- The VOI will not be covered with spot positions or bixels. During the fluence optimization, it will be considered according to the defined :ref:`dose objectives <DoseParam>`.
73+
* - **IGNORED**
74+
- The VOI will not be considered during the treatment planning.
75+
76+
.. _VoxInd:
77+
78+
Voxel indices
79+
-------------
80+
81+
The indices of all voxels (of the :ref:`CT-cube <ct>`) that are covered by the VOI are stored in a vector within a cell array. I.e. we store the segmentation for the VOI as a binary mask, the polygon contour data is not part of matRad's standard data sets.
82+
As the same voxel can be covered by more than one VOI, an overlap priority (see :ref:`tissue parameters <TissParam>`) is defined to handle potential discrepancies when calculating the objective function value and generating the :ref:`stf struct <stf>`.
83+
84+
.. _TissParam:
85+
86+
Tissue parameters
87+
-----------------
88+
89+
.. image:: /images/cstCellTissueParametersScreenshot.png
90+
:alt: Screenshot of tissue parameters
91+
92+
Data can also be stored as in the :ref:`old format (see below) <DoseParamOld>`.
93+
94+
New constraints or objectives can be implemented by adding a respective class definition to the :mod:`matRad.optimization.+DoseConstraints` or :mod:`matRad.optimization.+DoseObjectives` folder.
95+
96+
.. _DoseParam:
97+
98+
Dose Objectives & Constraints since v2.10.0
99+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
100+
matRad supports inverse planning based on the minimization of a weighted sum of objectives subject to non-linear yet differentiable hard constraints. The following kind of individual objectives are currently supported:
101+
102+
.. include:: ../includes/objtable.rst
103+
104+
Constraints are somewhat built around similar goals as obejctives:
105+
106+
.. include:: ../includes/constrtable.rst
107+
108+
When generating an objective / constraint from code, we suggest to wrap the instantiation of the objective/constraint in a ``struct()`` call, as shown in the first phantom example:
109+
110+
.. literalinclude:: ../../examples/matRad_example1_phantom.m
111+
:caption: examples/matRad_example1_phantom.m
112+
:lines: 47-49
113+
:lineno-match:
114+
:language: matlab
115+
116+
117+
This will ensure that, when saving to a mat-file, we don't save the class object, which improves compatibility.
118+
119+
.. _DoseParamOld:
120+
121+
Before Version 2.10.0
122+
~~~~~~~~~~~~~~~~~~~~~
123+
In the earlier version, matRad stored the objectives and constraints defined for inverse planning as an array of structs. :func:`matRad_convertOldCstToNewCstObjectives` can be used to convert the old definition to the new format.
124+
125+
.. _defaultValues:
126+
127+
Default *cst*-values
128+
--------------------
129+
130+
The patient data contained within matRad (*ALDERSON, BOXPHANTOM, HEAD_AND_NECK, LIVER, PROSTATE and TG119*) have default values defined within the *cst*-cell.
131+
132+
These values are chosen to produce a reasonable treatment plan, when using coplanar and equidistant photon beams. They can be used as a reference point for more sophisticated treatment plans.

docs/datastructures/ct.rst

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,38 @@
22

33
=====================
44
The ct Data Structure
5-
=====================
5+
=====================
6+
7+
The ct structure contains, among others, the 3D-CT-cube (see `ct.cube`_), obtained from the planning-CT, and the voxel resolution (see `ct.resolution`_).
8+
9+
Screenshot of the ct-struct:
10+
11+
.. image:: /images/ctDataScreenshot.png
12+
13+
.. _ct-cube:
14+
15+
ct.cube
16+
-------
17+
18+
The cube is a N\ :sub:`x` × N\ :sub:`y` × N\ :sub:`z` matrix (N\ :sub:`x,y,z` = number of voxels in x-, y- and z-direction) containing the water equivalent thickness of each voxel. We already translate HU to water equivalent electron density according to a look up table upon patient data import. The cube(s) is/are stored within a cell array to support multiple CT phases for 4D data.
19+
20+
.. _resolution:
21+
22+
ct.resolution
23+
-------------
24+
25+
The resolution specifies the size of each voxel in x-, y-, and z-direction in [mm].
26+
27+
.. _cubeDim:
28+
29+
ct.cubeDim
30+
----------
31+
32+
Number of voxels in x-, y- and z-direction (N\ :sub:`x`, N\ :sub:`y` and N\ :sub:`z`).
33+
34+
.. _numOfCtScen:
35+
36+
ct.numOfCtScen
37+
--------------
38+
39+
The number of considered CT scenarios. Usually, this corresponds to one but in a special research mode, it is also possible to handle multiple CTs.

0 commit comments

Comments
 (0)