Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/favicon_hat/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/favicon_hat/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/favicon_hat/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/favicon_hat/favicon.ico
Binary file not shown.
1 change: 1 addition & 0 deletions docs/_static/favicon_hat/site.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and what changed for these pictures and also all of the hat pictures

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/favicon_mR/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/favicon_mR/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/favicon_mR/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/favicon_mR/favicon.ico
Binary file not shown.
1 change: 1 addition & 0 deletions docs/_static/favicon_mR/site.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
16 changes: 16 additions & 0 deletions docs/_templates/layout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{% extends "!layout.html" %}

{% block extrahead %}
{{ super() }}

<link rel="icon" href="{{ pathto(fav ~ 'favicon.ico', 1) }}">
<link rel="icon" type="image/png" sizes="32x32"
href="{{ pathto(fav ~ 'favicon-32x32.png', 1) }}">
<link rel="icon" type="image/png" sizes="16x16"
href="{{ pathto(fav ~ 'favicon-16x16.png', 1) }}">
<link rel="apple-touch-icon"
href="{{ pathto(fav ~ 'apple-touch-icon.png', 1) }}">
<link rel="manifest"
href="{{ pathto(fav ~ 'site.webmanifest', 1) }}">

{% endblock %}
11 changes: 10 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def _patch_matlabdomain_noindex() -> None:
_patch_matlabdomain_noindex()

project = "matRad"
copyright = "2025, e0404"
copyright = "2026, e0404"
author = "e0404"

version = "3.2.2"
Expand All @@ -53,6 +53,15 @@ def _patch_matlabdomain_noindex() -> None:
html_static_path = ["_static"]
html_css_files = ["style.css"]
html_logo = "../matRad/gfx/matrad_logo.png"

templates_path = ["_templates"]

favicon_path = "_static/favicon_mR/"

html_context = {
"fav": favicon_path,
}

