diff options
Diffstat (limited to 'cuda/2d/par_bp.cu')
-rw-r--r-- | cuda/2d/par_bp.cu | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/cuda/2d/par_bp.cu b/cuda/2d/par_bp.cu index 3bf78ee..f080abb 100644 --- a/cuda/2d/par_bp.cu +++ b/cuda/2d/par_bp.cu @@ -28,10 +28,6 @@ along with the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>. #include "astra/cuda/2d/util.h" #include "astra/cuda/2d/arith.h" -#ifdef STANDALONE -#include "testutil.h" -#endif - #include <cstdio> #include <cassert> #include <iostream> @@ -297,55 +293,3 @@ bool BP_SART(float* D_volumeData, unsigned int volumePitch, } - -#ifdef STANDALONE - -using namespace astraCUDA; - -int main() -{ - float* D_volumeData; - float* D_projData; - - SDimensions dims; - dims.iVolWidth = 1024; - dims.iVolHeight = 1024; - dims.iProjAngles = 512; - dims.iProjDets = 1536; - dims.fDetScale = 1.0f; - dims.iRaysPerDet = 1; - - unsigned int volumePitch, projPitch; - - allocateVolume(D_volumeData, dims.iVolWidth, dims.iVolHeight, volumePitch); - printf("pitch: %u\n", volumePitch); - - allocateVolume(D_projData, dims.iProjDets, dims.iProjAngles, projPitch); - printf("pitch: %u\n", projPitch); - - unsigned int y, x; - float* sino = loadImage("sino.png", y, x); - - float* img = new float[dims.iVolWidth*dims.iVolHeight]; - - memset(img, 0, dims.iVolWidth*dims.iVolHeight*sizeof(float)); - - copyVolumeToDevice(img, dims.iVolWidth, dims.iVolWidth, dims.iVolHeight, D_volumeData, volumePitch); - copySinogramToDevice(sino, dims.iProjDets, dims.iProjDets, dims.iProjAngles, D_projData, projPitch); - - float* angle = new float[dims.iProjAngles]; - - for (unsigned int i = 0; i < dims.iProjAngles; ++i) - angle[i] = i*(M_PI/dims.iProjAngles); - - BP(D_volumeData, volumePitch, D_projData, projPitch, dims, angle, 0, 1.0f); - - delete[] angle; - - copyVolumeFromDevice(img, dims.iVolWidth, dims.iVolWidth, dims.iVolHeight, D_volumeData, volumePitch); - - saveImage("vol.png",dims.iVolHeight,dims.iVolWidth,img); - - return 0; -} -#endif |