summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/astra/Float32ProjectionData3D.h5
-rw-r--r--include/astra/Float32VolumeData3D.h5
-rw-r--r--src/Float32ProjectionData3D.cpp9
-rw-r--r--src/Float32VolumeData3D.cpp9
4 files changed, 28 insertions, 0 deletions
diff --git a/include/astra/Float32ProjectionData3D.h b/include/astra/Float32ProjectionData3D.h
index 79b762e..329c9a4 100644
--- a/include/astra/Float32ProjectionData3D.h
+++ b/include/astra/Float32ProjectionData3D.h
@@ -196,6 +196,11 @@ public:
* @return pointer to projection geometry.
*/
virtual CProjectionGeometry3D* getGeometry() const;
+
+ /** Change the projection geometry.
+ * Note that this can't change the dimensions of the data.
+ */
+ virtual void changeGeometry(CProjectionGeometry3D* pGeometry);
};
diff --git a/include/astra/Float32VolumeData3D.h b/include/astra/Float32VolumeData3D.h
index d8f0ae9..07df78f 100644
--- a/include/astra/Float32VolumeData3D.h
+++ b/include/astra/Float32VolumeData3D.h
@@ -214,6 +214,11 @@ public:
* @return The geometry describing the data stored in this volume
*/
virtual CVolumeGeometry3D* getGeometry() const;
+
+ /** Change the projection geometry.
+ * Note that this can't change the dimensions of the data.
+ */
+ virtual void changeGeometry(CVolumeGeometry3D* pGeometry);
};
//----------------------------------------------------------------------------------------
diff --git a/src/Float32ProjectionData3D.cpp b/src/Float32ProjectionData3D.cpp
index d039c83..2bd0447 100644
--- a/src/Float32ProjectionData3D.cpp
+++ b/src/Float32ProjectionData3D.cpp
@@ -270,4 +270,13 @@ CFloat32ProjectionData3D& CFloat32ProjectionData3D::operator-=(const float32& _f
return *this;
}
+void CFloat32ProjectionData3D::changeGeometry(CProjectionGeometry3D* _pGeometry)
+{
+ if (!m_bInitialized) return;
+
+ delete m_pGeometry;
+ m_pGeometry = _pGeometry->clone();
+}
+
+
} // end namespace astra
diff --git a/src/Float32VolumeData3D.cpp b/src/Float32VolumeData3D.cpp
index ce00a10..bd78001 100644
--- a/src/Float32VolumeData3D.cpp
+++ b/src/Float32VolumeData3D.cpp
@@ -266,4 +266,13 @@ CFloat32VolumeData3D& CFloat32VolumeData3D::operator-=(const float32& _fScalar)
return *this;
}
+void CFloat32VolumeData3D::changeGeometry(CVolumeGeometry3D* _pGeometry)
+{
+ if (!m_bInitialized) return;
+
+ delete m_pGeometry;
+ m_pGeometry = _pGeometry->clone();
+}
+
+
} // end namespace astra