pyclickimage 3.2.0__tar.gz → 3.2.1__tar.gz
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.
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/.bumpver.toml +1 -1
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/PKG-INFO +1 -1
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/pyclickimage/__version__.py +1 -1
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/pyclickimage/app.py +21 -16
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/pyclickimage.egg-info/PKG-INFO +1 -1
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/.github/workflows/publish.yml +0 -0
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/.github/workflows/sphinx.yml +0 -0
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/.gitignore +0 -0
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/.gitlab-ci.yml +0 -0
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/COPYING +0 -0
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/LICENSE +0 -0
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/Makefile +0 -0
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/README.md +0 -0
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/docs/source/api.rst +0 -0
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/docs/source/api_doc/annotation_session.rst +0 -0
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/docs/source/api_doc/click_image_app.rst +0 -0
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/docs/source/api_doc/click_manager.rst +0 -0
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/docs/source/api_doc/image_viewer.rst +0 -0
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/docs/source/api_doc/reading_session.rst +0 -0
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/docs/source/api_doc/run.rst +0 -0
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/docs/source/conf.py +0 -0
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/docs/source/index.rst +0 -0
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/docs/source/installation.rst +0 -0
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/docs/source/usage.rst +0 -0
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/docs/source/usage_doc/extracting_the_clicks.rst +0 -0
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/docs/source/usage_doc/running_the_GUI.rst +0 -0
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/docs/source/usage_doc/using_the_GUI.rst +0 -0
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/examples/example.csv +0 -0
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/examples/example.png +0 -0
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/examples/example.py +0 -0
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/pyclickimage/__init__.py +0 -0
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/pyclickimage/__main__.py +0 -0
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/pyclickimage/annotation_session.py +0 -0
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/pyclickimage/click_manager.py +0 -0
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/pyclickimage/common.py +0 -0
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/pyclickimage/image_viewer.py +0 -0
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/pyclickimage/resources/__init__.py +0 -0
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/pyclickimage/resources/app.png +0 -0
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/pyclickimage/tools.py +0 -0
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/pyclickimage.egg-info/SOURCES.txt +0 -0
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/pyclickimage.egg-info/dependency_links.txt +0 -0
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/pyclickimage.egg-info/entry_points.txt +0 -0
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/pyclickimage.egg-info/requires.txt +0 -0
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/pyclickimage.egg-info/top_level.txt +0 -0
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/pyproject.toml +0 -0
- {pyclickimage-3.2.0 → pyclickimage-3.2.1}/setup.cfg +0 -0
|
@@ -223,7 +223,7 @@ class ClickImageApp(QtWidgets.QMainWindow):
|
|
|
223
223
|
|
|
224
224
|
self.session.add_image(image)
|
|
225
225
|
|
|
226
|
-
img = cv2.imread(str(image))
|
|
226
|
+
img = cv2.imread(str(image), cv2.IMREAD_UNCHANGED)
|
|
227
227
|
|
|
228
228
|
if img is not None:
|
|
229
229
|
self.image_cache[image] = img
|
|
@@ -1138,7 +1138,7 @@ class ClickImageApp(QtWidgets.QMainWindow):
|
|
|
1138
1138
|
continue
|
|
1139
1139
|
|
|
1140
1140
|
# Load image to verify it is valid
|
|
1141
|
-
image = cv2.imread(str(image_path))
|
|
1141
|
+
image = cv2.imread(str(image_path), cv2.IMREAD_UNCHANGED)
|
|
1142
1142
|
|
|
1143
1143
|
if image is None:
|
|
1144
1144
|
QtWidgets.QMessageBox.warning(
|
|
@@ -1199,7 +1199,7 @@ class ClickImageApp(QtWidgets.QMainWindow):
|
|
|
1199
1199
|
if image_path in self.image_cache:
|
|
1200
1200
|
return self.image_cache[image_path]
|
|
1201
1201
|
|
|
1202
|
-
image = cv2.imread(str(image_path))
|
|
1202
|
+
image = cv2.imread(str(image_path), cv2.IMREAD_UNCHANGED)
|
|
1203
1203
|
|
|
1204
1204
|
if image is None:
|
|
1205
1205
|
return None
|
|
@@ -1872,28 +1872,33 @@ class ClickImageApp(QtWidgets.QMainWindow):
|
|
|
1872
1872
|
dtype=np.uint8,
|
|
1873
1873
|
)
|
|
1874
1874
|
|
|
1875
|
-
img = image.astype(np.float32)
|
|
1876
|
-
|
|
1877
1875
|
if np.issubdtype(image.dtype, np.integer):
|
|
1878
1876
|
imax = np.iinfo(image.dtype).max
|
|
1877
|
+
img = image.astype(np.float64) / imax
|
|
1878
|
+
|
|
1879
|
+
elif np.issubdtype(image.dtype, np.floating):
|
|
1880
|
+
img = image.astype(np.float64)
|
|
1881
|
+
img = np.clip(img, 0.0, 1.0)
|
|
1882
|
+
|
|
1879
1883
|
else:
|
|
1880
|
-
|
|
1884
|
+
raise ValueError(f"Unsupported image type: {image.dtype}")
|
|
1881
1885
|
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1886
|
+
# Normalize image [0, 1]
|
|
1887
|
+
dm = self.display_min_pc / 100
|
|
1888
|
+
dM = self.display_max_pc / 100
|
|
1889
|
+
b = self.beta_pc / 100
|
|
1885
1890
|
|
|
1886
|
-
|
|
1891
|
+
if dM <= dm:
|
|
1892
|
+
dM = dm + 1e-6
|
|
1887
1893
|
|
|
1888
|
-
img = (img
|
|
1894
|
+
img = np.clip(img, dm, dM)
|
|
1895
|
+
img = (img - dm) / (dM - dm)
|
|
1889
1896
|
|
|
1890
1897
|
img = img * self.alpha + b
|
|
1898
|
+
img = np.clip(img, 0.0, 1.0)
|
|
1891
1899
|
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
0,
|
|
1895
|
-
imax,
|
|
1896
|
-
).astype(image.dtype)
|
|
1900
|
+
# Convert ro RGB888
|
|
1901
|
+
img = np.round(img * 255.0).astype(np.uint8)
|
|
1897
1902
|
|
|
1898
1903
|
if self._image_has_changed or self._colormap_has_changed:
|
|
1899
1904
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|