html_theme_options = {
'logo_only': True,
'navigation_depth': 5,
Expand Down
Binary file added docs/images/QuickStart_GUI_3D_Viewer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/QuickStart_GUI_DVH_QI.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/QuickStart_GUI_DoseCalc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/QuickStart_GUI_Plan_Window.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/QuickStart_GUI_Profile_Depth.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/QuickStart_GUI_Profile_Lateral.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/QuickStart_GUI_finishedDoseCalc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/QuickStart_GUI_load_patient.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/QuickStart_GUI_loaded_patient.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/QuickStart_GUI_matRad_empty_GUI.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/QuickStart_GUI_readyForDoseCalc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/QuickStart_Script_DAO.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/QuickStart_Script_DVH_vis.png
Binary file added docs/images/QuickStart_Script_GUI_post.png
Binary file added docs/images/QuickStart_Script_GUI_pre.png
Binary file added docs/images/QuickStart_Script_dosecalc_code.png
Binary file added docs/images/QuickStart_Script_init_vis_GUI.png
Binary file added docs/images/QuickStart_Script_resultGUI.png
Binary file added docs/images/QuickStart_Script_results.png
Binary file added docs/images/QuickStart_Script_sequencing.png
Binary file added docs/images/QuickStart_Script_stf.png
Binary file added docs/images/QuickStart_Script_stf_cmd_win.png
Binary file added docs/images/QuickStart_Script_vars.png
48 changes: 35 additions & 13 deletions docs/quickstart/guiintro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ To execute the matRad GUI using MATLAB you need to:
If you prefer to use the :file:`matRad.m` script to execute matRad, check out the :ref:`matRad script <run_script>`.
For more detailed information about the different features of the GUI you can take a look at :ref:`matRad GUI Overview <guioverview>`.

Step 1: Open matRad folder in MATLAB
Step 1: Open the matRad folder in MATLAB
------------------------------------

To use matRad you need to open the matRad folder in MATLAB.
Expand All @@ -33,7 +33,7 @@ Step 2: Start the matRad GUI
To start the GUI select :file:`matRadGUI.m` from your current folder and run it (right-click → run or F9) or simply type ``matRadGUI`` in your command window.
Now the empty GUI should be opened:

.. image:: /images/GUI-Guide_emptyGUIScreenshot.png
.. image:: /images/QuickStart_GUI_matRad_empty_GUI.png
:width: 650px

If the GUI is not empty, then there is a patient already loaded in your workspace. To get an empty GUI you can clear your workspace and restart the GUI. However, this is not necessary as you can simply load a new patient.
Expand All @@ -47,12 +47,12 @@ First, you need to load the patient data. Therefore, the matRad release contains
To load a patient click the **Load \*.mat data** button in the **Workflow** section.
A window should open. In the folder ``phantoms``, you can find different patient files.

.. image:: /images/GUI-Guide_loadDataGUIScreenshot.png
.. image:: /images/QuickStart_GUI_load_patient.png

Here you can select which patient file (``*.mat``) you want to load. Upon opening the ``*.mat`` file the patient data is loaded into the GUI:
On the right side of the GUI you should see the patient-CT with the defined VOIs. On the left side, the optimization parameter table should now be filled.

.. image:: /images/GUI-Guide_loadedGUIScreenshot.png
.. image:: /images/QuickStart_GUI_loaded_patient.png
:width: 650px

**Set plan parameters**
Expand All @@ -61,55 +61,61 @@ Now you can start to adjust the plan parameters:

+-----------------------------------------------------------------------------------------------+
| The bixel width, as well as the isocenter, can be adjusted but should already be set to |
| |
| reasonable values. |
+-----------------------------------------------------------------------------------------------+
| To set the beam directions you have to select the according gantry and couch angles. Every |
| |
| gantry angle defines a beam and needs a couch angle. |
+-----------------------------------------------------------------------------------------------+
| For the radiation mode, you can choose photons, protons or carbon. |
+-----------------------------------------------------------------------------------------------+
| If you set carbon as radiation mode, you can activate the biological optimization. You can |
| |
| choose between an effect based optimization (*effect*) or the optimization of the RBE-weighted|
| |
| dose (*RBExD*). |
+-----------------------------------------------------------------------------------------------+
| For the radiation mode "photons", you have the option to run a MLC sequencing, where you can |
| |
| set the number of stratification levels and additionally you can run a direct aperture |
| |
| optimization. |
+-----------------------------------------------------------------------------------------------+

.. image:: /images/GUI-Guide_planParametersGUIScreenshot.png
.. image:: /images/QuickStart_GUI_Plan_Window.png

**Set optimization parameters**
**Set objectives and constraints**

The optimization parameters are used to influence the outcome of the fluence optimization. Here you can set the parameters of the VOIs (e.g. min/max dose, penalty, overlap priority, etc.). For more information, take a look at the :doc:`../datastructures/cst`. Using the '**+**' and '**-**' buttons you can add and remove VOIs.
The objectives and constraints are used to influence the outcome of the fluence optimization. Here you can set the parameters of the VOIs (e.g. min/max dose, penalty, overlap priority, etc.). For more information, take a look at the :doc:`../datastructures/cst`. Using the '**+**' and '**-**' buttons you can add and remove VOIs.

The column ``p`` (*penalty*) determines the relative weighting of the objective within the overall weighted sum objective function. The column ``Parameters`` lets you specify additional parameters for given objectives. For squared over- and underdosage as well as squared deviation, this simply corresponds to the reference dose level, for EUD it is the exponent. A mean dose objective does not require an additional parameter.

The column ``OP`` (*overlap priority*) is very important as it determines the assignment of voxels to structures. Consider a voxel that belongs to two structures, e.g. to the rectum and to the prostate. For the optimizer it is necessary to distinguish to which structure the voxel should belong to during optimization. If you assign priority 1 to the prostate and priority 2 to the rectum in our example, every voxel within the overlap of the two structures will be considered as prostate during optimization. If you assign priority 2 to the prostate and priority 1 to the rectum in our example, every voxel within the overlap of the two structures will be considered as rectum during optimization. Assigning the same priority to overlapping structures will result in the overlapping volume being considered for all structures. Be aware that the skin contour usually encompasses the entire patient volume. If you want to make sure that target voxels are not also considered skin voxels you need to assign a lower priority (i.e. a higher number) to the skin volume. Please check with the provided example patient data to understand this in full detail.

*Note: Changing the VOI Type from OAR to target will lead to additional beamlets or spots that need to be considered for the dose-influence-matrix calculation. As a result, these changes have to be done before the Dij-calculation.*

.. image:: /images/GUI-Guide_optimizationParametersGUIScreenshot.png
.. image:: /images/QuickStart_GUI_objectives_and_constraints_Window.png

**Calculate Dose influence matrix**

To start the calculation of the dose-influence-matrix you simply need to click the **Calc. Dose Influence** button in the workflow:

.. image:: /images/GUI-Guide_workflowGUIScreenshot.png
.. image:: /images/QuickStart_GUI_readyForDoseCalc.png

You should see a window pop up, showing a progress bar of the calculation:

.. image:: /images/GUI-Guide_dijProgressBarScreenshot.png
.. image:: /images/QuickStart_GUI_DoseCalc.png

In addition, the progress is displayed in the Command Window:

.. image:: /images/GUI-Guide_dijOutputScreenshot.png
.. image:: /images/QuickStart_GUI_finishedDoseCalc.png

**Execute fluence optimization**

Once the dose calculation is completed, you can start the fluence optimization by clicking the **Optimize** button in the workflow section. The iterations of the optimization are displayed in the Command Window:

.. image:: /images/GUI-Guide_fluenceOptOutputScreenshot.png
.. image:: /images/QuickStart_GUI_finished_Optimization.png

To adjust the convergence criteria you can specify the *maximum number of iterations* and the *convergence* precision in the *Optimization Parameter* section. Default values are: 1000 iterations and a precision of :math:`10^{-3}`:
(Precision ≡ \|(FuncValue_old − FuncValue_new) / FuncValue_old\|)
Expand All @@ -121,14 +127,30 @@ Step 4: Visualize resulting treatment plan

Once the fluence optimization has converged the resulting dose distribution will be displayed in the GUI. Here you can adjust the visualization parameters to display different slices/planes, use different plot types, etc.

.. image:: /images/GUI-Guide_optimizedGUIScreenshot.png
.. image:: /images/QuickStart_GUI_GUI_after_Optimization.png
:width: 650px

You can choose between an intensity plot (for the coronal, sagital and axial plane) and a profile plot (either depth or lateral, see images below), for which you can choose your slice to be displayed, respectively:

.. image:: /images/QuickStart_GUI_Profile_Depth.png
:width: 50%

.. image:: /images/QuickStart_GUI_Profile_Lateral.png
:width: 50%


Furthermore, you can have a look at your slice within a 3D model of your patient by clicking *Open 3D Viewer*:

.. image:: /images/QuickStart_GUI_3D_Viewer.png


To calculate a DVH of all VOIs and to see the quality indicators (which contain the mean/max/min dose for each VOI) you can use the **Show DVH/QI** button in the *Visualization* section.

.. image:: /images/DVHVisScreenshot.png




Step 5: Import additional patient data
--------------------------------------

Expand Down
18 changes: 9 additions & 9 deletions docs/quickstart/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@
Quick Start
===========

It's the first time you want to use matRad?
Is it the first time you want to use matRad?

First, get a local copy of matRad by download or git cloning. Having done that, we recommend you navigate into the folder in Matlab and execute
First, get a local copy of matRad by downloading or git cloning. Having done that, we recommend you navigate into the folder in Matlab and execute

.. code-block:: matlab

matRad_rc

which will setup the path & configuration and tell you the current version.

Then there're three options for a pleasant start with matRad. Choose one or try out each of them.
A key feature of matRad is that it can be used either through a graphical user interface (GUI) or as a MATLAB script.

Accordingly, there are different ways to familiarize yourself with the software and get started with matRad. Below, we present three different beginner-friendly approaches. Choose one or explore and try out each of them.

.. rubric:: Option 1: Using the GUI
:heading-level: 2


For an intuitive workflow with the graphical user interface, type
For the most intuitive workflow, we recommend using the graphical user interface (GUI). In order to start it, type

.. code-block:: matlab

Expand All @@ -42,9 +42,9 @@ If you prefer scripting, open the default script *matRad.m* from the main matRad

edit matRad.m

Use it to learn something about the code structure and execute it section by section.
You can use it to learn something about the code structure of a typical matRad workflow and execute it section by section.

You can also run the full script for an example photon plan by just typing
If you want to run the full script for an exemplary photon plan, you can type

.. code-block:: matlab

Expand All @@ -55,9 +55,9 @@ in your command window.
.. rubric:: Option 3: Using the examples
:heading-level: 2

The most time consuming but also most educational approach to matRad.
This is by far the most time consuming, but also the most educational approach to matRad, as it includes working through tutorial-style example scripts for different scenarios, e.g. treatment planning with different radiation sources or including biological models. Therefore, if you want to have in-depth training on the whole bandwidth of applications of our software, working through the examples is what we recommend.

When in the main matRad folder, navigate to the folder *examples*. Open one of the examples given there. Execute it section by section. Move on to the next example afterwards.
In order to get started with the examples, you simply need to navigate to the folder *examples* when in the main matRad directory, open any example of your choice, execute it section by section and move on to the next example afterwards. As the code includes detailed instructional comments, the examples serve as a step-by-step guide to different matRad use cases and are easy to follow and understand.

**See also:**

Expand Down
Loading
Loading