diff options
author | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2015-03-12 14:03:17 +0100 |
---|---|---|
committer | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2015-03-12 14:03:17 +0100 |
commit | 42db106d9b66639312d874e4f35e4e9ff7a407d0 (patch) | |
tree | 53979b6c59f7c18ff9398fa0e926367fdd6b9344 /cuda/3d/algo3d.cu | |
parent | a70ad8df8fc2a3da63fc91dd18bbfd55be7a89dd (diff) | |
download | astra-42db106d9b66639312d874e4f35e4e9ff7a407d0.tar.gz astra-42db106d9b66639312d874e4f35e4e9ff7a407d0.tar.bz2 astra-42db106d9b66639312d874e4f35e4e9ff7a407d0.tar.xz astra-42db106d9b66639312d874e4f35e4e9ff7a407d0.zip |
Scale CUDA 3D FP/BP output with volume pixel size
Diffstat (limited to 'cuda/3d/algo3d.cu')
-rw-r--r-- | cuda/3d/algo3d.cu | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/cuda/3d/algo3d.cu b/cuda/3d/algo3d.cu index b775438..cc86b70 100644 --- a/cuda/3d/algo3d.cu +++ b/cuda/3d/algo3d.cu @@ -41,6 +41,7 @@ ReconAlgo3D::ReconAlgo3D() coneProjs = 0; par3DProjs = 0; shouldAbort = false; + fOutputScale = 1.0f; } ReconAlgo3D::~ReconAlgo3D() @@ -57,9 +58,10 @@ void ReconAlgo3D::reset() shouldAbort = false; } -bool ReconAlgo3D::setConeGeometry(const SDimensions3D& _dims, const SConeProjection* _angles) +bool ReconAlgo3D::setConeGeometry(const SDimensions3D& _dims, const SConeProjection* _angles, float _outputScale) { dims = _dims; + fOutputScale = _outputScale; coneProjs = new SConeProjection[dims.iProjAngles]; par3DProjs = 0; @@ -69,9 +71,10 @@ bool ReconAlgo3D::setConeGeometry(const SDimensions3D& _dims, const SConeProject return true; } -bool ReconAlgo3D::setPar3DGeometry(const SDimensions3D& _dims, const SPar3DProjection* _angles) +bool ReconAlgo3D::setPar3DGeometry(const SDimensions3D& _dims, const SPar3DProjection* _angles, float _outputScale) { dims = _dims; + fOutputScale = _outputScale; par3DProjs = new SPar3DProjection[dims.iProjAngles]; coneProjs = 0; @@ -87,9 +90,9 @@ bool ReconAlgo3D::callFP(cudaPitchedPtr& D_volumeData, float outputScale) { if (coneProjs) { - return ConeFP(D_volumeData, D_projData, dims, coneProjs, outputScale); + return ConeFP(D_volumeData, D_projData, dims, coneProjs, outputScale * this->fOutputScale); } else { - return Par3DFP(D_volumeData, D_projData, dims, par3DProjs, outputScale); + return Par3DFP(D_volumeData, D_projData, dims, par3DProjs, outputScale * this->fOutputScale); } } @@ -98,9 +101,9 @@ bool ReconAlgo3D::callBP(cudaPitchedPtr& D_volumeData, float outputScale) { if (coneProjs) { - return ConeBP(D_volumeData, D_projData, dims, coneProjs, outputScale); + return ConeBP(D_volumeData, D_projData, dims, coneProjs, outputScale * this->fOutputScale); } else { - return Par3DBP(D_volumeData, D_projData, dims, par3DProjs, outputScale); + return Par3DBP(D_volumeData, D_projData, dims, par3DProjs, outputScale * this->fOutputScale); } } |