Skip to content

Commit

Permalink
Update matRad_PhotonPencilBeamSVDEngine.m
Browse files Browse the repository at this point in the history
Check for collimation field
  • Loading branch information
wahln authored Aug 23, 2024
1 parent 3e93708 commit 1e107b3
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions matRad/doseCalc/+DoseEngines/matRad_PhotonPencilBeamSVDEngine.m
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,19 @@
% create this from superclass
this = this@DoseEngines.matRad_PencilBeamEngineAbstract(pln);

if nargin > 0 && isfield(pln,'propStf') && isfield(pln.propStf,'bixelWidth')
% 0 if field calc is bixel based, 1 if dose calc is field based
% num2str is only used to prevent failure of strcmp when bixelWidth
% contains a number and not a string
this.isFieldBasedDoseCalc = strcmp(num2str(pln.propStf.bixelWidth),'field');
%TODO: engines should not rely on reading properties from "propStf", we need to find another way to handle those two fields in the future.
if nargin > 0 && isfield(pln,'propStf')
if isfield(pln.propStf,'bixelWidth')
% 0 if field calc is bixel based, 1 if dose calc is field based
% num2str is only used to prevent failure of strcmp when bixelWidth
% contains a number and not a string
this.isFieldBasedDoseCalc = strcmp(num2str(pln.propStf.bixelWidth),'field');
end

%Potentially stored collimation information
if isfield(pln.propStf,'collimation')
this.collimation = pln.propStf.collimation;
end
end
end

Expand Down

0 comments on commit 1e107b3

Please sign in to comment.