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

Method initialize

src/CudaReconstructionAlgorithm2D.cpp:84–113  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

82//---------------------------------------------------------------------------------------
83// Initialize - Config
84bool CCudaReconstructionAlgorithm2D::initialize(const Config& _cfg)
85{
86 assert(!m_bIsInitialized);
87
88 ConfigReader<CAlgorithm> CR("CudaReconstructionAlgorithm2D", this, _cfg);
89
90 if (!CReconstructionAlgorithm2D::initialize(_cfg))
91 return false;
92
93 initializeFromProjector();
94
95 bool ok = true;
96
97 // Deprecated options
98 ok &= CR.getOptionUInt("PixelSuperSampling", m_params.iRaysPerPixelDim, m_params.iRaysPerPixelDim);
99 ok &= CR.getOptionUInt("DetectorSuperSampling", m_params.iRaysPerDet, m_params.iRaysPerDet);
100
101 if (CR.hasOption("GPUIndex"))
102 ok &= CR.getOptionInt("GPUIndex", m_iGPUIndex, -1);
103 else
104 ok &= CR.getOptionInt("GPUindex", m_iGPUIndex, -1);
105
106 if (!ok)
107 return false;
108
109 if (!setupGeometry())
110 return false;
111
112 return _check();
113}
114
115//---------------------------------------------------------------------------------------
116// Initialize - C++

Callers

nothing calls this directly

Calls 3

getOptionUIntMethod · 0.45
hasOptionMethod · 0.45
getOptionIntMethod · 0.45

Tested by

no test coverage detected