bool CCudaForwardProjectionAlgorithm3D::initialize(CProjector3D* _pProjector, CFloat32ProjectionData3DMemory* _pProjections, CFloat32VolumeData3DMemory* _pVolume, int _iGPUindex, int _iDetectorSuperSampling) { m_pProjector = _pProjector; // required classes m_pProjections = _pProjections; m_pVolume = _pVolume; CCudaProjector3D* pCudaProjector = dynamic_cast<CCudaProjector3D*>(m_pProjector); if (!pCudaProjector) { // TODO: Report m_iDetectorSuperSampling = _iDetectorSuperSampling; m_iGPUIndex = _iGPUindex; } else { m_iDetectorSuperSampling = pCudaProjector->getDetectorSuperSampling(); m_iGPUIndex = pCudaProjector->getGPUIndex(); } // success m_bIsInitialized = check(); if (!m_bIsInitialized) return false; return true; }
//--------------------------------------------------------------------------------------- void CCudaForwardProjectionAlgorithm3D::initializeFromProjector() { m_iDetectorSuperSampling = 1; m_iGPUIndex = -1; CCudaProjector3D* pCudaProjector = dynamic_cast<CCudaProjector3D*>(m_pProjector); if (!pCudaProjector) { if (m_pProjector) { ASTRA_WARN("non-CUDA Projector3D passed to FP3D_CUDA"); } } else { m_iDetectorSuperSampling = pCudaProjector->getDetectorSuperSampling(); m_iGPUIndex = pCudaProjector->getGPUIndex(); } }