summaryrefslogtreecommitdiffstats
path: root/include/astra/GeometryUtil3D.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/astra/GeometryUtil3D.h')
-rw-r--r--include/astra/GeometryUtil3D.h70
1 files changed, 70 insertions, 0 deletions
diff --git a/include/astra/GeometryUtil3D.h b/include/astra/GeometryUtil3D.h
index 698372e..e4d73e4 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,26 @@ void computeBP_UV_Coeffs(const SConeProjection& proj,
double &fVX, double &fVY, double &fVZ, double &fVC,
double &fDX, double &fDY, double &fDZ, double &fDC);
+
+SConeProjection* genConeProjections(unsigned int iProjAngles,
+ unsigned int iProjU,
+ unsigned int iProjV,
+ double fOriginSourceDistance,
+ double fOriginDetectorDistance,
+ double fDetUSize,
+ double fDetVSize,
+ const float *pfAngles);
+
+SPar3DProjection* genPar3DProjections(unsigned int iProjAngles,
+ unsigned int iProjU,
+ unsigned int iProjV,
+ double fDetUSize,
+ double fDetVSize,
+ const float *pfAngles);
+
+
+
+
}
#endif