-
Notifications
You must be signed in to change notification settings - Fork 193
Implementation of LET modifying objectives #706
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev_varRBErobOpt
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
|
|
||
|
|
||
| %% Compare LET | ||
| if isfield(resultGUI,'LET') && isfield(resultGUI_MC,'LET') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unneccessary whitespace
| @@ -0,0 +1,96 @@ | |||
| classdef matRad_LETdProjection < matRad_BackProjection | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment about merging into one example!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.