summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2018-12-23 17:12:09 +0100
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2018-12-23 17:12:47 +0100
commit8190865b347cd358966855519bffa64eb33a636f (patch)
treec19c078f28fd55bccb23d8b7b91e2b3d37ba5960 /src
parent9469738df798ab397e1d27b662a5d45a307cab6b (diff)
downloadastra-8190865b347cd358966855519bffa64eb33a636f.tar.gz
astra-8190865b347cd358966855519bffa64eb33a636f.tar.bz2
astra-8190865b347cd358966855519bffa64eb33a636f.tar.xz
astra-8190865b347cd358966855519bffa64eb33a636f.zip
Add DartMask helper connectivity option check
Diffstat (limited to 'src')
-rw-r--r--src/CudaDartMaskAlgorithm.cpp3
-rw-r--r--src/CudaDartMaskAlgorithm3D.cpp5
2 files changed, 5 insertions, 3 deletions
diff --git a/src/CudaDartMaskAlgorithm.cpp b/src/CudaDartMaskAlgorithm.cpp
index bd9f59f..f6760bc 100644
--- a/src/CudaDartMaskAlgorithm.cpp
+++ b/src/CudaDartMaskAlgorithm.cpp
@@ -143,7 +143,8 @@ void CCudaDartMaskAlgorithm::run(int _iNrIterations)
bool CCudaDartMaskAlgorithm::_check()
{
- // connectivity: 4 of 8
+ // connectivity: 4 or 8
+ ASTRA_CONFIG_CHECK(m_iConn == 4 || m_iConn == 8, "CudaDartMask", "Connectivity must be 4 or 8");
// gpuindex >= 0
diff --git a/src/CudaDartMaskAlgorithm3D.cpp b/src/CudaDartMaskAlgorithm3D.cpp
index 99b0a8d..f2778cf 100644
--- a/src/CudaDartMaskAlgorithm3D.cpp
+++ b/src/CudaDartMaskAlgorithm3D.cpp
@@ -85,7 +85,7 @@ bool CCudaDartMaskAlgorithm3D::initialize(const Config& _cfg)
// Option: Connectivity
try {
- m_iConn = _cfg.self.getOptionInt("Connectivity", 8);
+ m_iConn = _cfg.self.getOptionInt("Connectivity", 26);
} catch (const StringUtil::bad_cast &e) {
ASTRA_CONFIG_CHECK(false, "CudaDartMask3D", "Connectivity must be an integer.");
}
@@ -144,7 +144,8 @@ void CCudaDartMaskAlgorithm3D::run(int _iNrIterations)
bool CCudaDartMaskAlgorithm3D::_check()
{
- // connectivity: 4 of 8
+ // connectivity: 6 or 26
+ ASTRA_CONFIG_CHECK(m_iConn == 6 || m_iConn == 26, "CudaDartMask3D", "Connectivity must be 6 or 26");
// gpuindex >= 0