summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/astra/ConeProjectionGeometry3D.h5
-rw-r--r--include/astra/ConeVecProjectionGeometry3D.h4
-rw-r--r--include/astra/ParallelProjectionGeometry3D.h4
-rw-r--r--include/astra/ParallelVecProjectionGeometry3D.h4
-rw-r--r--include/astra/ProjectionGeometry3D.h15
5 files changed, 30 insertions, 2 deletions
diff --git a/include/astra/ConeProjectionGeometry3D.h b/include/astra/ConeProjectionGeometry3D.h
index aba8797..ce17353 100644
--- a/include/astra/ConeProjectionGeometry3D.h
+++ b/include/astra/ConeProjectionGeometry3D.h
@@ -185,6 +185,11 @@ public:
* Returns a vector giving the projection direction for a projection and detector index
*/
virtual CVector3D getProjectionDirection(int _iProjectionIndex, int _iDetectorIndex) const;
+
+ virtual void projectPoint(float32 fX, float32 fY, float32 fZ,
+ int iAngleIndex,
+ float32 &fU, float32 &fV) const;
+
};
// Returns the distance from the origin of the coordinate system to the source.
diff --git a/include/astra/ConeVecProjectionGeometry3D.h b/include/astra/ConeVecProjectionGeometry3D.h
index 1765cdd..e58200a 100644
--- a/include/astra/ConeVecProjectionGeometry3D.h
+++ b/include/astra/ConeVecProjectionGeometry3D.h
@@ -147,6 +147,10 @@ public:
virtual CVector3D getProjectionDirection(int _iProjectionIndex, int _iDetectorIndex) const;
const SConeProjection* getProjectionVectors() const { return m_pProjectionAngles; }
+
+ virtual void projectPoint(float32 fX, float32 fY, float32 fZ,
+ int iAngleIndex,
+ float32 &fU, float32 &fV) const;
};
} // namespace astra
diff --git a/include/astra/ParallelProjectionGeometry3D.h b/include/astra/ParallelProjectionGeometry3D.h
index a981104..907eead 100644
--- a/include/astra/ParallelProjectionGeometry3D.h
+++ b/include/astra/ParallelProjectionGeometry3D.h
@@ -147,6 +147,10 @@ public:
*/
virtual CVector3D getProjectionDirection(int _iProjectionIndex, int _iDetectorIndex) const;
+ virtual void projectPoint(float32 fX, float32 fY, float32 fZ,
+ int iAngleIndex,
+ float32 &fU, float32 &fV) const;
+
/**
* Creates (= allocates) a 2D projection geometry used when projecting one slice using a 2D projector
*
diff --git a/include/astra/ParallelVecProjectionGeometry3D.h b/include/astra/ParallelVecProjectionGeometry3D.h
index 0b4a766..0288f3e 100644
--- a/include/astra/ParallelVecProjectionGeometry3D.h
+++ b/include/astra/ParallelVecProjectionGeometry3D.h
@@ -149,7 +149,9 @@ public:
const SPar3DProjection* getProjectionVectors() const { return m_pProjectionAngles; }
-
+ virtual void projectPoint(float32 fX, float32 fY, float32 fZ,
+ int iAngleIndex,
+ float32 &fU, float32 &fV) const;
};
} // namespace astra
diff --git a/include/astra/ProjectionGeometry3D.h b/include/astra/ProjectionGeometry3D.h
index 20ad8f3..9e7f787 100644
--- a/include/astra/ProjectionGeometry3D.h
+++ b/include/astra/ProjectionGeometry3D.h
@@ -298,10 +298,23 @@ public:
*
* @param _iIndex the index of the detector.
* @param _iAngleIndex output: index of angle
- * @param _iDetectorIndex output: index of dectecor
+ * @param _iDetectorIndex output: index of detector
*/
virtual void indexToAngleDetectorIndex(int _iIndex, int& _iAngleIndex, int& _iDetectorIndex) const;
+ /** Project a point onto the detector. The 3D point coordinates
+ * are in units. The output fU,fV are the (unrounded) indices of the
+ * detector column and row.
+ * This may fall outside of the actual detector.
+ *
+ * @param fX,fY,fZ coordinates of the point to project
+ * @param iAngleIndex the index of the angle to use
+ * @param fU,fV the projected point.
+ */
+ virtual void projectPoint(float32 fX, float32 fY, float32 fZ,
+ int iAngleIndex,
+ float32 &fU, float32 &fV) const = 0;
+
/** Returns true if the type of geometry defined in this class is the one specified in _sType.
*
* @param _sType geometry type to compare to.