Skip to content

Commit

Permalink
small quality of life changes:
Browse files Browse the repository at this point in the history
* make sure rad_depth_cubes are stored
* some numerical stability in the siddon ray tracer
  • Loading branch information
wahln committed Oct 9, 2024
1 parent 814eb43 commit 9e8c918
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,10 @@ function setDefaults(this)
end
end

if this.keepRadDepthCubes && ~isempty(this.radDepthCubes)
dij.radDepthCubes = this.radDepthCubes;
end

dij = this.finalizeDose@DoseEngines.matRad_DoseEngineBase(dij);
end
end
Expand Down
7 changes: 4 additions & 3 deletions matRad/rayTracing/matRad_siddonRayTracer.m
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,11 @@
doesHit = false;
for t = tvalues
p = sourcePoint + t*(targetPoint - sourcePoint);
if (p(1) >= xPlane_1 && p(1) <= xPlane_end && ...
p(2) >= yPlane_1 && p(2) <= yPlane_end && ...
p(3) >= zPlane_1 && p(3) <= zPlane_end)
lowerPlanes = [xPlane_1,yPlane_1,zPlane_1] - sqrt(eps);
upperPlanes = [xPlane_end,yPlane_end,zPlane_end] + sqrt(eps);
if all(p > lowerPlanes & p < upperPlanes)
doesHit = true;
continue;
end
end

Expand Down

0 comments on commit 9e8c918

Please sign in to comment.