summaryrefslogtreecommitdiffstats
path: root/src/Float32VolumeData3D.cpp
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2017-09-15 16:38:08 +0200
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2017-09-15 16:38:08 +0200
commitaa31a06235496c0d808e57c8ce914cb4b640bc6e (patch)
tree33385e828ddca0b2857bac9e3dac4dd3723a3eee /src/Float32VolumeData3D.cpp
parentf6aa2db83dfea89f9d2cfc6fcbd3da141ee77e02 (diff)
parent00a1c6118b2d64b867c8e640c295462bcccfc7c9 (diff)
downloadastra-aa31a06235496c0d808e57c8ce914cb4b640bc6e.tar.gz
astra-aa31a06235496c0d808e57c8ce914cb4b640bc6e.tar.bz2
astra-aa31a06235496c0d808e57c8ce914cb4b640bc6e.tar.xz
astra-aa31a06235496c0d808e57c8ce914cb4b640bc6e.zip
Merge branch 'master' into parallel_vec
Diffstat (limited to 'src/Float32VolumeData3D.cpp')
-rw-r--r--src/Float32VolumeData3D.cpp229
1 files changed, 3 insertions, 226 deletions
diff --git a/src/Float32VolumeData3D.cpp b/src/Float32VolumeData3D.cpp
index bd78001..96e6940 100644
--- a/src/Float32VolumeData3D.cpp
+++ b/src/Float32VolumeData3D.cpp
@@ -1,10 +1,10 @@
/*
-----------------------------------------------------------------------
-Copyright: 2010-2015, iMinds-Vision Lab, University of Antwerp
- 2014-2015, CWI, Amsterdam
+Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
+ 2014-2016, CWI, Amsterdam
Contact: astra@uantwerpen.be
-Website: http://sf.net/projects/astra-toolbox
+Website: http://www.astra-toolbox.com/
This file is part of the ASTRA Toolbox.
@@ -23,7 +23,6 @@ You should have received a copy of the GNU General Public License
along with the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
-----------------------------------------------------------------------
-$Id$
*/
#include "astra/Float32VolumeData3D.h"
@@ -44,228 +43,6 @@ CFloat32VolumeData3D::~CFloat32VolumeData3D() {
}
-CFloat32VolumeData3D& CFloat32VolumeData3D::operator+=(const CFloat32VolumeData3D& _data)
-{
- CVolumeGeometry3D * pThisGeometry = getGeometry();
-
- int iSliceCount = pThisGeometry->getGridSliceCount();
-#ifdef _DEBUG
- CVolumeGeometry3D * pDataGeometry = _data.getGeometry();
- int iThisSlicePixelCount = pThisGeometry->getGridRowCount() * pThisGeometry->getGridColCount();
- int iDataSlicePixelCount = pDataGeometry->getGridRowCount() * pDataGeometry->getGridColCount();
-
- ASTRA_ASSERT(iSliceCount == pDataGeometry->getGridSliceCount());
- ASTRA_ASSERT(iThisSlicePixelCount == iDataSlicePixelCount);
-#endif
-
- for(int iSliceIndex = 0; iSliceIndex < iSliceCount; iSliceIndex++)
- {
- CFloat32VolumeData2D * pThisProjection = fetchSliceZ(iSliceIndex);
- CFloat32VolumeData2D * pDataProjection = _data.fetchSliceZ(iSliceIndex);
-
- for(int iDetectorIndex = 0; iDetectorIndex < iDetectorIndex; iDetectorIndex++)
- {
- float32 fThisValue = pThisProjection->getData()[iDetectorIndex];
- float32 fDataValue = pDataProjection->getDataConst()[iDetectorIndex];
-
- fThisValue += fDataValue;
-
- pThisProjection->getData()[iDetectorIndex] = fThisValue;
- }
-
- returnSliceZ(iSliceIndex, pThisProjection);
-
- delete pThisProjection;
- delete pDataProjection;
- }
-
- return *this;
-}
-
-CFloat32VolumeData3D& CFloat32VolumeData3D::operator-=(const CFloat32VolumeData3D& _data)
-{
- CVolumeGeometry3D * pThisGeometry = getGeometry();
-
- int iSliceCount = pThisGeometry->getGridSliceCount();
-#ifdef _DEBUG
- CVolumeGeometry3D * pDataGeometry = _data.getGeometry();
- int iThisSlicePixelCount = pThisGeometry->getGridRowCount() * pThisGeometry->getGridColCount();
- int iDataSlicePixelCount = pDataGeometry->getGridRowCount() * pDataGeometry->getGridColCount();
-
- ASTRA_ASSERT(iSliceCount == pDataGeometry->getGridSliceCount());
- ASTRA_ASSERT(iThisSlicePixelCount == iDataSlicePixelCount);
-#endif
-
- for(int iSliceIndex = 0; iSliceIndex < iSliceCount; iSliceIndex++)
- {
- CFloat32VolumeData2D * pThisProjection = fetchSliceZ(iSliceIndex);
- CFloat32VolumeData2D * pDataProjection = _data.fetchSliceZ(iSliceIndex);
-
- for(int iDetectorIndex = 0; iDetectorIndex < iDetectorIndex; iDetectorIndex++)
- {
- float32 fThisValue = pThisProjection->getData()[iDetectorIndex];
- float32 fDataValue = pDataProjection->getDataConst()[iDetectorIndex];
-
- fThisValue -= fDataValue;
-
- pThisProjection->getData()[iDetectorIndex] = fThisValue;
- }
-
- returnSliceZ(iSliceIndex, pThisProjection);
-
- delete pThisProjection;
- delete pDataProjection;
- }
-
- return *this;
-}
-
-CFloat32VolumeData3D& CFloat32VolumeData3D::operator*=(const CFloat32VolumeData3D& _data)
-{
- CVolumeGeometry3D * pThisGeometry = getGeometry();
-
- int iSliceCount = pThisGeometry->getGridSliceCount();
-#ifdef _DEBUG
- CVolumeGeometry3D * pDataGeometry = _data.getGeometry();
- int iThisSlicePixelCount = pThisGeometry->getGridRowCount() * pThisGeometry->getGridColCount();
- int iDataSlicePixelCount = pDataGeometry->getGridRowCount() * pDataGeometry->getGridColCount();
-
- ASTRA_ASSERT(iSliceCount == pDataGeometry->getGridSliceCount());
- ASTRA_ASSERT(iThisSlicePixelCount == iDataSlicePixelCount);
-#endif
-
- for(int iSliceIndex = 0; iSliceIndex < iSliceCount; iSliceIndex++)
- {
- CFloat32VolumeData2D * pThisProjection = fetchSliceZ(iSliceIndex);
- CFloat32VolumeData2D * pDataProjection = _data.fetchSliceZ(iSliceIndex);
-
- for(int iDetectorIndex = 0; iDetectorIndex < iDetectorIndex; iDetectorIndex++)
- {
- float32 fThisValue = pThisProjection->getData()[iDetectorIndex];
- float32 fDataValue = pDataProjection->getDataConst()[iDetectorIndex];
-
- fThisValue *= fDataValue;
-
- pThisProjection->getData()[iDetectorIndex] = fThisValue;
- }
-
- returnSliceZ(iSliceIndex, pThisProjection);
-
- delete pThisProjection;
- delete pDataProjection;
- }
-
- return *this;
-}
-
-CFloat32VolumeData3D& CFloat32VolumeData3D::operator*=(const float32& _fScalar)
-{
- CVolumeGeometry3D * pThisGeometry = getGeometry();
-
- int iSliceCount = pThisGeometry->getGridSliceCount();
-
- for(int iSliceIndex = 0; iSliceIndex < iSliceCount; iSliceIndex++)
- {
- CFloat32VolumeData2D * pThisProjection = fetchSliceZ(iSliceIndex);
-
- for(int iDetectorIndex = 0; iDetectorIndex < iDetectorIndex; iDetectorIndex++)
- {
- float32 fThisValue = pThisProjection->getData()[iDetectorIndex];
-
- fThisValue *= _fScalar;
-
- pThisProjection->getData()[iDetectorIndex] = fThisValue;
- }
-
- returnSliceZ(iSliceIndex, pThisProjection);
-
- delete pThisProjection;
- }
-
- return *this;
-}
-
-CFloat32VolumeData3D& CFloat32VolumeData3D::operator/=(const float32& _fScalar)
-{
- CVolumeGeometry3D * pThisGeometry = getGeometry();
-
- int iSliceCount = pThisGeometry->getGridSliceCount();
-
- for(int iSliceIndex = 0; iSliceIndex < iSliceCount; iSliceIndex++)
- {
- CFloat32VolumeData2D * pThisProjection = fetchSliceZ(iSliceIndex);
-
- for(int iDetectorIndex = 0; iDetectorIndex < iDetectorIndex; iDetectorIndex++)
- {
- float32 fThisValue = pThisProjection->getData()[iDetectorIndex];
-
- fThisValue /= _fScalar;
-
- pThisProjection->getData()[iDetectorIndex] = fThisValue;
- }
-
- returnSliceZ(iSliceIndex, pThisProjection);
-
- delete pThisProjection;
- }
-
- return *this;
-}
-
-CFloat32VolumeData3D& CFloat32VolumeData3D::operator+=(const float32& _fScalar)
-{
- CVolumeGeometry3D * pThisGeometry = getGeometry();
-
- int iSliceCount = pThisGeometry->getGridSliceCount();
-
- for(int iSliceIndex = 0; iSliceIndex < iSliceCount; iSliceIndex++)
- {
- CFloat32VolumeData2D * pThisProjection = fetchSliceZ(iSliceIndex);
-
- for(int iDetectorIndex = 0; iDetectorIndex < iDetectorIndex; iDetectorIndex++)
- {
- float32 fThisValue = pThisProjection->getData()[iDetectorIndex];
-
- fThisValue += _fScalar;
-
- pThisProjection->getData()[iDetectorIndex] = fThisValue;
- }
-
- returnSliceZ(iSliceIndex, pThisProjection);
-
- delete pThisProjection;
- }
-
- return *this;
-}
-
-CFloat32VolumeData3D& CFloat32VolumeData3D::operator-=(const float32& _fScalar)
-{
- CVolumeGeometry3D * pThisGeometry = getGeometry();
-
- int iSliceCount = pThisGeometry->getGridSliceCount();
-
- for(int iSliceIndex = 0; iSliceIndex < iSliceCount; iSliceIndex++)
- {
- CFloat32VolumeData2D * pThisProjection = fetchSliceZ(iSliceIndex);
-
- for(int iDetectorIndex = 0; iDetectorIndex < iDetectorIndex; iDetectorIndex++)
- {
- float32 fThisValue = pThisProjection->getData()[iDetectorIndex];
-
- fThisValue -= _fScalar;
-
- pThisProjection->getData()[iDetectorIndex] = fThisValue;
- }
-
- returnSliceZ(iSliceIndex, pThisProjection);
-
- delete pThisProjection;
- }
-
- return *this;
-}
-
void CFloat32VolumeData3D::changeGeometry(CVolumeGeometry3D* _pGeometry)
{
if (!m_bInitialized) return;