Project

General

Profile

UML Diagrams » History » Version 14

Joseph Eugene PELC, 11/07/2024 01:13 PM

1 1 Faiq Sayyidan SETIAWAN
---
2
3 4 Faiq Sayyidan SETIAWAN
*[[/|Home]]*   |   *[[Team Members]]*   |   *[[Project Description]]*   |   *[[Code]]*   |   *[[UML Diagrams]]*   |   *[[Results]]*   |
4 1 Faiq Sayyidan SETIAWAN
5
---
6 3 Faiq Sayyidan SETIAWAN
7
h1=. <pre>
8
UML Diagrams </pre>
9 5 Faiq Sayyidan SETIAWAN
10
11
table{width: 100%}.
12 7 Faiq Sayyidan SETIAWAN
|={width: 100%; background-color:  #FF5733  ;}. *Project UML Diagram* |
13 6 Faiq Sayyidan SETIAWAN
14 13 Faiq Sayyidan SETIAWAN
!pbl4444.png!
15 8 Joseph Eugene PELC
16 10 Joseph Eugene PELC
table{width: 100%}.
17 12 Joseph Eugene PELC
|={width: 100%; background-color:  #DD1232  ;}. *UML Diagram Classes Description* |
18 10 Joseph Eugene PELC
19 9 Joseph Eugene PELC
*Classes*
20 8 Joseph Eugene PELC
1. ConfigReader
21
   ○ Attributes:
22
     ■ config_path (str): The path to the configuration file.
23
     ■ config_parser (ConfigParser): An instance of a configuration parser.
24
25
   ○ Methods:
26
     ■ __init__(self, config_path=None, configName=None): Constructor to initialize with an optional config path.
27
     ■ getImageName(): Returns the image name.
28
     ■ getProjectedOverlayAlphaWidth(): Returns the width of the projected overlay alpha.
29
     ■ getProjectedImageWidth(): Returns the projected image width.
30
     ■ getTransparencyFactor(): Returns the transparency factor as a float.
31
     ■ saveConfig(path): Saves the configuration to the specified path.
32
     ■ getImageSide(): Gets the side of the image.
33
     ■ setParameters(parameters): Sets parameters for the configuration.
34
     ■ getGamma(): Returns the gamma value.
35
36
2. ProcessImage
37
   ○ Methods:
38
     ■ processImage(image_path, params, main_display): Processes the image located at image_path with specified params, using MainDisplay instance for display 
39
       purposes.
40
41
3. MainDisplay
42
   ○ Methods:
43
     ■ readImage(image_path): Reads an image from the specified path and returns it as an ndarray.
44
     ■ setImage(image): Sets the image to display as an ndarray.
45
46
4. MaskCreator
47
   ○ Attributes:
48
     ■ _image (ndarray): Stores the original image.
49
     ■ _alpha_gradient (ndarray): Stores the alpha gradient.
50
     ■ _gamma_corrected (ndarray): Holds the gamma-corrected version of the image.
51
     ■ _mask (int): Represents the mask value.
52
     ■ transparency_factor (float): Factor controlling the transparency.
53
     ■ result_image (ndarray): Holds the result after processing.
54
   ○ Methods:
55
     ■ __init__(_image, transparency_factor): Initializes with an image and transparency factor.
56
     ■ createMask(image_side, mask_width, image_width): Creates a mask for the specified image side and dimensions.
57
     ■ smoothStep(edge0, edge1, x): Returns a smooth transition between two edges.
58
     ■ gammaCorrection(gamma): Applies gamma correction.
59
     ■ alphaBlending(image_side): Performs alpha blending for the specified side.
60
61
5. ImageProcessingApp
62
   ○ Attributes:
63
     ■ left_image_path and right_image_path (str): Paths to the left and right images.
64
     ■ left_params and right_params (dict): Parameters for left and right images.
65
     ■ processed_images (dict): Dictionary to store processed images.
66
     ■ notebook (Notebook), tab_left, tab_right, tab_settings, tab_preview (Frame): UI components.
67
     ■ process_button (Button), progress_bar (Progressbar): UI elements for processing and progress indication.
68
     ■ left_image_label, right_image_label, original_image_label, processed_image_label (Label): Labels for displaying images.
69
   ○ Methods:
70
     ■ __init__(root): Constructor to initialize the application with a root UI element.
71
     ■ setupLeftTab(), setupRightTab(), setupSettingsTab(), setupPreviewTab(): Methods for setting up respective tabs in the UI.
72
     ■ selectLeftImage(): Allows selection of the left image.
73
     ■ saveConfiguration(), loadConfiguration(): Methods to save and load configuration.
74
     ■ processAndSave(): Processes and saves the image.
75
     ■ displayPreview(): Displays a preview of the processed images.
76
     ■ displayImage(processedImages): Displays an image from processed images.
77
78 14 Joseph Eugene PELC
*Relationships*
79 8 Joseph Eugene PELC
   ● ImageProcessingApp is the main application class and interacts with ConfigReader, ProcessImage, and MainDisplay classes.
80
   ● ConfigReader provides configuration details to ImageProcessingApp.
81
   ● ProcessImage uses MainDisplay to load and display images, possibly utilizing MaskCreator for mask and blending operations.
82
   ● MaskCreator handles the creation of masks and alpha blending, which may be used by ProcessImage to prepare images for display in MainDisplay.