darfix.core.roi.apply_2D_ROI#

darfix.core.roi.apply_2D_ROI(img, origin=None, size=None, center=None)[source]#

Function that computes a ROI at an image.

Parameters:
  • img (array_like) – Image

  • origin (Union[2d vector, None]) – Origin of the roi

  • size (2d-vector) – [Height, Width] of the roi.

  • center (Union[2d vector, None]) – Center of the roi

Returns:

ndarray

Raises:

AssertionError, ValueError