diff options
author | Willem Jan Palenstijn <wjp@usecode.org> | 2017-02-09 18:01:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-09 18:01:03 +0100 |
commit | 981d6adc0e3c98a67403b92b1ec4cdb881c62fda (patch) | |
tree | cccde0fd4a3a2d92919338df4e162c9abfd079e1 /src/Float32Data3DMemory.cpp | |
parent | 03c3e5b5043cc8cba9aceeb8641d497edd1be7cf (diff) | |
parent | 4c665b0d5af3841f20501a5dc01a23e671367856 (diff) | |
download | astra-981d6adc0e3c98a67403b92b1ec4cdb881c62fda.tar.gz astra-981d6adc0e3c98a67403b92b1ec4cdb881c62fda.tar.bz2 astra-981d6adc0e3c98a67403b92b1ec4cdb881c62fda.tar.xz astra-981d6adc0e3c98a67403b92b1ec4cdb881c62fda.zip |
Merge pull request #93 from wjp/GPULink
GPULink support
Diffstat (limited to 'src/Float32Data3DMemory.cpp')
-rw-r--r-- | src/Float32Data3DMemory.cpp | 41 |
1 files changed, 2 insertions, 39 deletions
diff --git a/src/Float32Data3DMemory.cpp b/src/Float32Data3DMemory.cpp index 95b1859..5c5c310 100644 --- a/src/Float32Data3DMemory.cpp +++ b/src/Float32Data3DMemory.cpp @@ -27,6 +27,7 @@ along with the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>. #include "astra/Float32Data3DMemory.h" #include <iostream> +#include <cstdlib> namespace astra { @@ -75,10 +76,6 @@ bool CFloat32Data3DMemory::_initialize(int _iWidth, int _iHeight, int _iDepth) m_pCustomMemory = 0; _allocateData(); - // set minmax to default values - m_fGlobalMin = 0.0; - m_fGlobalMax = 0.0; - // initialization complete return true; @@ -166,7 +163,7 @@ bool CFloat32Data3DMemory::_initialize(int _iWidth, int _iHeight, int _iDepth, C ASTRA_ASSERT(_iWidth > 0); ASTRA_ASSERT(_iHeight > 0); ASTRA_ASSERT(_iDepth > 0); - ASTRA_ASSERT(_pCustomMemory != NULL); + //ASTRA_ASSERT(_pCustomMemory != NULL); if (m_bInitialized) { _unInit(); @@ -272,9 +269,6 @@ void CFloat32Data3DMemory::_clear() m_ppfDataRowInd = NULL; m_pppfDataSliceInd = NULL; m_pCustomMemory = NULL; - - //m_fGlobalMin = 0.0f; - //m_fGlobalMax = 0.0f; } //---------------------------------------------------------------------------------------- @@ -289,37 +283,6 @@ void CFloat32Data3DMemory::_unInit() } //---------------------------------------------------------------------------------------- -// Update data statistics, such as minimum and maximum value, after the data has been modified. -void CFloat32Data3DMemory::updateStatistics() -{ - _computeGlobalMinMax(); -} - -//---------------------------------------------------------------------------------------- -// Find the minimum and maximum data value. -void CFloat32Data3DMemory::_computeGlobalMinMax() -{ - // basic checks - ASTRA_ASSERT(m_bInitialized); - ASTRA_ASSERT(m_pfData != NULL); - ASTRA_ASSERT(m_iSize > 0); - - // initial values - m_fGlobalMin = m_pfData[0]; - m_fGlobalMax = m_pfData[0]; - - // loop - size_t i; - float32 v; - for (i = 0; i < m_iSize; ++i) - { - v = m_pfData[i]; - if (v < m_fGlobalMin) m_fGlobalMin = v; - if (v > m_fGlobalMax) m_fGlobalMax = v; - } -} - -//---------------------------------------------------------------------------------------- // Copy the data block pointed to by _pfData to the data block pointed to by m_pfData. void CFloat32Data3DMemory::copyData(const float32* _pfData, size_t _iSize) { |