diff options
author | Willem Jan Palenstijn <wjp@usecode.org> | 2016-04-14 13:12:51 +0200 |
---|---|---|
committer | Willem Jan Palenstijn <wjp@usecode.org> | 2016-04-14 13:12:51 +0200 |
commit | 7633a0f48ce030413642627f16e50d27da4cf709 (patch) | |
tree | 53150eade1dd920644c690a1d9da741cedcefdf6 /cuda/3d/astra3d.cu | |
parent | a7c4275ee8cd90b4ecf7fbca5d9571aae62a2931 (diff) | |
parent | 16430239d04ff738a21146c410918c285552543f (diff) | |
download | astra-7633a0f48ce030413642627f16e50d27da4cf709.tar.gz astra-7633a0f48ce030413642627f16e50d27da4cf709.tar.bz2 astra-7633a0f48ce030413642627f16e50d27da4cf709.tar.xz astra-7633a0f48ce030413642627f16e50d27da4cf709.zip |
Merge pull request #35 from wjp/relaxation
Add relaxation factor option to SIRT, SART
Diffstat (limited to 'cuda/3d/astra3d.cu')
-rw-r--r-- | cuda/3d/astra3d.cu | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/cuda/3d/astra3d.cu b/cuda/3d/astra3d.cu index 8328229..5670873 100644 --- a/cuda/3d/astra3d.cu +++ b/cuda/3d/astra3d.cu @@ -267,6 +267,7 @@ public: float fOriginDetectorDistance; float fSourceZ; float fDetSize; + float fRelaxation; SConeProjection* projs; SPar3DProjection* parprojs; @@ -311,6 +312,8 @@ AstraSIRT3d::AstraSIRT3d() pData->parprojs = 0; pData->fOutputScale = 1.0f; + pData->fRelaxation = 1.0f; + pData->initialized = false; pData->setStartReconstruction = false; @@ -389,6 +392,14 @@ bool AstraSIRT3d::enableSuperSampling(unsigned int iVoxelSuperSampling, return true; } +void AstraSIRT3d::setRelaxation(float r) +{ + if (pData->initialized) + return; + + pData->fRelaxation = r; +} + bool AstraSIRT3d::enableVolumeMask() { if (pData->initialized) @@ -448,6 +459,8 @@ bool AstraSIRT3d::init() if (!ok) return false; + pData->sirt.setRelaxation(pData->fRelaxation); + pData->D_volumeData = allocateVolumeData(pData->dims); ok = pData->D_volumeData.ptr; if (!ok) |