Implementation of LET modifying objectives#706
Implementation of LET modifying objectives#706lisaseckler wants to merge 49 commits intoe0404:dev_varRBErobOptfrom
Conversation
Dirty dose is calculated test wise in matRad_returnDirtyandCleanDose To implement dirty dose in matRad there are matRad_calcLETmask and matRad_calcDirtyDose otherwise there are new dirty dose objectives in an extra DirtyDoseObjectives folder
Changes in dirty dose objectives and two more Objectives: mLETDose and LETd
…to dev_varRBErobOpt
changes in LETd Objectives
cluster variance for dirty dose, dose and LETd + changes in LETd Projection
removing all the unnecessary parts
| @@ -0,0 +1,72 @@ | |||
| function [stackedbarDose,physDoseInDepth,RBExDcurve,RBEcurve,h,d] = matRad_plotDirtynCleanDoseShare(definedEnd,index,ct,ctCube,dij,resultGUI,add,LET_thres,k,displayComparison) | |||
| % | |||
There was a problem hiding this comment.
small description on the kind of plot generated here
| @@ -0,0 +1,53 @@ | |||
| function [wPhysDose,LET] = matRad_plotLETbeamletSpectrumInVoxel(index, ct, ctCube, dij, resultGUI, bins, displayfigures) | |||
There was a problem hiding this comment.
could we remove the ctCube in the arguments and just directly use the ct ?
| @@ -0,0 +1,83 @@ | |||
| function [highLETphysDose,lowLETphysDose,totalphysDose] = matRad_returnDirtyandCleanDose(index,ct,ctCube,dij,resultGUI,LET_thres,displayfigures,maxDirtyDose,bins) | |||
There was a problem hiding this comment.
same here with the ctCube?
matRad_calcLETmask.m
Outdated
| % dij: matRad dij struct | ||
| % | ||
| % output | ||
| % LETmask: logical matrix for dirty dose |
There was a problem hiding this comment.
have to change the documentation for the output variables
# Conflicts: # matRad/optimization/+DoseObjectives/matRad_DoseVariance.m # matRad/optimization/projections/matRad_DirtyDoseProjection.m # matRad/optimization/projections/matRad_LETdProjection.m # matRad/optimization/projections/matRad_LETxDoseProjection.m # matRad_calcParticleDose.m # test/matRad_runTests.m
|
I just updated with the new folder structure and dose engines. |
wahln
left a comment
There was a problem hiding this comment.
Looks already quite good.
Some things remain with respect to the projections, (not) exchanging LET for LETd throughout the code, the calcDirtyDose and calcLETmasks functions, the necessity to keep mLETd as a matrix.
Consistent naming of LETxDose should also be checked.
| @@ -108,7 +108,7 @@ | |||
|
|
|||
| %% Compare LET | |||
| if isfield(resultGUI,'LET') && isfield(resultGUI_MC,'LET') | |||
There was a problem hiding this comment.
If we change LET to LETd, then this need to really be done rigorously. Also here the isfield checks need to do this.
I am not entirely sure if I want to have that change, probably just using LET is better.
There was a problem hiding this comment.
Could we merge examples 16,17,18 into one example comparing the different objectives?
| % Let's plot the transversal iso-center LET slice | ||
| slice = round(pln.propStf.isoCenter(3)./ct.resolution.z); | ||
| figure; | ||
| imagesc(resultGUI.LET(:,:,slice)),colorbar, colormap(jet); |
There was a problem hiding this comment.
Similar considerations about changing LET to LETd as above.. I start to more and more dislike it, as we want to stay flexible.
| dij.dirtyDoseThreshold = LET_thres; | ||
| [dij.LETmaskDirty,dij.LETmaskClean,dij.mLET] = matRad_calcLETmask(dij); | ||
|
|
||
| dij.dirtyDose = cellfun(@times,dij.LETmaskDirty, dij.physicalDose,'UniformOutput',false); |
There was a problem hiding this comment.
Did some changes here to consider scenarios.
| % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
|
|
||
| dij.dirtyDoseThreshold = LET_thres; | ||
| [dij.LETmaskDirty,dij.LETmaskClean,dij.mLET] = matRad_calcLETmask(dij); |
There was a problem hiding this comment.
Is there any reason to separate matRad_calcLETmask(dij) out o fthe dirty dose function? Do we need it anywhere else?
There was a problem hiding this comment.
yeah we dont really use it for any other functions, so we could include it into the function
| wGrad = cell(size(dij.physicalDose)); | ||
| wGrad(obj.scenarios) = arrayfun(@(scen) projectSingleScenarioGradient(obj,dij,doseGrad,scen,w),obj.scenarios,'UniformOutput',false); | ||
| end | ||
| end |
| @@ -0,0 +1,96 @@ | |||
| classdef matRad_LETdProjection < matRad_BackProjection | |||
There was a problem hiding this comment.
The LETdProjection could probably derive from the LETDose projection (and maybe the pyhsicalDose projection) and then just call the superclass methods to obtain their intermediate results?)
tempFile.m
Outdated
There was a problem hiding this comment.
This should go? Maybe I added it by accident...
| 'examples/matRad_example16_LETd.m',... | ||
| 'examples/matRad_example17_LETxDose.m',... | ||
| 'examples/matRad_example18_DirtyDose.m',... |
There was a problem hiding this comment.
See comment about merging into one example!
There was a problem hiding this comment.
Did some streamlining on this file
|
This PR was automatically marked as stale it has been open 30 days with no activity. Please review/update/merge this PR. |
What's new:
For all new Objectives there are changes in objectiveFunction, objectiveGradient, OptimizationProblem and so on.