diff options
author | Daniel M. Pelt <D.M.Pelt@cwi.nl> | 2015-04-09 15:44:01 +0200 |
---|---|---|
committer | Daniel M. Pelt <D.M.Pelt@cwi.nl> | 2015-04-09 15:44:01 +0200 |
commit | 1b32573046f33050b9300324e6c74e10abb6caaf (patch) | |
tree | c211a5d749faabfbe36fa4b93dd3482328fc4715 /src/Float32VolumeData2D.cpp | |
parent | 3042b1369a96eef4798ea4280dd7aa1a8be2fcca (diff) | |
download | astra-1b32573046f33050b9300324e6c74e10abb6caaf.tar.gz astra-1b32573046f33050b9300324e6c74e10abb6caaf.tar.bz2 astra-1b32573046f33050b9300324e6c74e10abb6caaf.tar.xz astra-1b32573046f33050b9300324e6c74e10abb6caaf.zip |
Add 'link' feature to Python (for 2D and 3D data)
Diffstat (limited to 'src/Float32VolumeData2D.cpp')
-rw-r--r-- | src/Float32VolumeData2D.cpp | 20 |
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) { |