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

Method check

src/CudaForwardProjectionAlgorithm.cpp:143–162  ·  view source on GitHub ↗

---------------------------------------------------------------------------------------- Check

Source from the content-addressed store, hash-verified

141//----------------------------------------------------------------------------------------
142// Check
143bool CCudaForwardProjectionAlgorithm::check()
144{
145 // check pointers
146 ASTRA_CONFIG_CHECK(m_pSinogram, "FP_CUDA", "No valid projection data object found.");
147 ASTRA_CONFIG_CHECK(m_pSinogram->isInitialized(), "FP_CUDA", "Projection data not initialized.");
148 ASTRA_CONFIG_CHECK(m_pVolume, "FP_CUDA", "No valid volume data object found.");
149 ASTRA_CONFIG_CHECK(m_pVolume->isInitialized(), "FP_CUDA", "Volume data not initialized.");
150
151 // check restrictions
152 //int iImageSideBlocks = m_pReconstructionGeometry->getGridColCount() / G_BLOCKIMAGESIZE;
153 //ASTRA_CONFIG_CHECK((iImageSideBlocks * G_BLOCKIMAGESIZE) == m_pVolume->getWidth(), "FP_CUDA", "Volume Width must be a multiple of G_BLOCKIMAGESIZE");
154 //ASTRA_CONFIG_CHECK((iImageSideBlocks * G_BLOCKIMAGESIZE) == m_pVolume->getHeight(), "FP_CUDA", "Volume Height must be a multiple of G_BLOCKIMAGESIZE");
155 //ASTRA_CONFIG_CHECK(m_pProjectionGeometry->getDetectorCount() == (m_pVolume->getWidth() * 3 / 2), "SIRT_CUDA", "Number of detectors must be 1.5 times the width of the image");
156
157 ASTRA_CONFIG_CHECK(m_iGPUIndex >= -1, "FP_CUDA", "GPUIndex must be a non-negative integer.");
158
159 // success
160 m_bIsInitialized = true;
161 return true;
162}
163
164void CCudaForwardProjectionAlgorithm::setGPUIndex(int _iGPUIndex)
165{

Callers

nothing calls this directly

Calls 1

isInitializedMethod · 0.45

Tested by

no test coverage detected