Skip to content

Commit

Permalink
Compatibility with test script
Browse files Browse the repository at this point in the history
Added phantomBuilder example to test script and rounding added in BOX phantom assignment
  • Loading branch information
tobiasbecher committed May 26, 2023
1 parent 380b740 commit 2bca404
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions PhantomBuilder/matRad_PhantomVOIBox.m
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@
offsets = obj.offset;
dims = obj.boxDimensions;

for x = center(1)+offsets(1) - dims(1)/2 :1: center(1) + offsets(1) + dims(1)/2
for y = center(2)+offsets(2) - dims(2)/2 :1: center(2) + offsets(2) + dims(2)/2
for z = round(center(3)+offsets(3) - dims(3)/2) :1: center(3) + offsets(3) + dims(3)/2
for x = center(1)+offsets(1) - round(dims(1)/2) :1: center(1) + offsets(1) + round(dims(1)/2)
for y = center(2)+offsets(2) - round(dims(2)/2) :1: center(2) + offsets(2) + round(dims(2)/2)
for z = center(3)+offsets(3) - round(dims(3)/2) :1: center(3) + offsets(3) + round(dims(3)/2)
VOIHelper(y,x,z) = 1;

end
Expand Down
4 changes: 3 additions & 1 deletion test/matRad_runTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
warning('off','Octave:divide-by-zero');
end

exampleScripts = {'../examples/matRad_example2_photons.m',...
exampleScripts = {'../examples/matRad_example1_phantomBuilder.m',...
'../examples/matRad_example2_photons.m',...
'../examples/matRad_example3_photonsDAO.m',...
'../examples/matRad_example4_photonsMC.m',...
'../examples/matRad_example5_protons.m',...
Expand Down Expand Up @@ -55,6 +56,7 @@
matRad_unitTestTextManipulation(testScripts,'pln.propDoseCalc.resolution.y',['pln.propDoseCalc.resolution.y = ' num2str(unitTestResolution.y)]);
matRad_unitTestTextManipulation(testScripts,'pln.propDoseCalc.resolution.z',['pln.propDoseCalc.resolution.z = ' num2str(unitTestResolution.z)]);
matRad_unitTestTextManipulation(testScripts,'display(','%%%%%%%%%%%%%%% REMOVED DISPLAY FOR TESTING %%%%%%%%%%%%%%');
matRad_unitTestTextManipulation(testScripts,'clear all','%%%%%%%%%%%%%%% REMOVED CLEAR ALL FOR TESTING %%%%%%%%%%%%%%');

errors = {};
%Running tests
Expand Down

0 comments on commit 2bca404

Please sign in to comment.