concepts.gui.tk.point_picker.get_click_coordinates_from_array#

get_click_coordinates_from_array(image_array, min_dimension=0)[source]#

Opens an image (from a numpy array) in a UI window and waits for the user to click on the image. Returns the coordinates of the click and closes the window.

Parameters:
  • image_array (ndarray) – a numpy array representing the image.

  • min_dimension (int) – minimum dimension of the image window. If the image is smaller than this, it will be resized to fit this dimension while maintaining the aspect ratio.

Returns:

a tuple containing the u and v coordinates of the click (axis 1 and axis 0).

Return type:

Tuple[int, int]