summaryrefslogtreecommitdiffstats
path: root/src/Float32VolumeData2D.cpp
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2015-05-13 11:56:24 +0200
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2015-05-13 11:56:24 +0200
commitde30f7538a865a2ee7acb7dd8294fb6cdc4f98be (patch)
treeba11189e6e83e83e73167518b45641fc287c8eda /src/Float32VolumeData2D.cpp
parent6504cffdbe74d9b671222a7ec24b26fbb4f871f0 (diff)
parent86ad56f005d9d3871f654390739459d5634dd5d5 (diff)
downloadastra-de30f7538a865a2ee7acb7dd8294fb6cdc4f98be.tar.gz
astra-de30f7538a865a2ee7acb7dd8294fb6cdc4f98be.tar.bz2
astra-de30f7538a865a2ee7acb7dd8294fb6cdc4f98be.tar.xz
astra-de30f7538a865a2ee7acb7dd8294fb6cdc4f98be.zip
Merge branch 'master'
Diffstat (limited to 'src/Float32VolumeData2D.cpp')
-rw-r--r--src/Float32VolumeData2D.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/Float32VolumeData2D.cpp b/src/Float32VolumeData2D.cpp
index e11c4e4..c903c66 100644
--- a/src/Float32VolumeData2D.cpp
+++ b/src/Float32VolumeData2D.cpp
@@ -72,6 +72,15 @@ CFloat32VolumeData2D::CFloat32VolumeData2D(const CFloat32VolumeData2D& _other) :
m_bInitialized = true;
}
+//----------------------------------------------------------------------------------------
+// Create an instance of the CFloat32VolumeData2D class with pre-allocated data
+CFloat32VolumeData2D::CFloat32VolumeData2D(CVolumeGeometry2D* _pGeometry, CFloat32CustomMemory* _pCustomMemory)
+{
+ m_bInitialized = false;
+ m_bInitialized = initialize(_pGeometry, _pCustomMemory);
+}
+
+
// Assignment operator
CFloat32VolumeData2D& CFloat32VolumeData2D::operator=(const CFloat32VolumeData2D& _other)
@@ -122,6 +131,17 @@ bool CFloat32VolumeData2D::initialize(CVolumeGeometry2D* _pGeometry, float32 _fS
m_bInitialized = _initialize(m_pGeometry->getGridColCount(), m_pGeometry->getGridRowCount(), _fScalar);
return m_bInitialized;
}
+
+//----------------------------------------------------------------------------------------
+// Initialization
+bool CFloat32VolumeData2D::initialize(CVolumeGeometry2D* _pGeometry, CFloat32CustomMemory* _pCustomMemory)
+{
+ m_pGeometry = _pGeometry->clone();
+ m_bInitialized = _initialize(m_pGeometry->getGridColCount(), m_pGeometry->getGridRowCount(), _pCustomMemory);
+ return m_bInitialized;
+}
+
+
//----------------------------------------------------------------------------------------
void CFloat32VolumeData2D::changeGeometry(CVolumeGeometry2D* _pGeometry)
{