summaryrefslogtreecommitdiffstats
path: root/cuda/2d/fbp.cu
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <wjp@usecode.org>2019-03-30 21:12:01 +0100
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2019-09-25 14:10:09 +0200
commit11114e33fb504b0b74f3d239e77fe248a027cc23 (patch)
tree60be0df745bbe2c9df5defe63565ef2420e9db85 /cuda/2d/fbp.cu
parent48f4e7b165404a0375db300b9fe59da92edf1cce (diff)
downloadastra-11114e33fb504b0b74f3d239e77fe248a027cc23.tar.gz
astra-11114e33fb504b0b74f3d239e77fe248a027cc23.tar.bz2
astra-11114e33fb504b0b74f3d239e77fe248a027cc23.tar.xz
astra-11114e33fb504b0b74f3d239e77fe248a027cc23.zip
Clean up outputscale naming confusion in cuda::algo
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)
{