summaryrefslogtreecommitdiffstats
path: root/cuda/2d/fbp.cu
diff options
context:
space:
mode:
Diffstat (limited to 'cuda/2d/fbp.cu')
-rw-r--r--cuda/2d/fbp.cu15
1 files changed, 12 insertions, 3 deletions
diff --git a/cuda/2d/fbp.cu b/cuda/2d/fbp.cu
index 65f1d68..f0edc19 100644
--- a/cuda/2d/fbp.cu
+++ b/cuda/2d/fbp.cu
@@ -58,7 +58,8 @@ int FBP::calcFourierFilterSize(int _iDetectorCount)
FBP::FBP() : ReconAlgo()
{
D_filter = 0;
-
+ m_bShortScan = false;
+ fReconstructionScale = 1.0f;
}
FBP::~FBP()
@@ -72,6 +73,8 @@ void FBP::reset()
freeComplexOnDevice((cufftComplex *)D_filter);
D_filter = 0;
}
+ m_bShortScan = false;
+ fReconstructionScale = 1.0f;
}
bool FBP::init()
@@ -79,6 +82,12 @@ bool FBP::init()
return true;
}
+bool FBP::setReconstructionScale(float fScale)
+{
+ fReconstructionScale = fScale;
+ return true;
+}
+
bool FBP::setFilter(const astra::SFilterConfig &_cfg)
{
if (D_filter)
@@ -321,14 +330,14 @@ bool FBP::iterate(unsigned int iterations)
if (fanProjs) {
float fOutputScale = 1.0 / (/*fPixelSize * fPixelSize * fPixelSize * */ fFanDetSize * fFanDetSize);
- ok = FanBP_FBPWeighted(D_volumeData, volumePitch, D_sinoData, sinoPitch, dims, fanProjs, fOutputScale * this->fOutputScale);
+ ok = FanBP_FBPWeighted(D_volumeData, volumePitch, D_sinoData, sinoPitch, dims, fanProjs, fOutputScale * fProjectorScale * fReconstructionScale);
} else {
// scale by number of angles. For the fan-beam case, this is already
// handled by FDK_PreWeight
float fOutputScale = (M_PI / 2.0f) / (float)dims.iProjAngles;
- ok = BP(D_volumeData, volumePitch, D_sinoData, sinoPitch, dims, parProjs, fOutputScale * this->fOutputScale);
+ ok = BP(D_volumeData, volumePitch, D_sinoData, sinoPitch, dims, parProjs, fOutputScale * fProjectorScale * fReconstructionScale);
}
if(!ok)
{