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 (numpy.ndarray) – Image

  • origin (TwoDVector | None) – Origin of the roi

  • size (TwoDVector | None) – [Height, Width] of the roi.

  • center (TwoDVector | None) – Center of the roi

  • img

  • size

Raises:

AssertionError, ValueError

Return type:

numpy.ndarray