-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed example and implemented preconditioner within fluence optimization
- Loading branch information
1 parent
2ccc4eb
commit f5433e1
Showing
3 changed files
with
62 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
function dij = matRad_mixModPreconditioner(dij) | ||
% Dose influence preconditioner for mixed modality plans | ||
% | ||
% | ||
% | ||
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
% | ||
% Copyright 2016 the matRad development team. | ||
% | ||
% This file is part of the matRad project. It is subject to the license | ||
% terms in the LICENSE file found in the top-level directory of this | ||
% distribution and at https://github.com/e0404/matRad/LICENSES.txt. No part | ||
% of the matRad project, including this file, may be copied, modified, | ||
% propagated, or distributed except according to the terms contained in the | ||
% LICENSE file. | ||
% | ||
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
|
||
|
||
% check if its is a mixed mod dij exists | ||
if ~isfield(dij,'original_Dijs') | ||
return; | ||
end | ||
|
||
% check to identify what is the preconditioning value | ||
|
||
for i = 1: numel(dij.original_Dijs) | ||
preconW(i) = max(mean(dij.original_Dijs{i}.physicalDose{1},1)); | ||
end | ||
preconW = round(preconW./min(preconW)); | ||
dij.preconW = 1./preconW; | ||
|
||
% make change to all dij type structures in one | ||
for mod = 1 : numel(dij.original_Dijs) | ||
fieldNames = fieldnames(dij.original_Dijs{mod}); | ||
|
||
for i = 1 : numel(fieldNames) | ||
if iscell(dij.original_Dijs{mod}.(fieldNames{i})) | ||
|
||
for j = 1 : numel(dij.original_Dijs{mod}.(fieldNames{i})) | ||
dij.original_Dijs{mod}.(fieldNames{i}){j} = bsxfun(@times,dij.original_Dijs{mod}.(fieldNames{i}){j}, dij.preconW(mod)); | ||
end | ||
end | ||
end | ||
end | ||
|
||
end |