Skip to main content
`Ctrl`+`K`

# `sinofilter`: Sinogram filtering.

Module for sinogram filtering on CPU/GPU.

class SinoFilter(sino_shape, filter_name=None, ctx=None, devicetype='all', platformid=None, deviceid=None, profile=False, extra_options=None)

  Bases: `OpenclProcessing`

  A class for performing sinogram filtering on GPU using OpenCL.

  This is a convolution in the Fourier space, along one dimension:

  - In 2D: (n_a, d_x): n_a filterings (1D FFT of size d_x)

  - In 3D: (n_z, n_a, d_x): n_z*n_a filterings (1D FFT of size d_x)

  powers = array([ 4, 8, 12, ..., 56458612224000000, 84687918336000000, 169375836672000000], shape=(5880,))
  set_filter(h_filt, normalize=True)

    Set a filter for sinogram filtering.

    Parameters:

      - h_filt – Filter. Each line of the sinogram will be filtered with this filter. It has to be the Real-to-Complex Fourier Transform of some real filter, padded to 2*sinogram_width.

      - normalize – Whether to normalize the filter with pi/num_angles.

  copy2d(dst, src, transfer_shape, dst_offset=(0, 0), src_offset=(0, 0))
    Parameters:

      - dst

      - src

      - transfer_shape

      - dst_offset

      - src_offset

  copy2d_host(dst, src, transfer_shape, dst_offset=(0, 0), src_offset=(0, 0))
    Parameters:

      - dst

      - src

      - transfer_shape

      - dst_offset

      - src_offset

  filter_sino(sino, output=None)
    Parameters:

      - sino – sinogram

      - output

    Returns:

      filtered sinogram