summaryrefslogtreecommitdiffstats
path: root/cuda/2d/sirt.cu
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <WillemJan.Palenstijn@uantwerpen.be>2014-04-16 11:13:33 +0000
committerwpalenst <WillemJan.Palenstijn@uantwerpen.be>2014-04-16 11:13:33 +0000
commitbcff7884bb89dbecd394c75a8f57b0a54a743b52 (patch)
tree7b1d52bdb9dea23fb5c2dcacf3e6b179786ad26b /cuda/2d/sirt.cu
parent959f476f456b147999649ec3a8cca10017b2ad6c (diff)
downloadastra-bcff7884bb89dbecd394c75a8f57b0a54a743b52.tar.gz
astra-bcff7884bb89dbecd394c75a8f57b0a54a743b52.tar.bz2
astra-bcff7884bb89dbecd394c75a8f57b0a54a743b52.tar.xz
astra-bcff7884bb89dbecd394c75a8f57b0a54a743b52.zip
Change allocate/zeroVolume to volume/sinogram-specific variants
Diffstat (limited to 'cuda/2d/sirt.cu')
-rw-r--r--cuda/2d/sirt.cu26
1 files changed, 13 insertions, 13 deletions
diff --git a/cuda/2d/sirt.cu b/cuda/2d/sirt.cu
index eb65962..1b0891a 100644
--- a/cuda/2d/sirt.cu
+++ b/cuda/2d/sirt.cu
@@ -88,17 +88,17 @@ void SIRT::reset()
bool SIRT::init()
{
- allocateVolume(D_pixelWeight, dims.iVolWidth, dims.iVolHeight, pixelPitch);
- zeroVolume(D_pixelWeight, pixelPitch, dims.iVolWidth, dims.iVolHeight);
+ allocateVolumeData(D_pixelWeight, pixelPitch, dims);
+ zeroVolumeData(D_pixelWeight, pixelPitch, dims);
- allocateVolume(D_tmpData, dims.iVolWidth, dims.iVolHeight, tmpPitch);
- zeroVolume(D_tmpData, tmpPitch, dims.iVolWidth, dims.iVolHeight);
+ allocateVolumeData(D_tmpData, tmpPitch, dims);
+ zeroVolumeData(D_tmpData, tmpPitch, dims);
- allocateVolume(D_projData, dims.iProjDets, dims.iProjAngles, projPitch);
- zeroVolume(D_projData, projPitch, dims.iProjDets, dims.iProjAngles);
+ allocateProjectionData(D_projData, projPitch, dims);
+ zeroProjectionData(D_projData, projPitch, dims);
- allocateVolume(D_lineWeight, dims.iProjDets, dims.iProjAngles, linePitch);
- zeroVolume(D_lineWeight, linePitch, dims.iProjDets, dims.iProjAngles);
+ allocateProjectionData(D_lineWeight, linePitch, dims);
+ zeroProjectionData(D_lineWeight, linePitch, dims);
// We can't precompute lineWeights and pixelWeights when using a mask
if (!useVolumeMask && !useSinogramMask)
@@ -110,7 +110,7 @@ bool SIRT::init()
bool SIRT::precomputeWeights()
{
- zeroVolume(D_lineWeight, linePitch, dims.iProjDets, dims.iProjAngles);
+ zeroProjectionData(D_lineWeight, linePitch, dims);
if (useVolumeMask) {
callFP(D_maskData, maskPitch, D_lineWeight, linePitch, 1.0f);
} else {
@@ -125,7 +125,7 @@ bool SIRT::precomputeWeights()
}
- zeroVolume(D_pixelWeight, pixelPitch, dims.iVolWidth, dims.iVolHeight);
+ zeroVolumeData(D_pixelWeight, pixelPitch, dims);
if (useSinogramMask) {
callBP(D_pixelWeight, pixelPitch, D_smaskData, smaskPitch);
} else {
@@ -160,7 +160,7 @@ bool SIRT::uploadMinMaxMasks(const float* pfMinMaskData, const float* pfMaxMaskD
freeMinMaxMasks = true;
bool ok = true;
if (pfMinMaskData) {
- allocateVolume(D_minMaskData, dims.iVolWidth, dims.iVolHeight, minMaskPitch);
+ allocateVolumeData(D_minMaskData, minMaskPitch, dims);
ok = copyVolumeToDevice(pfMinMaskData, iPitch,
dims.iVolWidth, dims.iVolHeight,
D_minMaskData, minMaskPitch);
@@ -169,7 +169,7 @@ bool SIRT::uploadMinMaxMasks(const float* pfMinMaskData, const float* pfMaxMaskD
return false;
if (pfMaxMaskData) {
- allocateVolume(D_maxMaskData, dims.iVolWidth, dims.iVolHeight, maxMaskPitch);
+ allocateVolumeData(D_maxMaskData, maxMaskPitch, dims);
ok = copyVolumeToDevice(pfMaxMaskData, iPitch,
dims.iVolWidth, dims.iVolHeight,
D_maxMaskData, maxMaskPitch);
@@ -204,7 +204,7 @@ bool SIRT::iterate(unsigned int iterations)
processVol<opMul>(D_projData, D_lineWeight, projPitch, dims.iProjDets, dims.iProjAngles);
- zeroVolume(D_tmpData, tmpPitch, dims.iVolWidth, dims.iVolHeight);
+ zeroVolumeData(D_tmpData, tmpPitch, dims);
callBP(D_tmpData, tmpPitch, D_projData, projPitch);