diff options
author | Willem Jan Palenstijn <wjp@usecode.org> | 2016-12-01 06:00:19 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-01 06:00:19 -0800 |
commit | 75ae79136451cad28375c1bbce6e6cac6080f29e (patch) | |
tree | 4da463b6f94f20b1da4167e9e5f9827316e85f6c /src/CudaProjector3D.cpp | |
parent | 08b14da8cf13d4fe9dcc4787306991e453976494 (diff) | |
parent | 55dabbf035b55f71c4261c9de7ef572da46300ff (diff) | |
download | astra-75ae79136451cad28375c1bbce6e6cac6080f29e.tar.gz astra-75ae79136451cad28375c1bbce6e6cac6080f29e.tar.bz2 astra-75ae79136451cad28375c1bbce6e6cac6080f29e.tar.xz astra-75ae79136451cad28375c1bbce6e6cac6080f29e.zip |
Merge pull request #84 from wjp/expose_ConeBP_density_weighting
Expose the density weighting option of cone_bp
Diffstat (limited to 'src/CudaProjector3D.cpp')
-rw-r--r-- | src/CudaProjector3D.cpp | 11 |
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"); |