Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into rc/v2.10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
wahln committed Nov 5, 2020
2 parents e01a5dc + df2da63 commit 8c11f04
Show file tree
Hide file tree
Showing 16 changed files with 131 additions and 17 deletions.
15 changes: 15 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/bugfix_pull_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
### Bug description
Either describe the bug and how to reproduce it (see the corresponding issue template) or reference the respective issue.

### Approach
Describe why your approach fixes the described bug

### Open Questions and/or Concerns
Use a github checklists to adress any concerns like. e.g.
- [ ] I wasn't sure about this or that variable and if I did the correct thing with it
- [ ] I am not sure if this is compatible with the latest Matlab version
- [ ] etc.
This checklist then has to be checked before merge

### References
Any helpful external information (e.g. links to stackoverflow question, blogposts, etc.)
18 changes: 18 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/feature_pull_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
### Bug description
Describe the new feature you want to contribute and reference respective issues if this specific enhancement was asked for.

### Approach
Describe how you implemented the feature:
- How does my feature change matRad code?
- Are there any new parameters associated with the feature that need to be documented? (maybe think about providing defaults in MatRad_Config)
- Are there external dependencies (toolboxes, mex files, etc.)?

### Open Questions and/or Concerns
Use a github checklists to adress any concerns like. e.g.
- [ ] I wasn't sure about this or that variable and if I did the correct thing with it
- [ ] I am not sure if this is compatible with the latest Matlab version
- [ ] etc.
This self-defined checklist then has to be checked before merge by reviewers and yourself.

### References
Any helpful external information (e.g. links to stackoverflow question, blogposts, external software websites, etc.)
17 changes: 17 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/release_checklist_pull_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
### Release Version
Version of new Release and Type (new major release, minor release, patch release)

### Release Checklist

- [ ] Version number changed in matRad_getVersion
- [ ] Adapted Changelog.txt
- [ ] All required mex files compiled
- [ ] Third Party libraries / scripts up to date
- [ ] Standalone(s) generated and tested
- [ ] Wiki adapted
- [ ] Optional changes to README.md
- [ ] Check license information

### References
Any references regarding new functionality etc.

26 changes: 26 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 14
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 28
# Issues with these labels will never be considered stale
exemptLabels:
- Hotfix needed
- bug
- enhancement
- help wanted
# Label to use when marking an issue as stale
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: >
This issue has been automatically closed because it has not seen any
activity in four weeks. This happens usually when the issue has already
been solved or it is no longer relevant. If that's not the case,
feel free to reopen the issue.
#Only use on issues for now
only: issues
13 changes: 9 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ jobs:
homebrew:
update: true
packages:
- octave
- llvm
- libomp
- gdcm
- octave
cache:
directories:
- $HOME/Library/Caches/Homebrew
Expand Down Expand Up @@ -65,7 +66,7 @@ before_install:
# Windows Setup
- if [[ "$TRAVIS_JOB_NAME" == "Windows Octave" ]]; then echo "Testing matRad on Windows..." ; fi
- if [[ "$TRAVIS_JOB_NAME" == "Windows Octave" ]]; then choco install octave.portable ; fi
# - if [[ "$TRAVIS_JOB_NAME" == "Windows Octave" ]]; then bash ./before_install_win_gitbash.sh ; fi
- if [[ "$TRAVIS_JOB_NAME" == "Windows Octave" ]]; then bash .travis/before_install_win_gitbash.sh ; fi


before_script:
Expand All @@ -88,10 +89,14 @@ script:
# OSX script
- if [[ "$TRAVIS_JOB_NAME" == "OSX Octave" ]]; then travis_wait 45 .travis/runtests.sh octave-cli ; fi
# Windows script
- if [[ "$TRAVIS_JOB_NAME" == "Windows Octave" ]]; then travis_wait 45 .travis/runtests.sh octave-cli ; fi
- if [[ "$TRAVIS_JOB_NAME" == "Windows Octave" ]]; then travis_wait 45 "cmd.exe //C RefreshEnv.cmd & .travis/runtests.sh octave-cli" ; fi

before_cache:
- if [[ "$TRAVIS_JOB_NAME" == "OSX Octave" ]]; then brew cleanup; fi

notifications:
slack: e0404:u5tBXbO6D1mEwzJuFZV0MmqJ
slack:
if: repo = e0404/matRad
rooms:
- e0404:u5tBXbO6D1mEwzJuFZV0MmqJ

10 changes: 6 additions & 4 deletions .travis/before_install_win_gitbash.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#!/usr/bin/env bash

sudo chmod +x .travis/runtests.sh
sudo chmod +x submodules/MCsquare/MCsquare_linux
#sudo chmod +x MCsquare/MCsquare_windows.exe

