|
Multi Projector System 4
|
Main application class for projection blending controller. More...
Public Member Functions | |
| __init__ (self, tk.Tk root) | |
| Constructor that initializes the application. | |
| setup_window (self) | |
| Sets up the main application window properties. | |
| setup_ui (self) | |
| Creates and arranges all UI components. | |
| run_processing_update (self) | |
| Executes image processing with current parameters. | |
| update_display (self, images_dict) | |
| Updates the GUI with processed images. | |
| show_fullscreen (self, key) | |
| Displays an image in fullscreen mode. | |
| run_calibration (self) | |
| Runs the auto-calibration process. | |
Public Attributes | |
| root | |
| The main Tkinter root window. | |
| cfg | |
| Configuration reader instance for loading settings. | |
| processor | |
| Image processor instance for handling projections. | |
| labels | |
| Dictionary of image label widgets. | |
| image_paths | |
| Dictionary of image file paths. | |
| image_frame | |
| param_var | |
| Integer variable for overlap parameter. | |
| blend_var | |
| String variable for blend mode selection. | |
Protected Member Functions | |
| debounced_update (self) | |
| Schedules a debounced update after parameter changes. | |
Protected Attributes | |
| _update_job | |
| Job ID for debounced update scheduling. | |
Main application class for projection blending controller.
The ImageDisplayApp class creates a GUI application that allows users to:
The application uses configuration files to load initial settings and processes images in real-time based on user input.
| ui.ImageDisplayApp.__init__ | ( | self, | |
| tk.Tk | root | ||
| ) |
Constructor that initializes the application.
Initializes the projection blending controller application by:
| root | The Tkinter root window instance |
| Exception | If configuration file is missing or initialization fails |
|
protected |
Schedules a debounced update after parameter changes.
Cancels any pending updates and schedules a new update after 500ms delay. This prevents excessive processing during rapid parameter changes.
| ui.ImageDisplayApp.run_calibration | ( | self | ) |
Runs the auto-calibration process.
Executes calibration to automatically adjust the overlap parameter for optimal projection alignment. Updates the overlap value and triggers image reprocessing.
| Exception | Shows error dialog if calibration fails |
| ui.ImageDisplayApp.run_processing_update | ( | self | ) |
Executes image processing with current parameters.
Retrieves current overlap and blend mode values, processes the images, and updates the display with the results.
| Exception | Prints error message if processing fails |
| ui.ImageDisplayApp.setup_ui | ( | self | ) |
Creates and arranges all UI components.
Sets up the user interface including:
| ui.ImageDisplayApp.setup_window | ( | self | ) |
Sets up the main application window properties.
Configures the window title, size, and background color.
| ui.ImageDisplayApp.show_fullscreen | ( | self, | |
| key | |||
| ) |
Displays an image in fullscreen mode.
Opens a fullscreen window displaying the specified image. The window can be closed by pressing the Escape key. The image refreshes every 100ms to show updates.
| key | The image key ("main", "left", or "right") |
| ui.ImageDisplayApp.update_display | ( | self, | |
| images_dict | |||
| ) |
Updates the GUI with processed images.
Converts numpy arrays to PhotoImage objects and displays them in the corresponding label widgets. Handles both BGR and BGRA formats.
| images_dict | Dictionary mapping image keys to numpy arrays |
|
protected |
Job ID for debounced update scheduling.
Used to cancel pending updates when new changes occur
| ui.ImageDisplayApp.image_paths |
Dictionary of image file paths.
Maps image types to their file paths
| ui.ImageDisplayApp.labels |
Dictionary of image label widgets.
Maps keys ("main", "left", "right") to their Label widgets