GUIBRUSHR.GUI.WIDGET.MyPlot module¶
- class GUIBRUSHR.GUI.WIDGET.MyPlot.MyPlot(parent: Any, row: int, column: int, width: int, height: int, path_default: Path, columnspan: int = 2, rowspan: int = 1, **kwargs: Dict[str, Any])[source]¶
Bases:
FrameA custom plot widget that displays images in a Frame with blinking capability.
This class creates a plot display widget that can show images and supports blinking between two different images. It uses a Canvas widget for image display and can load additional data from pickle files for blinking functionality.
- Variables:
width (int) – Width of the plot display area
height (int) – Height of the plot display area
image (Optional[PhotoImage]) – The current image being displayed
image1 (Optional[PhotoImage]) – First image for blinking
image2 (Optional[PhotoImage]) – Second image for blinking
canvas (Canvas) – The Canvas widget for image display
string1 (Optional[Any]) – Additional data loaded from first pickle file
string2 (Optional[Any]) – Additional data loaded from second pickle file
- __init__(parent: Any, row: int, column: int, width: int, height: int, path_default: Path, columnspan: int = 2, rowspan: int = 1, **kwargs: Dict[str, Any]) None[source]¶
Initialize the MyPlot widget.
- Parameters:
parent – The parent widget
row – Row position in the parent’s grid
column – Column position in the parent’s grid
width – Width of the plot display area
height – Height of the plot display area
path_default – Base path for finding the test image file
columnspan – Number of columns the widget should span
rowspan – Number of rows the widget should span
**kwargs – Additional keyword arguments passed to the Frame widget
- blink_preparation(path1: str, path2: str, path_pkl1: str, path_pkl2: str) None[source]¶
Prepare images and data for blinking functionality.
- Parameters:
path1 – Path to the first image file
path2 – Path to the second image file
path_pkl1 – Path to the first pickle file containing additional data
path_pkl2 – Path to the second pickle file containing additional data