nabu.estimation.cor_sino module

class nabu.estimation.cor_sino.SinoCor(img_1, img_2, logger=None)[source]

Bases: object

This class has 2 methods:
  • overlap. Find a rough estimate of COR

  • accurate. Try to refine COR to 1/10 pixel

static schift(mat, val)[source]
overlap(side='right', window_width=None)[source]

Compute COR by minimizing difference of circulating ROI

  • side: preliminary knowledge if the COR is on right or left

  • window_width: width of ROI that will slide on the other part of the sinogram

    by default, 20% of the width of the detector.

accurate(neighborhood=7, shift_value=0.1)[source]

refine the calculation around COR integer pre-calculated value The search will be executed in the defined neighborhood

Parameters:

neighborhood (int) – Parameter for accurate calculation in the vicinity of the rough estimate. It must be an odd number. 0.1 pixels float shifts will be performed over this number of pixel

estimate_cor_coarse(side='right', window_width=None)

Compute COR by minimizing difference of circulating ROI

  • side: preliminary knowledge if the COR is on right or left

  • window_width: width of ROI that will slide on the other part of the sinogram

    by default, 20% of the width of the detector.

estimate_cor_fine(neighborhood=7, shift_value=0.1)

refine the calculation around COR integer pre-calculated value The search will be executed in the defined neighborhood

Parameters:

neighborhood (int) – Parameter for accurate calculation in the vicinity of the rough estimate. It must be an odd number. 0.1 pixels float shifts will be performed over this number of pixel

class nabu.estimation.cor_sino.SinoCorInterface(logger=None, **kwargs)[source]

Bases: object

A class that mimics the interface of CenterOfRotation, while calling SinoCor

find_shift(img_1, img_2, side='right', window_width=None, neighborhood=7, shift_value=0.1, return_relative_to_middle=None, **kwargs)[source]
class nabu.estimation.cor_sino.CenterOfRotationFourierAngles(*args, **kwargs)[source]

Bases: object

This CoR estimation algo is proposed by V. Valls (BCU). It is based on the Fourier transform of the columns on the sinogram. It requires an initial guesss of the CoR wich is retrieved from dataset_info.dataset_scanner.x_rotation_axis_pixel_position. It is assumed in mm and pixel size in um. Options are (for the moment) hard-coded in the SinoCORFinder.cor_finder.extra_options dict.

gaussian(p, x)[source]
tukey(p, x)[source]
sinlet(p, x)[source]
find_shift(sino, angles=None, side='center', near_std=100, near_width=20, shift_sino=True, crop_around_cor=False, signal='tukey', near_weight=0.1, near_alpha=0.5, near_step=0.5, return_relative_to_middle=None)[source]
class nabu.estimation.cor_sino.CenterOfRotationVo(logger=None, verbose=False, extra_options=None)[source]

Bases: object

A wrapper around algotom ‘find_center_vo’ and ‘find_center_360’.

Nghia T. Vo, Michael Drakopoulos, Robert C. Atwood, and Christina Reinhard, “Reliable method for calculating the center of rotation in parallel-beam tomography,” Opt. Express 22, 19078-19086 (2014)

default_extra_options = {}
find_shift(sino, halftomo=False, is_360=False, win_width=100, side='center', search_width_fraction=0.1, step=0.25, radius=4, ratio=0.5, dsp=True, ncore=None, hor_drop=None, ver_drop=None, denoise=True, norm=True, use_overlap=False, return_relative_to_middle=None)[source]