summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Float32ProjectionData3D.cpp226
-rw-r--r--src/Float32ProjectionData3DMemory.cpp96
-rw-r--r--src/Float32VolumeData3D.cpp222
-rw-r--r--src/Float32VolumeData3DMemory.cpp90
4 files changed, 0 insertions, 634 deletions
diff --git a/src/Float32ProjectionData3D.cpp b/src/Float32ProjectionData3D.cpp
index c751c58..ba41e10 100644
--- a/src/Float32ProjectionData3D.cpp
+++ b/src/Float32ProjectionData3D.cpp
@@ -47,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;
diff --git a/src/Float32ProjectionData3DMemory.cpp b/src/Float32ProjectionData3DMemory.cpp
index f42e216..81daf9e 100644
--- a/src/Float32ProjectionData3DMemory.cpp
+++ b/src/Float32ProjectionData3DMemory.cpp
@@ -131,102 +131,6 @@ CFloat32ProjectionData3DMemory::~CFloat32ProjectionData3DMemory()
}
//----------------------------------------------------------------------------------------
-// Fetch a projection
-CFloat32VolumeData2D* CFloat32ProjectionData3DMemory::fetchProjection(int _iProjectionNr) const
-{
- // fetch slice of the geometry
- CVolumeGeometry2D volGeom(m_pGeometry->getDetectorColCount(), m_pGeometry->getDetectorRowCount());
- // create new volume data
- CFloat32VolumeData2D* res = new CFloat32VolumeData2D(&volGeom);
- // copy data
- int row, col;
- for (row = 0; row < m_pGeometry->getDetectorRowCount(); ++row) {
- for (col = 0; col < m_pGeometry->getDetectorColCount(); ++col) {
- res->getData()[row*m_pGeometry->getDetectorColCount() + col] =
- m_pfData[_iProjectionNr * m_pGeometry->getDetectorColCount() + m_pGeometry->getDetectorColCount()* m_pGeometry->getProjectionCount() * row + col];
- }
- }
- // return
- return res;
-}
-
-//----------------------------------------------------------------------------------------
-// Return a projection
-void CFloat32ProjectionData3DMemory::returnProjection(int _iProjectionNr, CFloat32VolumeData2D* _pProjection)
-{
- /// TODO: check geometry
- // copy data
- int row, col;
- for (row = 0; row < m_pGeometry->getDetectorRowCount(); ++row) {
- for (col = 0; col < m_pGeometry->getDetectorColCount(); ++col) {
- m_pfData[_iProjectionNr * m_pGeometry->getDetectorColCount() + m_pGeometry->getDetectorColCount()* m_pGeometry->getProjectionCount() * row + col] =
- _pProjection->getData()[row*m_pGeometry->getDetectorColCount() + col];
- }
- }
-}
-
-//----------------------------------------------------------------------------------------
-// Fetch a sinogram
-CFloat32ProjectionData2D* CFloat32ProjectionData3DMemory::fetchSinogram(int _iSliceNr) const
-{
- CParallelProjectionGeometry3D * pParallelProjGeo = (CParallelProjectionGeometry3D *)m_pGeometry;
- CParallelProjectionGeometry2D * pProjGeo2D = pParallelProjGeo->createProjectionGeometry2D();
-
- // create new projection data
- CFloat32ProjectionData2D* res = new CFloat32ProjectionData2D(pProjGeo2D);
- // copy data
- int row, col;
-
- int iDetectorColumnCount = m_pGeometry->getDetectorColCount();
- int iProjectionAngleCount = m_pGeometry->getProjectionCount();
-
- for (row = 0; row < m_pGeometry->getProjectionCount(); ++row) {
- for (col = 0; col < m_pGeometry->getDetectorColCount(); ++col)
- {
- int iTargetIndex = row * iDetectorColumnCount + col;
- int iSourceIndex = _iSliceNr * iDetectorColumnCount * iProjectionAngleCount + row * iDetectorColumnCount + col;
-
- float32 fStoredValue = m_pfData[iSourceIndex];
-
- res->getData()[iTargetIndex] = fStoredValue;
- }
- }
-
- delete pProjGeo2D;
-
- // return
- return res;
-}
-
-//----------------------------------------------------------------------------------------
-// Return a sinogram
-void CFloat32ProjectionData3DMemory::returnSinogram(int _iSliceNr, CFloat32ProjectionData2D* _pSinogram2D)
-{
- /// TODO: check geometry
- // copy data
- int row, col;
- for (row = 0; row < m_pGeometry->getProjectionCount(); ++row) {
- for (col = 0; col < m_pGeometry->getDetectorColCount(); ++col) {
- m_pfData[_iSliceNr*m_pGeometry->getDetectorColCount()*m_pGeometry->getProjectionCount() + row*m_pGeometry->getDetectorColCount() + col] =
- _pSinogram2D->getData()[row*m_pGeometry->getDetectorColCount() + col];
- }
- }
-}
-
-//----------------------------------------------------------------------------------------
-// Returns a specific value
-float32 CFloat32ProjectionData3DMemory::getDetectorValue(int _iIndex)
-{
- return m_pfData[_iIndex];
-}
-
-//----------------------------------------------------------------------------------------
-// Sets a specific value
-void CFloat32ProjectionData3DMemory::setDetectorValue(int _iIndex, float32 _fValue)
-{
- m_pfData[_iIndex] = _fValue;
-}
-//----------------------------------------------------------------------------------------
CFloat32ProjectionData3DMemory& CFloat32ProjectionData3DMemory::operator=(const CFloat32ProjectionData3DMemory& _dataIn)
{
diff --git a/src/Float32VolumeData3D.cpp b/src/Float32VolumeData3D.cpp
index bf7eced..96e6940 100644
--- a/src/Float32VolumeData3D.cpp
+++ b/src/Float32VolumeData3D.cpp
@@ -43,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;
diff --git a/src/Float32VolumeData3DMemory.cpp b/src/Float32VolumeData3DMemory.cpp
index ba39eaa..9f81c85 100644
--- a/src/Float32VolumeData3DMemory.cpp
+++ b/src/Float32VolumeData3DMemory.cpp
@@ -121,96 +121,6 @@ bool CFloat32VolumeData3DMemory::initialize(CVolumeGeometry3D* _pGeometry, CFloa
return m_bInitialized;
}
-
-//----------------------------------------------------------------------------------------
-// Fetch a slice
-CFloat32VolumeData2D * CFloat32VolumeData3DMemory::fetchSliceZ(int _iSliceIndex) const
-{
- // fetch slice of the geometry
- int iRowCount = m_pGeometry->getGridRowCount();
- int iColumnCount = m_pGeometry->getGridColCount();
- CVolumeGeometry2D volGeom(iColumnCount, iRowCount);
-
- // create new volume data
- CFloat32VolumeData2D* res = new CFloat32VolumeData2D(&volGeom);
-
- // copy data
- float * pfTargetData = res->getData();
- for(int iRowIndex = 0; iRowIndex < iRowCount; iRowIndex++)
- {
- for(int iColumnIndex = 0; iColumnIndex < iColumnCount; iColumnIndex++)
- {
- int iSourceIndex = _iSliceIndex * iColumnCount * iRowCount + iRowIndex * iColumnCount + iColumnIndex;
- int iTargetIndex = iRowIndex * iColumnCount + iColumnIndex;
- float fStoredValue = m_pfData[iSourceIndex];
- pfTargetData[iTargetIndex] = fStoredValue;
- }
- }
- // return
- return res;
-}
-
-//----------------------------------------------------------------------------------------
-// Return a slice
-void CFloat32VolumeData3DMemory::returnSliceZ(int _iSliceIndex, CFloat32VolumeData2D * _pSlice)
-{
- int iRowCount = _pSlice->getGeometry()->getGridRowCount();
- int iColumnCount = _pSlice->getGeometry()->getGridColCount();
-
- assert(iRowCount == m_pGeometry->getGridRowCount());
- assert(iColumnCount == m_pGeometry->getGridColCount());
-
- for(int iRowIndex = 0; iRowIndex < iRowCount; iRowIndex++)
- {
- for(int iColumnIndex = 0; iColumnIndex < iColumnCount; iColumnIndex++)
- {
- int iSourceIndex = iRowIndex * iColumnCount + iColumnIndex;
- int iTargetIndex = _iSliceIndex * iColumnCount * iRowCount + iRowIndex * iColumnCount + iColumnIndex;
- float fStoredValue = _pSlice->getDataConst()[iSourceIndex];
- m_pfData[iTargetIndex] = fStoredValue;
- }
- }
-}
-
-CFloat32VolumeData2D * CFloat32VolumeData3DMemory::fetchSliceX(int _iColumnIndex) const
-{
- // TODO:
- assert(false);
- return NULL;
-}
-
-CFloat32VolumeData2D * CFloat32VolumeData3DMemory::fetchSliceY(int _iRowIndex) const
-{
- // TODO:
- assert(false);
- return NULL;
-}
-
-void CFloat32VolumeData3DMemory::returnSliceX(int _iColumnIndex, CFloat32VolumeData2D * _pSliceData)
-{
- // TODO:
- assert(false);
-}
-
-void CFloat32VolumeData3DMemory::returnSliceY(int _iRowIndex, CFloat32VolumeData2D * _pSliceData)
-{
- // TODO:
- assert(false);
-}
-
-//----------------------------------------------------------------------------------------
-// Returns a specific value
-float32 CFloat32VolumeData3DMemory::getVoxelValue(int _iIndex)
-{
- return m_pfData[_iIndex];
-}
-
-//----------------------------------------------------------------------------------------
-// Sets a specific value
-void CFloat32VolumeData3DMemory::setVoxelValue(int _iIndex, float32 _fValue)
-{
- m_pfData[_iIndex] = _fValue;
-}
//----------------------------------------------------------------------------------------
CFloat32VolumeData3DMemory& CFloat32VolumeData3DMemory::operator=(const CFloat32VolumeData3DMemory& _dataIn)