summaryrefslogtreecommitdiffstats
path: root/src/CudaProjector3D.cpp
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2016-12-01 14:03:56 +0100
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2016-12-01 14:05:54 +0100
commit55dabbf035b55f71c4261c9de7ef572da46300ff (patch)
tree0452eaf1342a67c56e1f785387116e1bb62fcd31 /src/CudaProjector3D.cpp
parent72aaa4f9176416303eff7cbd9ec56dcb13adc54f (diff)
downloadastra-55dabbf035b55f71c4261c9de7ef572da46300ff.tar.gz
astra-55dabbf035b55f71c4261c9de7ef572da46300ff.tar.bz2
astra-55dabbf035b55f71c4261c9de7ef572da46300ff.tar.xz
astra-55dabbf035b55f71c4261c9de7ef572da46300ff.zip
Expose the density weighting option of cone_bp
It is now exposed via the new DensityWeighting option of CudaProjector3D.
Diffstat (limited to 'src/CudaProjector3D.cpp')
-rw-r--r--src/CudaProjector3D.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/CudaProjector3D.cpp b/src/CudaProjector3D.cpp
index 29af0c6..a1f091e 100644
--- a/src/CudaProjector3D.cpp
+++ b/src/CudaProjector3D.cpp
@@ -30,6 +30,9 @@ along with the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
#include "astra/VolumeGeometry3D.h"
#include "astra/ProjectionGeometry3D.h"
+#include "astra/ConeProjectionGeometry3D.h"
+#include "astra/ConeVecProjectionGeometry3D.h"
+
namespace astra
{
@@ -64,6 +67,7 @@ void CCudaProjector3D::_clear()
m_iVoxelSuperSampling = 1;
m_iDetectorSuperSampling = 1;
m_iGPUIndex = -1;
+ m_bDensityWeighting = false;
}
//----------------------------------------------------------------------------------------
@@ -128,6 +132,13 @@ bool CCudaProjector3D::initialize(const Config& _cfg)
m_iDetectorSuperSampling = (int)_cfg.self.getOptionNumerical("DetectorSuperSampling", 1);
CC.markOptionParsed("DetectorSuperSampling");
+ if (dynamic_cast<CConeProjectionGeometry3D*>(m_pProjectionGeometry) ||
+ dynamic_cast<CConeVecProjectionGeometry3D*>(m_pProjectionGeometry))
+ {
+ m_bDensityWeighting = _cfg.self.getOptionBool("DensityWeighting", false);
+ CC.markOptionParsed("DensityWeighting");
+ }
+
m_iGPUIndex = (int)_cfg.self.getOptionNumerical("GPUindex", -1);
m_iGPUIndex = (int)_cfg.self.getOptionNumerical("GPUIndex", m_iGPUIndex);
CC.markOptionParsed("GPUIndex");