From c72bc7cd47ecb5665a287fb88e101f88118f5232 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Wed, 16 Apr 2014 11:13:40 +0000 Subject: Split up processVol in Vol/Sino cases --- cuda/2d/em.cu | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'cuda/2d/em.cu') diff --git a/cuda/2d/em.cu b/cuda/2d/em.cu index b281516..c75f250 100644 --- a/cuda/2d/em.cu +++ b/cuda/2d/em.cu @@ -101,15 +101,15 @@ bool EM::precomputeWeights() } else #endif { - processVol(D_projData, 1.0f, projPitch, dims.iProjDets, dims.iProjAngles); + processSino(D_projData, 1.0f, projPitch, dims); callBP(D_pixelWeight, pixelPitch, D_projData, projPitch); } - processVol(D_pixelWeight, pixelPitch, dims.iVolWidth, dims.iVolHeight); + processVol(D_pixelWeight, pixelPitch, dims); #if 0 if (useVolumeMask) { // scale pixel weights with mask to zero out masked pixels - processVol(D_pixelWeight, D_maskData, pixelPitch, dims.iVolWidth, dims.iVolHeight); + processVol(D_pixelWeight, D_maskData, pixelPitch, dims); } #endif @@ -133,14 +133,14 @@ bool EM::iterate(unsigned int iterations) callFP(D_volumeData, volumePitch, D_projData, projPitch, 1.0f); // Divide sinogram by FP (into projData) - processVol(D_projData, D_sinoData, projPitch, dims.iProjDets, dims.iProjAngles); + processSino(D_projData, D_sinoData, projPitch, dims); // Do BP of projData into tmpData zeroVolumeData(D_tmpData, tmpPitch, dims); callBP(D_tmpData, tmpPitch, D_projData, projPitch); // Multiply volumeData with tmpData divided by pixel weights - processVol(D_volumeData, D_tmpData, D_pixelWeight, pixelPitch, dims.iVolWidth, dims.iVolHeight); + processVol(D_volumeData, D_tmpData, D_pixelWeight, pixelPitch, dims); } @@ -155,7 +155,7 @@ float EM::computeDiffNorm() // do FP, subtracting projection from sinogram if (useVolumeMask) { cudaMemcpy2D(D_tmpData, sizeof(float)*tmpPitch, D_volumeData, sizeof(float)*volumePitch, sizeof(float)*(dims.iVolWidth), dims.iVolHeight, cudaMemcpyDeviceToDevice); - processVol(D_tmpData, D_maskData, tmpPitch, dims.iVolWidth, dims.iVolHeight); + processVol(D_tmpData, D_maskData, tmpPitch, dims); callFP(D_tmpData, tmpPitch, D_projData, projPitch, -1.0f); } else { callFP(D_volumeData, volumePitch, D_projData, projPitch, -1.0f); -- cgit v1.2.3