MCPcopy Create free account
hub / github.com/astra-toolbox/astra-toolbox / initialize

Method initialize

src/CudaBackProjectionAlgorithm3D.cpp:108–138  ·  view source on GitHub ↗

--------------------------------------------------------------------------------------- Initialize - Config

Source from the content-addressed store, hash-verified

106//---------------------------------------------------------------------------------------
107// Initialize - Config
108bool CCudaBackProjectionAlgorithm3D::initialize(const Config& _cfg)
109{
110 assert(!m_bIsInitialized);
111
112 ConfigReader<CAlgorithm> CR("CudaBackProjectionAlgorithm3D", this, _cfg);
113
114 // initialization of parent class
115 if (!CReconstructionAlgorithm3D::initialize(_cfg)) {
116 return false;
117 }
118
119 initializeFromProjector();
120
121 bool ok = true;
122
123 // Deprecated options
124 ok &= CR.getOptionInt("VoxelSuperSampling", m_iVoxelSuperSampling, m_iVoxelSuperSampling);
125 if (CR.hasOption("GPUIndex"))
126 ok &= CR.getOptionIntArray("GPUIndex", m_GPUIndices, true);
127 else if (CR.hasOption("GPUindex"))
128 ok &= CR.getOptionIntArray("GPUindex", m_GPUIndices, true);
129
130 ok &= CR.getOptionBool("SIRTWeighting", m_bSIRTWeighting, false);
131
132 if (!ok)
133 return false;
134
135 // success
136 m_bIsInitialized = _check();
137 return m_bIsInitialized;
138}
139
140//----------------------------------------------------------------------------------------
141// Initialize - C++

Callers

nothing calls this directly

Calls 4

getOptionIntMethod · 0.45
hasOptionMethod · 0.45
getOptionIntArrayMethod · 0.45
getOptionBoolMethod · 0.45

Tested by

no test coverage detected