def show_image(image: np.ndarray | Figure, title: str = "Image") -> None:
    """Display image in window.

    Args:
        image (np.ndarray | Figure): Image or matplotlib figure to display
        title (str): Window title. Defaults to "Image"

    Examples:
        >>> img = read_image("image.jpg")
        >>> show_image(img, title="My Image")
    """
    if isinstance(image, Figure):
        image = figure_to_array(image)
    image = cv2.cvtColor(image, cv2.COLOR_RGB2BGR)
    cv2.imshow(title, image)
    cv2.waitKey(0)
    cv2.destroyAllWindows()
Display image in window.

    Args:
        image (np.ndarray | Figure): Image or matplotlib figure to display
        title (str): Window title. Defaults to "Image"

    Examples:
        >>> img = read_image("image.jpg")
        >>> show_image(img, title="My Image")
    
src/anomalib/data/utils/image.py