Skip to content

Commit 9e8c918

Browse files
committed
small quality of life changes:
* make sure rad_depth_cubes are stored * some numerical stability in the siddon ray tracer
1 parent 814eb43 commit 9e8c918

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

matRad/doseCalc/+DoseEngines/matRad_PencilBeamEngineAbstract.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,10 @@ function setDefaults(this)
531531
end
532532
end
533533

534+
if this.keepRadDepthCubes && ~isempty(this.radDepthCubes)
535+
dij.radDepthCubes = this.radDepthCubes;
536+
end
537+
534538
dij = this.finalizeDose@DoseEngines.matRad_DoseEngineBase(dij);
535539
end
536540
end

matRad/rayTracing/matRad_siddonRayTracer.m

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,11 @@
8484
doesHit = false;
8585
for t = tvalues
8686
p = sourcePoint + t*(targetPoint - sourcePoint);
87-
if (p(1) >= xPlane_1 && p(1) <= xPlane_end && ...
88-
p(2) >= yPlane_1 && p(2) <= yPlane_end && ...
89-
p(3) >= zPlane_1 && p(3) <= zPlane_end)
87+
lowerPlanes = [xPlane_1,yPlane_1,zPlane_1] - sqrt(eps);
88+
upperPlanes = [xPlane_end,yPlane_end,zPlane_end] + sqrt(eps);
89+
if all(p > lowerPlanes & p < upperPlanes)
9090
doesHit = true;
91+
continue;
9192
end
9293
end
9394

0 commit comments

Comments
 (0)