diff options
Diffstat (limited to 'include/astra/cuda/2d')
-rw-r--r-- | include/astra/cuda/2d/algo.h | 9 | ||||
-rw-r--r-- | include/astra/cuda/2d/cgls.h | 2 | ||||
-rw-r--r-- | include/astra/cuda/2d/fbp.h | 6 |
3 files changed, 13 insertions, 4 deletions
diff --git a/include/astra/cuda/2d/algo.h b/include/astra/cuda/2d/algo.h index 3fccdef..b670b8b 100644 --- a/include/astra/cuda/2d/algo.h +++ b/include/astra/cuda/2d/algo.h @@ -56,6 +56,10 @@ public: bool setSuperSampling(int raysPerDet, int raysPerPixelDim); + // Scale the final reconstruction. + // May be called at any time after setGeometry and before iterate(). Multiple calls stack. + bool setReconstructionScale(float fScale); + virtual bool enableVolumeMask(); virtual bool enableSinogramMask(); @@ -88,8 +92,7 @@ public: // sinogram, reconstruction, volume mask and sinogram mask in system RAM, // respectively. The corresponding pitch variables give the pitches // of these buffers, measured in floats. - // The sinogram is multiplied by fSinogramScale after uploading it. - virtual bool copyDataToGPU(const float* pfSinogram, unsigned int iSinogramPitch, float fSinogramScale, + virtual bool copyDataToGPU(const float* pfSinogram, unsigned int iSinogramPitch, const float* pfReconstruction, unsigned int iReconstructionPitch, const float* pfVolMask, unsigned int iVolMaskPitch, const float* pfSinoMask, unsigned int iSinoMaskPitch); @@ -133,7 +136,7 @@ protected: SDimensions dims; SParProjection* parProjs; SFanProjection* fanProjs; - float fOutputScale; + float fProjectorScale; bool freeGPUMemory; diff --git a/include/astra/cuda/2d/cgls.h b/include/astra/cuda/2d/cgls.h index 375a425..a854a74 100644 --- a/include/astra/cuda/2d/cgls.h +++ b/include/astra/cuda/2d/cgls.h @@ -47,7 +47,7 @@ public: virtual bool setBuffers(float* D_volumeData, unsigned int volumePitch, float* D_projData, unsigned int projPitch); - virtual bool copyDataToGPU(const float* pfSinogram, unsigned int iSinogramPitch, float fSinogramScale, + virtual bool copyDataToGPU(const float* pfSinogram, unsigned int iSinogramPitch, const float* pfReconstruction, unsigned int iReconstructionPitch, const float* pfVolMask, unsigned int iVolMaskPitch, const float* pfSinoMask, unsigned int iSinoMaskPitch); diff --git a/include/astra/cuda/2d/fbp.h b/include/astra/cuda/2d/fbp.h index 1adf3b1..3aa4741 100644 --- a/include/astra/cuda/2d/fbp.h +++ b/include/astra/cuda/2d/fbp.h @@ -79,6 +79,11 @@ public: bool setShortScan(bool ss) { m_bShortScan = ss; return true; } + // Scale the final reconstruction. + // May be called at any time before iterate(). + bool setReconstructionScale(float fScale); + + virtual bool init(); virtual bool iterate(unsigned int iterations); @@ -90,6 +95,7 @@ protected: void* D_filter; // cufftComplex* bool m_bShortScan; + float fReconstructionScale; }; } |