diff options
Diffstat (limited to 'src/kernels/backproject.cl')
-rw-r--r-- | src/kernels/backproject.cl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/kernels/backproject.cl b/src/kernels/backproject.cl index 8a81790..88467de 100644 --- a/src/kernels/backproject.cl +++ b/src/kernels/backproject.cl @@ -19,7 +19,7 @@ constant sampler_t volumeSampler = CLK_NORMALIZED_COORDS_FALSE | CLK_ADDRESS_CLAMP | - CLK_FILTER_LINEAR; + CLK_FILTER_NEAREST; kernel void backproject_nearest (global float *sinogram, @@ -86,10 +86,10 @@ backproject_tex (read_only image2d_t sinogram, #pragma unroll 4 #endif for(int proj = 0; proj < n_projections; proj++) { - float h = by * sin_lut[angle_offset + proj] + bx * cos_lut[angle_offset + proj] + axis_pos; + float h = -by * sin_lut[angle_offset + proj] + bx * cos_lut[angle_offset + proj] + axis_pos; sum += read_imagef (sinogram, volumeSampler, (float2)(h, proj + 0.5f)).x; } - slice[idy * get_global_size(0) + idx] = sum * M_PI_F / n_projections; + slice[idy * get_global_size(0) + idx] = sum; } |