summaryrefslogtreecommitdiffstats
path: root/cuda/2d/algo.cu
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2019-09-27 15:16:26 +0200
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2019-09-27 15:16:26 +0200
commit54af7e8e22a3f1c9d90b13291b28d39778c05564 (patch)
tree260310b16d624261bb80f82979af27750022259b /cuda/2d/algo.cu
parent1fec36f7ccadd5f7dcf2bb59b0654dc53653b0f3 (diff)
parentb629db207bb263495bfff2e61ce189ccac27b4b9 (diff)
downloadastra-54af7e8e22a3f1c9d90b13291b28d39778c05564.tar.gz
astra-54af7e8e22a3f1c9d90b13291b28d39778c05564.tar.bz2
astra-54af7e8e22a3f1c9d90b13291b28d39778c05564.tar.xz
astra-54af7e8e22a3f1c9d90b13291b28d39778c05564.zip
Merge branch 'consistent_scaling'
Diffstat (limited to 'cuda/2d/algo.cu')
-rw-r--r--cuda/2d/algo.cu19
1 files changed, 7 insertions, 12 deletions
diff --git a/cuda/2d/algo.cu b/cuda/2d/algo.cu
index b4c2864..be15b25 100644
--- a/cuda/2d/algo.cu
+++ b/cuda/2d/algo.cu
@@ -134,8 +134,8 @@ bool ReconAlgo::setGeometry(const astra::CVolumeGeometry2D* pVolGeom,
delete[] fanProjs;
fanProjs = 0;
- fOutputScale = 1.0f;
- ok = convertAstraGeometry(pVolGeom, pProjGeom, parProjs, fanProjs, fOutputScale);
+ fProjectorScale = 1.0f;
+ ok = convertAstraGeometry(pVolGeom, pProjGeom, parProjs, fanProjs, fProjectorScale);
if (!ok)
return false;
@@ -242,7 +242,7 @@ bool ReconAlgo::allocateBuffers()
return true;
}
-bool ReconAlgo::copyDataToGPU(const float* pfSinogram, unsigned int iSinogramPitch, float fSinogramScale,
+bool ReconAlgo::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)
@@ -258,11 +258,6 @@ bool ReconAlgo::copyDataToGPU(const float* pfSinogram, unsigned int iSinogramPit
if (!ok)
return false;
- // rescale sinogram to adjust for pixel size
- processSino<opMul>(D_sinoData, fSinogramScale,
- //1.0f/(fPixelSize*fPixelSize),
- sinoPitch, dims);
-
ok = copyVolumeToDevice(pfReconstruction, iReconstructionPitch,
dims,
D_volumeData, volumePitch);
@@ -316,11 +311,11 @@ bool ReconAlgo::callFP(float* D_volumeData, unsigned int volumePitch,
if (parProjs) {
assert(!fanProjs);
return FP(D_volumeData, volumePitch, D_projData, projPitch,
- dims, parProjs, fOutputScale * outputScale);
+ dims, parProjs, fProjectorScale * outputScale);
} else {
assert(fanProjs);
return FanFP(D_volumeData, volumePitch, D_projData, projPitch,
- dims, fanProjs, fOutputScale * outputScale);
+ dims, fanProjs, fProjectorScale * outputScale);
}
}
@@ -331,11 +326,11 @@ bool ReconAlgo::callBP(float* D_volumeData, unsigned int volumePitch,
if (parProjs) {
assert(!fanProjs);
return BP(D_volumeData, volumePitch, D_projData, projPitch,
- dims, parProjs, outputScale);
+ dims, parProjs, fProjectorScale * outputScale);
} else {
assert(fanProjs);
return FanBP(D_volumeData, volumePitch, D_projData, projPitch,
- dims, fanProjs, outputScale);
+ dims, fanProjs, fProjectorScale * outputScale);
}
}