Skip to content

Commit

Permalink
Merge commit dev into dev_varRBErobOpt
Browse files Browse the repository at this point in the history
  • Loading branch information
becker89 committed Dec 3, 2020
2 parents 52e1d08 + 1d2bc93 commit 4c987aa
Show file tree
Hide file tree
Showing 19 changed files with 270 additions and 259 deletions.
19 changes: 18 additions & 1 deletion ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
Version 2.10.0 "Blaise"
Version 2.10.1 - Patch release for "Blaise"
Release with small updates, clean-ups and bugfixes
- Bugfix in 3D view due to inconsistent angles in pln & stf
- Bugfix for using incorrect dicom UID's and wrong writing order in the dicom export
- Bugfix for weird colormap issue in plotting
- New handling of environment checking with matRad_cfg (old function is still working)
- Code documentation update
- Remove hardcoded penumbra width in photon dose calculation -> can now be stored in machine file (machine.data.penumbraFWHMatIso)
- Update to ompMC to use virtual Gaussian source (uses measured penumbra value) incld precompiled mex files
- remove useless global statements before matRad_cfg
- add blue/white/red difference map to colormaps (in the correct way)
- Updated TravisCI testing (Sped up by using pre-compiled mex interfaces and including testing with Matlab (on Ubuntu), Azure DevOps as fallback
- Github gimmicks added: Stalebot, Issue & PR Templates
- code optimization for jacobian evaluation (x10-100 speedup)
- New option pln.propDoseCalc.useGivenEqDensityCube (default false) to directly use the literal values from ct.cube and omit HU to WEQ conversion from ct.cubeHU
- New option pln.propDoseCalc.ignoreOutsideDensities (default true) to disable/enable inclusion of WEPL outside the patient contour in ray-tracing

Version 2.10.0 - "Blaise"
Second Release of matRad. Note that despite major incompatibilities with "Alan" we still chose major version number "2" to have a consistent versioning in the future.
we want to thank all new contributing authors (see AUTHORS.txt)
The new release contains:
Expand Down
2 changes: 1 addition & 1 deletion MatRad_Config.m
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ function setDefaultProperties(obj)
% properties
% input

obj.propStf.defaultLongitudinalSpotSpacing = 3;
obj.propStf.defaultLongitudinalSpotSpacing = 2;
obj.propStf.defaultAddMargin = true; %expand target for beamlet finding

obj.propDoseCalc.defaultResolution = struct('x',3,'y',3,'z',3); %[mm]
Expand Down
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
[![TravisCI Build Status](https://travis-ci.org/e0404/matRad.svg?branch=dev_varRBErobOpt)](https://travis-ci.org/e0404/matRad)
[![Azure Pipelines Build Status](https://dev.azure.com/e0404/matRad/_apis/build/status/e0404.matRad?branchName=dev_varRBErobOpt)](https://dev.azure.com/e0404/matRad)

DOIs:
- General DOI: [![DOI](https://zenodo.org/badge/doi/10.5281/zenodo.3879615.svg)](https://doi.org/10.5281/zenodo.3879615)
- Latest Release: [![DOI](https://zenodo.org/badge/29671667.svg)](https://zenodo.org/badge/latestdoi/29671667)

# General information

Expand Down Expand Up @@ -68,9 +71,13 @@ Still having problems? Then create an issue, provide a **minimum example** of yo

# Citing matRad

### Scientific papers

If you use matRad in a scientific publication, consider citing the following paper:

Wieser, Hans-Peter, et al. "Development of the open-source dose calculation and optimization toolkit matRad." Medical Physics 44.6 (2017): 2556-2568.
Wieser, Hans-Peter, et al. "Development of the open-source dose calculation and optimization toolkit matRad." Medical Physics 44.6 (2017): 2556-2568.

[![DOI](https://img.shields.io/badge/DOI-10.1002%2Fmp.12251-blue)](https://doi.org/10.1002/mp.12251)

BibTex entry:
```
Expand All @@ -82,10 +89,21 @@ BibTex entry:
number={6},
pages={2556--2568},
year={2017},
publisher={Wiley Online Library}
publisher={Wiley Online Library},
doi={10.1002/mp.12251}
}
```

### Citing as Software

matRad's code also has its own general DOI with Zenodo:

[![DOI](https://zenodo.org/badge/doi/10.5281/zenodo.3879615.svg)](https://doi.org/10.5281/zenodo.3879615)

You can cite specific versions of matRad in your work! For example, Here is the badge that lead's to the latest release of matRad:

[![DOI](https://zenodo.org/badge/29671667.svg)](https://zenodo.org/badge/latestdoi/29671667)

---

Copyright 2020 the matRad development team.
Expand Down
66 changes: 5 additions & 61 deletions matRad.prj
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
<param.web.mcr>true</param.web.mcr>
<param.package.mcr>false</param.package.mcr>
<param.no.mcr>false</param.no.mcr>
<param.web.mcr.name>matRad_installerWin64_v2.10.0_prepareBlaise-ef7488df</param.web.mcr.name>
<param.package.mcr.name>matRad_installerWin64_wRT_v2.10.0_prepareBlaise-ef7488df</param.package.mcr.name>
<param.web.mcr.name>matRad_installerWin64_v2.10.1</param.web.mcr.name>
<param.package.mcr.name>matRad_installerWin64_wRT_v2.10.1</param.package.mcr.name>
<param.no.mcr.name>MyAppInstaller_app</param.no.mcr.name>
<param.windows.command.prompt>true</param.windows.command.prompt>
<param.create.log>true</param.create.log>
Expand Down Expand Up @@ -78,44 +78,10 @@
</fileset.main>
<fileset.resources>
<file>${PROJECT_ROOT}\basedata\photons_Generic.mat</file>
<file>${PROJECT_ROOT}\basedata\protons_Generic.mat</file>
<file>${PROJECT_ROOT}\basedata\carbon_Generic.mat</file>
<file>${PROJECT_ROOT}\basedata\protons_Generic.mat</file>
<file>${PROJECT_ROOT}\basedata\carbon_Generic.mat</file>
<file>${PROJECT_ROOT}\dicom</file>
<file>${PROJECT_ROOT}\dicom\DKFZ_Logo.png</file>
<file>${PROJECT_ROOT}\dicom\matRad_calcHU.m</file>
<file>${PROJECT_ROOT}\dicom\matRad_calcWaterEqD.m</file>
<file>${PROJECT_ROOT}\dicom\matRad_convRtssContours2Indices.m</file>
<file>${PROJECT_ROOT}\dicom\matRad_createCst.m</file>
<file>${PROJECT_ROOT}\dicom\matRad_dummyCst.m</file>
<file>${PROJECT_ROOT}\dicom\matRad_importDicom.m</file>
<file>${PROJECT_ROOT}\dicom\matRad_importDicomCt.m</file>
<file>${PROJECT_ROOT}\dicom\matRad_importDicomGUI.fig</file>
<file>${PROJECT_ROOT}\dicom\matRad_importDicomGUI.m</file>
<file>${PROJECT_ROOT}\dicom\matRad_importDicomRTDose.m</file>
<file>${PROJECT_ROOT}\dicom\matRad_importDicomRTPlan.m</file>
<file>${PROJECT_ROOT}\dicom\matRad_importDicomRtss.m</file>
<file>${PROJECT_ROOT}\dicom\matRad_importDicomSteeringParticles.m</file>
<file>${PROJECT_ROOT}\dicom\matRad_importDicomSteeringPhotons.m</file>
<file>${PROJECT_ROOT}\dicom\matRad_importFieldShapes.m</file>
<file>${PROJECT_ROOT}\dicom\matRad_interpDicomCtCube.m</file>
<file>${PROJECT_ROOT}\dicom\matRad_interpDicomDoseCube.m</file>
<file>${PROJECT_ROOT}\dicom\matRad_listAllFiles.m</file>
<file>${PROJECT_ROOT}\dicom\matRad_loadHLUT.m</file>
<file>${PROJECT_ROOT}\dicom\matrad_logo.png</file>
<file>${PROJECT_ROOT}\dicom\matRad_progress.m</file>
<file>${PROJECT_ROOT}\dicom\matRad_scanDicomImportFolder.m</file>
<file>${PROJECT_ROOT}\IO</file>
<file>${PROJECT_ROOT}\IO\matRad_exportGUI.fig</file>
<file>${PROJECT_ROOT}\IO\matRad_exportGUI.m</file>
<file>${PROJECT_ROOT}\IO\matRad_importGUI.fig</file>
<file>${PROJECT_ROOT}\IO\matRad_importGUI.m</file>
<file>${PROJECT_ROOT}\IO\matRad_importPatient.m</file>
<file>${PROJECT_ROOT}\IO\matRad_readCube.m</file>
<file>${PROJECT_ROOT}\IO\matRad_readNRRD.m</file>
<file>${PROJECT_ROOT}\IO\matRad_writeCube.m</file>
<file>${PROJECT_ROOT}\IO\matRad_writeMHA.m</file>
<file>${PROJECT_ROOT}\IO\matRad_writeNRRD.m</file>
<file>${PROJECT_ROOT}\IO\matRad_writeVTK.m</file>
<file>${PROJECT_ROOT}\matRad.m</file>
<file>${PROJECT_ROOT}\matRad_addMargin.m</file>
<file>${PROJECT_ROOT}\matRad_calcCubes.m</file>
Expand Down Expand Up @@ -168,30 +134,8 @@
<file>${PROJECT_ROOT}\matRadGUI.fig</file>
<file>${PROJECT_ROOT}\matRadGUI.m</file>
<file>${PROJECT_ROOT}\optimization</file>
<file>${PROJECT_ROOT}\optimization\matRad_backProjection.m</file>
<file>${PROJECT_ROOT}\optimization\matRad_calcInversDVH.m</file>
<file>${PROJECT_ROOT}\optimization\matRad_collapseDij.m</file>
<file>${PROJECT_ROOT}\plotting</file>
<file>${PROJECT_ROOT}\plotting\colormaps\colormapTemplate.txt</file>
<file>${PROJECT_ROOT}\plotting\matRad_computeAllVoiSurfaces.m</file>
<file>${PROJECT_ROOT}\plotting\matRad_computeIsoDoseContours.m</file>
<file>${PROJECT_ROOT}\plotting\matRad_computeVoiContours.m</file>
<file>${PROJECT_ROOT}\plotting\matRad_computeVoiContoursWrapper.m</file>
<file>${PROJECT_ROOT}\plotting\matRad_getColormap.m</file>
<file>${PROJECT_ROOT}\plotting\matRad_plotAxisLabels.m</file>
<file>${PROJECT_ROOT}\plotting\matRad_plotColorbar.m</file>
<file>${PROJECT_ROOT}\plotting\matRad_plotCtSlice.m</file>
<file>${PROJECT_ROOT}\plotting\matRad_plotCtSlice3D.m</file>
<file>${PROJECT_ROOT}\plotting\matRad_plotDoseSlice.m</file>
<file>${PROJECT_ROOT}\plotting\matRad_plotDoseSlice3D.m</file>
<file>${PROJECT_ROOT}\plotting\matRad_plotIsoCenterMarker.m</file>
<file>${PROJECT_ROOT}\plotting\matRad_plotIsoDoseLines.m</file>
<file>${PROJECT_ROOT}\plotting\matRad_plotIsoDoseLines3D.m</file>
<file>${PROJECT_ROOT}\plotting\matRad_plotPlan3D.m</file>
<file>${PROJECT_ROOT}\plotting\matRad_plotVoiContourSlice.m</file>
<file>${PROJECT_ROOT}\plotting\matRad_plotVois3D.m</file>
<file>${PROJECT_ROOT}\tools</file>
<file>${PROJECT_ROOT}\tools\matRad_getEnvironment.m</file>
</fileset.resources>
<fileset.package>
<file>${PROJECT_ROOT}\phantoms</file>
Expand All @@ -212,7 +156,7 @@
</build-deliverables>
<workflow/>
<matlab>
<root>C:\Program Files\MATLAB\R2018b</root>
<root>C:\Program Files\MATLAB\R2019a</root>
</matlab>
<platform>
<unix>false</unix>
Expand Down
53 changes: 46 additions & 7 deletions matRadGUI.m
Original file line number Diff line number Diff line change
Expand Up @@ -1993,14 +1993,27 @@ function UpdateState(handles)

% fill GUI elements with plan information
function setPln(handles)

matRad_cfg = MatRad_Config.instance();

pln = evalin('base','pln');
% sanity check of isoCenter
if size(pln.propStf.isoCenter,1) ~= pln.propStf.numOfBeams && size(pln.propStf.isoCenter,1) == 1
pln.propStf.isoCenter = ones(pln.propStf.numOfBeams,1) * pln.propStf.isoCenter(1,:);
elseif size(pln.propStf.isoCenter,1) ~= pln.propStf.numOfBeams && size(pln.propStf.isoCenter,1) ~= 1
error('Isocenter in plan file are incosistent.');
matRad_cfg.dispError('Isocenter in plan file are incosistent.');
end
set(handles.editBixelWidth,'String',num2str(pln.propStf.bixelWidth));

%Sanity check for the bixelWidth field
bixelWidth = pln.propStf.bixelWidth;

if isnumeric(bixelWidth) && isscalar(bixelWidth)
bixelWidth = num2str(pln.propStf.bixelWidth);
elseif ~isnumeric(bixelWidth) && ~strcmp(bixelWidth,'field')
matRad_cfg.dispError('Invalid bixel width! Must be a scalar number or ''field'' for field-based dose calculation with shapes stored in stf!');
end

set(handles.editBixelWidth,'String',bixelWidth);
set(handles.editFraction,'String',num2str(pln.numOfFractions));

if isfield(pln.propStf,'isoCenter')
Expand Down Expand Up @@ -2135,7 +2148,20 @@ function getPlnFromGUI(handles)
pln = evalin('base','pln');
end

pln.propStf.bixelWidth = parseStringAsNum(get(handles.editBixelWidth,'String'),false); % [mm] / also corresponds to lateral spot spacing for particles
% Special parsing of bixelWidth (since it can also be "field") for imported
% shapes
bixelWidth = get(handles.editBixelWidth,'String'); % [mm] / also corresponds to lateral spot spacing for particles
if strcmp(bixelWidth,'field')
pln.propStf.bixelWidth = bixelWidth;
else
pln.propStf.bixelWidth = parseStringAsNum(bixelWidth,false);
if isnan(pln.propStf.bixelWidth)
warndlg('Invalid bixel width! Use standard bixel width of 5mm!');
pln.propStf.bixelWidth = 5;
set(handles.editBixelWidth,'String','5');
end
end

pln.propStf.gantryAngles = parseStringAsNum(get(handles.editGantryAngle,'String'),true); % [???]

if handles.eduMode
Expand Down Expand Up @@ -2591,9 +2617,22 @@ function pushbutton_recalc_Callback(hObject, ~, handles)
Suffix = '';
end

if sum([stf.totalNumOfBixels]) ~= length(resultGUI.(['w' Suffix]))
warndlg('weight vector does not corresponding to current steering file');
return
wField = ['w' Suffix];

if ~isfield(resultGUI,wField)
warndlg(['No exact match found for weight vector ''' wField ''' with selected dose insance. Trying common weight vector ''w'' instead!']);
wField = 'w';
end

%Second sanity check to exclude case with no 'w' present
if ~isfield(resultGUI,wField)
errordlg('No weight vector found for forward dose recalculation!');
return;
end

if sum([stf.totalNumOfBixels]) ~= length(resultGUI.(wField))
errordlg('Selected weight vector does not correspond to current steering file (wrong number of entries/bixels!)!');
return;
end

% change isocenter if that was changed and do _not_ recreate steering
Expand All @@ -2610,7 +2649,7 @@ function pushbutton_recalc_Callback(hObject, ~, handles)
end

% recalculate cubes in resultGUI
resultGUIreCalc = matRad_calcCubes(resultGUI.(['w' Suffix]),dij,cst);
resultGUIreCalc = matRad_calcCubes(resultGUI.(wField),dij);

% delete old variables to avoid confusion
if isfield(resultGUI,'effect')
Expand Down
Loading

0 comments on commit 4c987aa

Please sign in to comment.