mv optimization/optimizer/ipopt.m optimization/optimizer/ipopt.m.bak
#mv optimization/optimizer/ipopt.m optimization/optimizer/ipopt.m.bak

octave --no-gui --eval "pkg install -forge dicom"
octave --no-gui --eval "pkg install -forge nan"
#octave --no-gui --eval "pkg install -forge dicom"
#octave --no-gui --eval "pkg install -forge nan"

cmd.exe //C RefreshEnv.cmd
24 changes: 21 additions & 3 deletions matRadGUI.m
Original file line number Diff line number Diff line change
Expand Up @@ -1355,15 +1355,33 @@ function Update3DView(handles)
Result = evalin('base','resultGUI');
end

ct = evalin('base','ct');
cst = evalin('base','cst');
pln = evalin('base','pln');

if ismember('stf',AllVarNames)
stf = evalin('base','stf');

%validate stf with current pln settings
validStf = true;
gantryAngles = [stf.gantryAngle];
validStf = isequal(gantryAngles,pln.propStf.gantryAngles) & validStf;
couchAngles = [stf.couchAngle];
validStf = isequal(couchAngles,pln.propStf.couchAngles) & validStf;
isoCenter = vertcat(stf.isoCenter);
validStf = isequal(isoCenter,pln.propStf.isoCenter) & validStf;

if ~validStf
matRad_cfg = MatRad_Config.instance();
matRad_cfg.dispWarning('stf and pln are not consistent, using pln for geometry display!');
stf = [];
end

else
stf = [];
end

ct = evalin('base','ct');
cst = evalin('base','cst');
pln = evalin('base','pln');

end

oldView = get(axesFig3D,'View');
Expand Down
23 changes: 18 additions & 5 deletions matRad_calcPhotonDoseMC.m
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,17 @@

matRad_calcDoseInit;

% gaussian filter to model penumbra from (measured) machine output / see diploma thesis siggel 4.1.2
if isfield(machine.data,'penumbraFWHMatIso')
penumbraFWHM = machine.data.penumbraFWHMatIso;
else
penumbraFWHM = 5;
matRad_cfg.dispWarning('photon machine file does not contain measured penumbra width in machine.data.penumbraFWHMatIso. Assuming 5 mm.');
end

sourceFWHM = penumbraFWHM * machine.meta.SCD/(machine.meta.SAD - machine.meta.SCD);
sigmaGauss = sourceFWHM / sqrt(8*log(2)); % [mm]

% set up arrays for book keeping
dij.bixelNum = NaN*ones(dij.totalNumOfBixels,1);
dij.rayNum = NaN*ones(dij.totalNumOfBixels,1);
Expand All @@ -79,9 +90,11 @@
ompMCoptions.randomSeeds = [97 33];

%start source definition
ompMCoptions.spectrumFile = [omcFolder filesep 'spectra' filesep 'mohan6.spectrum'];
ompMCoptions.monoEnergy = 0.1;
ompMCoptions.charge = 0;
ompMCoptions.spectrumFile = [omcFolder filesep 'spectra' filesep 'mohan6.spectrum'];
ompMCoptions.monoEnergy = 0.1;
ompMCoptions.charge = 0;
ompMCoptions.sourceGeometry = 'gaussian';
ompMCoptions.sourceGaussianWidth = 0.1*sigmaGauss;

% start MC transport
ompMCoptions.dataFolder = [omcFolder filesep 'data' filesep];
Expand Down Expand Up @@ -193,7 +206,7 @@
end

%% Create beamlet source
useCornersSCD = false; %false -> use ISO corners
useCornersSCD = true; %false -> use ISO corners

numOfBixels = [stf(:).numOfRays];
beamSource = zeros(dij.numOfBeams, 3);
Expand Down Expand Up @@ -305,7 +318,7 @@
end
catch ME
errorString = [ME.message '\nThis error was thrown by the MEX-interface of ompMC.\nMex interfaces can raise compatability issues which may be resolved by compiling them by hand directly on your particular system.'];
matRad_cfg.dispError(ME.identifier,errorString);
matRad_cfg.dispError(errorString);
end

%Calibrate the dose with above factor
Expand Down
Binary file modified ompMC/omc_matrad.mexa64
Binary file not shown.
Binary file modified ompMC/omc_matrad.mexmaci64
Binary file not shown.
Binary file modified ompMC/omc_matrad.mexocta64
Binary file not shown.
Binary file modified ompMC/omc_matrad.mexoctmac64
Binary file not shown.
Binary file modified ompMC/omc_matrad.mexoctw64
Binary file not shown.
Binary file modified ompMC/omc_matrad.mexw64
Binary file not shown.
Binary file modified optimization/optimizer/ipopt.mexoctmac64
Binary file not shown.

0 comments on commit 8c11f04

Please sign in to comment.