diff options
Diffstat (limited to 'include/astra/GeometryUtil3D.h')
-rw-r--r-- | include/astra/GeometryUtil3D.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/include/astra/GeometryUtil3D.h b/include/astra/GeometryUtil3D.h index 698372e..6ceac63 100644 --- a/include/astra/GeometryUtil3D.h +++ b/include/astra/GeometryUtil3D.h @@ -43,6 +43,33 @@ struct SConeProjection { // the V-edge of a detector pixel double fDetVX, fDetVY, fDetVZ; + + + + + void translate(double dx, double dy, double dz) { + fSrcX += dx; + fSrcY += dy; + fSrcZ += dz; + fDetSX += dx; + fDetSY += dy; + fDetSZ += dz; + + } + void scale(double factor) { + fSrcX *= factor; + fSrcY *= factor; + fSrcZ *= factor; + fDetSX *= factor; + fDetSY *= factor; + fDetSZ *= factor; + fDetUX *= factor; + fDetUY *= factor; + fDetUZ *= factor; + fDetVX *= factor; + fDetVY *= factor; + fDetVZ *= factor; + } }; struct SPar3DProjection { @@ -57,6 +84,29 @@ struct SPar3DProjection { // the V-edge of a detector pixel double fDetVX, fDetVY, fDetVZ; + + + + + void translate(double dx, double dy, double dz) { + fDetSX += dx; + fDetSY += dy; + fDetSZ += dz; + } + void scale(double factor) { + fRayX *= factor; + fRayY *= factor; + fRayZ *= factor; + fDetSX *= factor; + fDetSY *= factor; + fDetSZ *= factor; + fDetUX *= factor; + fDetUY *= factor; + fDetUZ *= factor; + fDetVX *= factor; + fDetVY *= factor; + fDetVZ *= factor; + } }; void computeBP_UV_Coeffs(const SPar3DProjection& proj, @@ -68,6 +118,9 @@ void computeBP_UV_Coeffs(const SConeProjection& proj, double &fVX, double &fVY, double &fVZ, double &fVC, double &fDX, double &fDY, double &fDZ, double &fDC); + + + } #endif |