pyclickimage 2.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,31 @@
1
+ """
2
+ pyclickimage - Python library to select points on a image [pyqt5 GUI]
3
+ Copyright (C) 2025-2026 Artezaru, artezaru.github@proton.me
4
+
5
+ This program is free software: you can redistribute it and/or modify
6
+ it under the terms of the GNU General Public License as published by
7
+ the Free Software Foundation, either version 3 of the License, or
8
+ (at your option) any later version.
9
+
10
+ This program is distributed in the hope that it will be useful,
11
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ GNU General Public License for more details.
14
+
15
+ You should have received a copy of the GNU General Public License
16
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
17
+ """
18
+
19
+ from .__version__ import __version__
20
+ from .click_manager import ClickManager
21
+ from .image_viewer import ImageViewer
22
+ from .click_image_app import ClickImageApp
23
+ from .run import run
24
+
25
+ __all__ = [
26
+ "__version__",
27
+ "ClickManager",
28
+ "ImageViewer",
29
+ "ClickImageApp",
30
+ "run",
31
+ ]
@@ -0,0 +1,72 @@
1
+ """
2
+ pyclickimage - Python library to select points on a image [pyqt5 GUI]
3
+ Copyright (C) 2025-2026 Artezaru, artezaru.github@proton.me
4
+
5
+ This program is free software: you can redistribute it and/or modify
6
+ it under the terms of the GNU General Public License as published by
7
+ the Free Software Foundation, either version 3 of the License, or
8
+ (at your option) any later version.
9
+
10
+ This program is distributed in the hope that it will be useful,
11
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ GNU General Public License for more details.
14
+
15
+ You should have received a copy of the GNU General Public License
16
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
17
+ """
18
+
19
+ import argparse
20
+ import cv2
21
+ from .run import run
22
+
23
+
24
+ def __main__() -> None:
25
+ r"""
26
+ Main entry point of the package.
27
+
28
+ This method contains the script to run if the user enter the name of the package on the command line.
29
+
30
+ .. code-block:: console
31
+ pyclickimage
32
+
33
+ """
34
+ raise NotImplementedError(
35
+ "This is a placeholder for the main entry point of the package. Use 'pyclickimage-gui' to run the GUI application."
36
+ )
37
+
38
+
39
+ def __main_gui__() -> None:
40
+ r"""
41
+ Graphical user interface entry point of the package.
42
+
43
+ This method contains the script to run if the user enter the name of the package on the command line with the ``gui`` extension.
44
+
45
+ .. code-block:: console
46
+ pyclickimage-gui
47
+
48
+ This will launch the GUI application for image clicking and saving coordinates.
49
+
50
+ You can also specify an image file to be displayed ``--image`` or ``-i`` and a CSV file path to save the click coordinates ``--output`` or ``-o``.
51
+
52
+ """
53
+ # Parser for command line arguments
54
+ parser = argparse.ArgumentParser(description="PyClickImage GUI application.")
55
+ parser.add_argument(
56
+ "-i", "--image", type=str, help="Path to the image file to be displayed."
57
+ )
58
+ parser.add_argument(
59
+ "-o",
60
+ "--output",
61
+ type=str,
62
+ help="Path to save the CSV file with click coordinates.",
63
+ )
64
+ args = parser.parse_args()
65
+
66
+ if args.image is not None:
67
+ image = cv2.imread(args.image)
68
+ else:
69
+ image = None
70
+
71
+ # Launch the GUI application
72
+ run(image=image, output=args.output)
@@ -0,0 +1,19 @@
1
+ """
2
+ pyclickimage - Python library to select points on a image [pyqt5 GUI]
3
+ Copyright (C) 2025-2026 Artezaru, artezaru.github@proton.me
4
+
5
+ This program is free software: you can redistribute it and/or modify
6
+ it under the terms of the GNU General Public License as published by
7
+ the Free Software Foundation, either version 3 of the License, or
8
+ (at your option) any later version.
9
+
10
+ This program is distributed in the hope that it will be useful,
11
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ GNU General Public License for more details.
14
+
15
+ You should have received a copy of the GNU General Public License
16
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
17
+ """
18
+
19
+ __version__ = "2.0.0"