summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Float32Data2D.cpp11
-rw-r--r--src/Float32Data3D.cpp12
2 files changed, 23 insertions, 0 deletions
diff --git a/src/Float32Data2D.cpp b/src/Float32Data2D.cpp
index e51935f..ae84716 100644
--- a/src/Float32Data2D.cpp
+++ b/src/Float32Data2D.cpp
@@ -29,6 +29,7 @@ $Id$
#include "astra/Float32Data2D.h"
#include <iostream>
#include <cstring>
+#include <sstream>
#ifdef _MSC_VER
#include <malloc.h>
@@ -518,6 +519,16 @@ CFloat32Data2D& CFloat32Data2D::operator-=(const float32& f)
}
+std::string CFloat32Data2D::description() const
+{
+ std::stringstream res;
+ res << m_iWidth << "x" << m_iHeight;
+ if (getType() == CFloat32Data2D::PROJECTION) res << " sinogram data \t";
+ if (getType() == CFloat32Data2D::VOLUME) res << " volume data \t";
+ return res.str();
+}
+
+
} // end namespace astra
diff --git a/src/Float32Data3D.cpp b/src/Float32Data3D.cpp
index 4280b3b..57c72ed 100644
--- a/src/Float32Data3D.cpp
+++ b/src/Float32Data3D.cpp
@@ -27,6 +27,7 @@ $Id$
*/
#include "astra/Float32Data3D.h"
+#include <sstream>
using namespace std;
@@ -52,4 +53,15 @@ bool CFloat32Data3D::_data3DSizesEqual(const CFloat32Data3D * _pA, const CFloat3
return ((_pA->m_iWidth == _pB->m_iWidth) && (_pA->m_iHeight == _pB->m_iHeight) && (_pA->m_iDepth == _pB->m_iDepth));
}
+std::string CFloat32Data3D::description() const
+{
+ std::stringstream res;
+ res << m_iWidth << "x" << m_iHeight << "x" << m_iDepth;
+ if (getType() == CFloat32Data3D::PROJECTION) res << " sinogram data \t";
+ if (getType() == CFloat32Data3D::VOLUME) res << " volume data \t";
+ return res.str();
+}
+//----------------------------------------------------------------------------------------
+
+
} // end namespace astra