pysdic.Image.visualize#
- Image.visualize(region=None, rectangle=None, title=None, cmap=None, figsize=(8, 6), rectangle_color='red', rectangle_linewidth=2)[source]#
Visualize the image using Matplotlib or a specific region of the image.
Warning
xandyare defined in the image coordinate system \((x, y)\), wherexis the column index andyis the row index.- Parameters:
region (Optional[Tuple[Integral, Integral, Integral, Integral]], optional) – A tuple defining the region to visualize in the format (x, y, width, height), where (x, y) is expressed in image coordinates. If None, the entire image is visualized, by default None.
rectangle (Optional[Tuple[Integral, Integral, Integral, Integral]], optional) – A tuple defining a rectangle to draw on the image in the format (x, y, width, height), where (x, y) is expressed in image coordinates. If None, no rectangle is drawn, by default None.
title (Optional[
str], optional) – The title of the plot, by default None (which uses no title).cmap (Optional[
str], optional) – The colormap to use for grayscale images, by default None (which uses the default gray colormap).figsize (Tuple[Integral, Integral], optional) – The size of the figure in inches, by default
(8, 6).rectangle_color (
str, optional) – The color of the rectangle to draw on the image, by default ‘red’.rectangle_linewidth (
Integral, optional) – The line width of the rectangle to draw on the image, by default 2.
- Raises:
ValueError – If the image is not set.
- Return type:
None