UML Diagrams » History » Revision 6
« Previous |
Revision 6/11
(diff)
| Next »
Ty Hikaru DAULTON, 10/31/2024 02:03 PM
Home | About Us | About the Project | UML Diagrams | Codes | Outcome
UML Diagrams
Project Draft Diagram |
Package: pkg¶
The package pkg includes a system for managing images, their overlap, and user interactions through a GUI. Below is a description of the key classes and their relationships.
Class: ShareData¶
ShareData serves as the central data holder and manager for the system. It handles image paths, configurations, and shared data between various components.
Attributes:
- path: String — Path of the image or configuration file.
- left_image: nparray — Left-side image as a numpy array.
- right_image: nparray — Right-side image as a numpy array.
- overlap_region: int — Represents the overlap between left and right images.
- alpha: int — Alpha value, likely used for image transparency.
- leftSide: boolean — Indicates whether the left side is active or selected.
Methods:
- init(): Constructor for initializing the ShareData object.
- write_config(): Writes configuration settings to a file.
- read_config(path: String): Reads a configuration file from the specified path.
ShareData is crucial for holding and sharing data that other classes, such as Commands and ImageIO, interact with.
Class: Commands¶
The Commands class implements methods for interacting with images and the GUI.
Attributes:
None explicitly defined but has access to ShareData and the GUI.
Methods:
- init(gui: GUI, shared_data: String[]): Constructor to initialize with the GUI and shared data.
- load_left_image(): Loads the left image from shared data.
- load_right_image(): Loads the right image from shared data.
- show_left_image(): Displays the left image in the GUI.
- show_right_image(): Displays the right image in the GUI.
- set_overlap_region(): Sets the overlap region between the images.
- set_alpha_value(): Sets the alpha value (transparency).
The Commands class manages core logic for loading and manipulating images and coordinates between the ShareData and GUI.
Class: ImageIO¶
The ImageIO class handles input/output operations related to image files. It can load images, write images to a file, and display images in a window.
Methods:
- init(shared_data: String[]): Initializes the object with shared data.
- load_image(path: int): Loads an image from the given path.
- write_image(img: nparray, fileName: String): Writes an image to a file.
- show_image(img: nparray, title: String): Displays an image with the specified title.
ImageIO focuses on the actual image processing tasks like reading, saving, and displaying images.
Class: GUI¶
GUI is the class responsible for rendering the user interface and managing user interactions. It is likely based on tkinter given the constructor reference.
Methods:
- init(master: tk.TK): Initializes the GUI with a master window from tkinter.
- control_window(): Manages control of the GUI window, possibly handling user interactions.
This class represents the visual layer of the system where images are displayed and controlled.
Relationships¶
- The Commands, ImageIO, and GUI classes all interact with ShareData to store and retrieve image data and configuration.
- Commands and GUI are closely connected, with Commands issuing instructions to GUI for displaying images or responding to user input.
- The ConfigFile (depicted at the top) indicates that configuration data is stored in external files, which are managed by the ShareData class through write_config() and read_config().
Updated by Ty Hikaru DAULTON 6 months ago · 6 revisions