From 01e94c82d907b8d6aa155affc01160396e794b31 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Tue, 22 Apr 2014 14:16:06 +0000 Subject: Add mxarray/link functionality for 3d volumes --- src/Float32VolumeData3DMemory.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/Float32VolumeData3DMemory.cpp') diff --git a/src/Float32VolumeData3DMemory.cpp b/src/Float32VolumeData3DMemory.cpp index aa3832b..96119f5 100644 --- a/src/Float32VolumeData3DMemory.cpp +++ b/src/Float32VolumeData3DMemory.cpp @@ -67,6 +67,14 @@ CFloat32VolumeData3DMemory::CFloat32VolumeData3DMemory(CVolumeGeometry3D* _pGeom m_bInitialized = false; m_bInitialized = initialize(_pGeometry, _fScalar); } +//---------------------------------------------------------------------------------------- +// Create an instance of the CFloat32VolumeData2D class with pre-allocated data +CFloat32VolumeData3DMemory::CFloat32VolumeData3DMemory(CVolumeGeometry3D* _pGeometry, CFloat32CustomMemory* _pCustomMemory) +{ + m_bInitialized = false; + m_bInitialized = initialize(_pGeometry, _pCustomMemory); +} + //---------------------------------------------------------------------------------------- // Destructor @@ -105,6 +113,15 @@ bool CFloat32VolumeData3DMemory::initialize(CVolumeGeometry3D* _pGeometry, float m_bInitialized = _initialize(m_pGeometry->getGridColCount(), m_pGeometry->getGridRowCount(), m_pGeometry->getGridSliceCount(), _fScalar); return m_bInitialized; } +//---------------------------------------------------------------------------------------- +// Initialization +bool CFloat32VolumeData3DMemory::initialize(CVolumeGeometry3D* _pGeometry, CFloat32CustomMemory* _pCustomMemory) +{ + m_pGeometry = _pGeometry->clone(); + m_bInitialized = _initialize(m_pGeometry->getGridColCount(), m_pGeometry->getGridRowCount(), m_pGeometry->getGridSliceCount(), _pCustomMemory); + return m_bInitialized; +} + //---------------------------------------------------------------------------------------- // Fetch a slice -- cgit v1.2.3