--------------------------------------------------------------------------------------- Initialize - Config
| 58 | //--------------------------------------------------------------------------------------- |
| 59 | // Initialize - Config |
| 60 | bool CCudaRoiSelectAlgorithm::initialize(const Config& _cfg) |
| 61 | { |
| 62 | ConfigReader<CAlgorithm> CR("CudaDartRoiSelectAlgorithm", this, _cfg); |
| 63 | |
| 64 | bool ok = true; |
| 65 | int id = -1; |
| 66 | |
| 67 | ok &= CR.getRequiredID("DataId", id); |
| 68 | m_pData = dynamic_cast<CFloat32VolumeData2D*>(CData2DManager::getSingleton().get(id)); |
| 69 | |
| 70 | if (CR.hasOption("GPUIndex")) |
| 71 | ok &= CR.getOptionInt("GPUIndex", m_iGPUIndex, -1); |
| 72 | else |
| 73 | ok &= CR.getOptionInt("GPUindex", m_iGPUIndex, -1); |
| 74 | |
| 75 | ok &= CR.getOptionNumerical("Radius", m_fRadius, 0.0f); |
| 76 | |
| 77 | if (!ok) |
| 78 | return false; |
| 79 | |
| 80 | _check(); |
| 81 | |
| 82 | if (!m_bIsInitialized) |
| 83 | return false; |
| 84 | |
| 85 | return true; |
| 86 | } |
| 87 | |
| 88 | //--------------------------------------------------------------------------------------- |
| 89 | // Initialize - C++ |
nothing calls this directly
no test coverage detected