tubeCenterPx

xripl.magnification.tubeCenterPx(minimaIdxs, lineoutY=None, plotsFlag=False)[source]

Given the pixel positions of the tube edges, obtains the tube center in pixels for a tube target.

Parameters
  • minimaIdxs (tuple) – A tuple of ints corresponding to the pixel positions of the two minima in intensity found in the radiograph by lineoutMinima(). These minima correspond to the inner edge of the target tube.

  • lineoutY (numpy.ndarray) – Intensity values of the lineout from which tube edges were found. This is only used for plotting. Default is None.

  • plotsFlag (bool) – Plots the lineout and overlays the pixel position of the tube edges and center. Default is False.