summaryrefslogtreecommitdiffstats
path: root/src/Float32ProjectionData3D.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Float32ProjectionData3D.cpp')
-rw-r--r--src/Float32ProjectionData3D.cpp233
1 files changed, 3 insertions, 230 deletions
diff --git a/src/Float32ProjectionData3D.cpp b/src/Float32ProjectionData3D.cpp
index 680ad55..ba41e10 100644
--- a/src/Float32ProjectionData3D.cpp
+++ b/src/Float32ProjectionData3D.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/Float32ProjectionData3D.h"
@@ -48,232 +47,6 @@ CFloat32ProjectionData3D::~CFloat32ProjectionData3D() {
m_pGeometry = 0;
}
-CFloat32ProjectionData3D& CFloat32ProjectionData3D::operator+=(const CFloat32ProjectionData3D& _data)
-{
- CProjectionGeometry3D * pThisGeometry = getGeometry();
-
- int iProjectionCount = pThisGeometry->getProjectionCount();
- int iDetectorCount = pThisGeometry->getDetectorTotCount();
-#ifdef _DEBUG
- CProjectionGeometry3D * pDataGeometry = _data.getGeometry();
- int iDataProjectionDetectorCount = pDataGeometry->getDetectorTotCount();
-
- ASTRA_ASSERT(iProjectionCount == pDataGeometry->getProjectionCount());
- ASTRA_ASSERT(iDetectorCount == iDataProjectionDetectorCount);
-#endif
-
- for(int iProjectionIndex = 0; iProjectionIndex < iProjectionCount; iProjectionIndex++)
- {
- CFloat32VolumeData2D * pThisProjection = fetchProjection(iProjectionIndex);
- CFloat32VolumeData2D * pDataProjection = _data.fetchProjection(iProjectionIndex);
-
- for(int iDetectorIndex = 0; iDetectorIndex < iDetectorCount; iDetectorIndex++)
- {
- float32 fThisValue = pThisProjection->getData()[iDetectorIndex];
- float32 fDataValue = pDataProjection->getDataConst()[iDetectorIndex];
-
- fThisValue += fDataValue;
-
- pThisProjection->getData()[iDetectorIndex] = fThisValue;
- }
-
- returnProjection(iProjectionIndex, pThisProjection);
-
- delete pThisProjection;
- delete pDataProjection;
- }
-
- return *this;
-}
-
-CFloat32ProjectionData3D& CFloat32ProjectionData3D::operator-=(const CFloat32ProjectionData3D& _data)
-{
- CProjectionGeometry3D * pThisGeometry = getGeometry();
-
- int iProjectionCount = pThisGeometry->getProjectionCount();
- int iDetectorCount = pThisGeometry->getDetectorTotCount();
-#ifdef _DEBUG
- CProjectionGeometry3D * pDataGeometry = _data.getGeometry();
- int iDataProjectionDetectorCount = pDataGeometry->getDetectorTotCount();
-
- ASTRA_ASSERT(iProjectionCount == pDataGeometry->getProjectionCount());
- ASTRA_ASSERT(iDetectorCount == iDataProjectionDetectorCount);
-#endif
-
- for(int iProjectionIndex = 0; iProjectionIndex < iProjectionCount; iProjectionIndex++)
- {
- CFloat32VolumeData2D * pThisProjection = fetchProjection(iProjectionIndex);
- CFloat32VolumeData2D * pDataProjection = _data.fetchProjection(iProjectionIndex);
-
- for(int iDetectorIndex = 0; iDetectorIndex < iDetectorCount; iDetectorIndex++)
- {
- float32 fThisValue = pThisProjection->getData()[iDetectorIndex];
- float32 fDataValue = pDataProjection->getDataConst()[iDetectorIndex];
-
- fThisValue -= fDataValue;
-
- pThisProjection->getData()[iDetectorIndex] = fThisValue;
- }
-
- returnProjection(iProjectionIndex, pThisProjection);
-
- delete pThisProjection;
- delete pDataProjection;
- }
-
- return *this;
-}
-
-CFloat32ProjectionData3D& CFloat32ProjectionData3D::operator*=(const CFloat32ProjectionData3D& _data)
-{
- CProjectionGeometry3D * pThisGeometry = getGeometry();
-
- int iProjectionCount = pThisGeometry->getProjectionCount();
- int iDetectorCount = pThisGeometry->getDetectorTotCount();
-#ifdef _DEBUG
- CProjectionGeometry3D * pDataGeometry = _data.getGeometry();
- int iDataProjectionDetectorCount = pDataGeometry->getDetectorTotCount();
-
- ASTRA_ASSERT(iProjectionCount == pDataGeometry->getProjectionCount());
- ASTRA_ASSERT(iDetectorCount == iDataProjectionDetectorCount);
-#endif
-
- for(int iProjectionIndex = 0; iProjectionIndex < iProjectionCount; iProjectionIndex++)
- {
- CFloat32VolumeData2D * pThisProjection = fetchProjection(iProjectionIndex);
- CFloat32VolumeData2D * pDataProjection = _data.fetchProjection(iProjectionIndex);
-
- for(int iDetectorIndex = 0; iDetectorIndex < iDetectorCount; iDetectorIndex++)
- {
- float32 fThisValue = pThisProjection->getData()[iDetectorIndex];
- float32 fDataValue = pDataProjection->getDataConst()[iDetectorIndex];
-
- fThisValue *= fDataValue;
-
- pThisProjection->getData()[iDetectorIndex] = fThisValue;
- }
-
- returnProjection(iProjectionIndex, pThisProjection);
-
- delete pThisProjection;
- delete pDataProjection;
- }
-
- return *this;
-}
-
-CFloat32ProjectionData3D& CFloat32ProjectionData3D::operator*=(const float32& _fScalar)
-{
- CProjectionGeometry3D * pThisGeometry = getGeometry();
-
- int iProjectionCount = pThisGeometry->getProjectionCount();
- int iDetectorCount = pThisGeometry->getDetectorTotCount();
-
- for(int iProjectionIndex = 0; iProjectionIndex < iProjectionCount; iProjectionIndex++)
- {
- CFloat32VolumeData2D * pThisProjection = fetchProjection(iProjectionIndex);
-
- for(int iDetectorIndex = 0; iDetectorIndex < iDetectorCount; iDetectorIndex++)
- {
- float32 fThisValue = pThisProjection->getData()[iDetectorIndex];
-
- fThisValue *= _fScalar;
-
- pThisProjection->getData()[iDetectorIndex] = fThisValue;
- }
-
- returnProjection(iProjectionIndex, pThisProjection);
-
- delete pThisProjection;
- }
-
- return *this;
-}
-
-CFloat32ProjectionData3D& CFloat32ProjectionData3D::operator/=(const float32& _fScalar)
-{
- CProjectionGeometry3D * pThisGeometry = getGeometry();
-
- int iProjectionCount = pThisGeometry->getProjectionCount();
- int iDetectorCount = pThisGeometry->getDetectorTotCount();
-
- for(int iProjectionIndex = 0; iProjectionIndex < iProjectionCount; iProjectionIndex++)
- {
- CFloat32VolumeData2D * pThisProjection = fetchProjection(iProjectionIndex);
-
- for(int iDetectorIndex = 0; iDetectorIndex < iDetectorCount; iDetectorIndex++)
- {
- float32 fThisValue = pThisProjection->getData()[iDetectorIndex];
-
- fThisValue /= _fScalar;
-
- pThisProjection->getData()[iDetectorIndex] = fThisValue;
- }
-
- returnProjection(iProjectionIndex, pThisProjection);
-
- delete pThisProjection;
- }
-
- return *this;
-}
-
-CFloat32ProjectionData3D& CFloat32ProjectionData3D::operator+=(const float32& _fScalar)
-{
- CProjectionGeometry3D * pThisGeometry = getGeometry();
-
- int iProjectionCount = pThisGeometry->getProjectionCount();
- int iDetectorCount = pThisGeometry->getDetectorTotCount();
-
- for(int iProjectionIndex = 0; iProjectionIndex < iProjectionCount; iProjectionIndex++)
- {
- CFloat32VolumeData2D * pThisProjection = fetchProjection(iProjectionIndex);
-
- for(int iDetectorIndex = 0; iDetectorIndex < iDetectorCount; iDetectorIndex++)
- {
- float32 fThisValue = pThisProjection->getData()[iDetectorIndex];
-
- fThisValue += _fScalar;
-
- pThisProjection->getData()[iDetectorIndex] = fThisValue;
- }
-
- returnProjection(iProjectionIndex, pThisProjection);
-
- delete pThisProjection;
- }
-
- return *this;
-}
-
-CFloat32ProjectionData3D& CFloat32ProjectionData3D::operator-=(const float32& _fScalar)
-{
- CProjectionGeometry3D * pThisGeometry = getGeometry();
-
- int iProjectionCount = pThisGeometry->getProjectionCount();
- int iDetectorCount = pThisGeometry->getDetectorTotCount();
-
- for(int iProjectionIndex = 0; iProjectionIndex < iProjectionCount; iProjectionIndex++)
- {
- CFloat32VolumeData2D * pThisProjection = fetchProjection(iProjectionIndex);
-
- for(int iDetectorIndex = 0; iDetectorIndex < iDetectorCount; iDetectorIndex++)
- {
- float32 fThisValue = pThisProjection->getData()[iDetectorIndex];
-
- fThisValue -= _fScalar;
-
- pThisProjection->getData()[iDetectorIndex] = fThisValue;
- }
-
- returnProjection(iProjectionIndex, pThisProjection);
-
- delete pThisProjection;
- }
-
- return *this;
-}
-
void CFloat32ProjectionData3D::changeGeometry(CProjectionGeometry3D* _pGeometry)
{
if (!m_bInitialized) return;