diff options
author | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2016-01-14 11:07:01 +0100 |
---|---|---|
committer | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2016-01-14 11:07:01 +0100 |
commit | a7ce7a296545a9361c496e906997c9b7b5d70875 (patch) | |
tree | 18075b5cef0df3c4ed6833df8890d41cdfc3acef /src | |
parent | feedff76504d15c08ef46905410bbdbdc5bfe13d (diff) | |
parent | 13d945c0b2812a5a4958876a80378f4015b173bf (diff) | |
download | astra-a7ce7a296545a9361c496e906997c9b7b5d70875.tar.gz astra-a7ce7a296545a9361c496e906997c9b7b5d70875.tar.bz2 astra-a7ce7a296545a9361c496e906997c9b7b5d70875.tar.xz astra-a7ce7a296545a9361c496e906997c9b7b5d70875.zip |
Merge branch 'master'
Diffstat (limited to 'src')
-rw-r--r-- | src/CompositeGeometryManager.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/CompositeGeometryManager.cpp b/src/CompositeGeometryManager.cpp index 9be4797..41f6319 100644 --- a/src/CompositeGeometryManager.cpp +++ b/src/CompositeGeometryManager.cpp @@ -247,6 +247,18 @@ CCompositeGeometryManager::CPart* CCompositeGeometryManager::CVolumePart::reduce //ASTRA_DEBUG("coord extent: %f - %f", zmin, zmax); + // Clip both zmin and zmax to get rid of extreme (or infinite) values + // NB: When individual pz values are +/-Inf, the sign is determined + // by ray direction and on which side of the face the ray passes. + if (zmin < pGeom->getWindowMinZ() - 2*pixz) + zmin = pGeom->getWindowMinZ() - 2*pixz; + if (zmin > pGeom->getWindowMaxZ() + 2*pixz) + zmin = pGeom->getWindowMaxZ() + 2*pixz; + if (zmax < pGeom->getWindowMinZ() - 2*pixz) + zmax = pGeom->getWindowMinZ() - 2*pixz; + if (zmax > pGeom->getWindowMaxZ() + 2*pixz) + zmax = pGeom->getWindowMaxZ() + 2*pixz; + zmin = (zmin - pixz - pGeom->getWindowMinZ()) / pixz; zmax = (zmax + pixz - pGeom->getWindowMinZ()) / pixz; |