From 1e84f97c2d304bb3ee9251be9f48c9072d48d9d0 Mon Sep 17 00:00:00 2001 From: "Houman.M_Dastjerdi" Date: Fri, 29 Sep 2023 16:14:54 +0200 Subject: [PATCH] Fixed bugs in GUI and fixed Numpy versions --- piscat/GUI/Visualization/image_viewer.py | 4 ++-- piscat/GUI/Visualization/slice_view.py | 2 +- requirements.txt | 2 +- setup.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/piscat/GUI/Visualization/image_viewer.py b/piscat/GUI/Visualization/image_viewer.py index 54ea595..dd6705e 100644 --- a/piscat/GUI/Visualization/image_viewer.py +++ b/piscat/GUI/Visualization/image_viewer.py @@ -72,7 +72,7 @@ def __del__(self): print("Destructor called, Employee deleted.") def starter(self): - self.setWindowIcon(QtWidgets.QIcon(QtCore.QDir.currentPath() + "/icons/mpl.png")) + self.setWindowIcon(QtGui.QIcon(QtCore.QDir.currentPath() + "/icons/mpl.png")) self.setWindowTitle(self.title) self.setGeometry(490, 100, 512 + 124, 512 + 93) self.main_Viewer_frame = QtWidgets.QFrame() @@ -180,7 +180,7 @@ def starter(self): # Create self.connect( - QtWidgets.QShortcut(QtWidgets.QKeySequence(QtCore.Qt.Key_H), self), + QtGui.QShortcut(QtGui.QKeySequence(QtCore.Qt.Key_H), self), QtCore.SIGNAL("activated()"), self.histogram, ) diff --git a/piscat/GUI/Visualization/slice_view.py b/piscat/GUI/Visualization/slice_view.py index 48384b2..febb236 100644 --- a/piscat/GUI/Visualization/slice_view.py +++ b/piscat/GUI/Visualization/slice_view.py @@ -68,7 +68,7 @@ def __init__(self, input_video, video_original, stride=1, mask=False, *args, **k self.annotation_s.connect(self.active_spatial_live_paint) self.annotation_t.connect(self.active_temporal_live_paint) - self.setBackgroundBrush(QtWidgets.QColor(0, 0, 0)) + self.setBackgroundBrush(QtGui.QColor(0, 0, 0)) self.setScene(self.scene) self.setTransformationAnchor(QtWidgets.QGraphicsView.AnchorUnderMouse) diff --git a/requirements.txt b/requirements.txt index 677b978..755a35b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,7 @@ matplotlib networkx notebook numba -numpy +numpy==1.23.5 opencv-python pandas<2.0 psutil diff --git a/setup.py b/setup.py index e67fe3d..4f99710 100644 --- a/setup.py +++ b/setup.py @@ -40,7 +40,7 @@ long_description=open("README.md").read() if exists("README.md") else "", long_description_content_type="text/markdown", install_requires=[ - "numpy>=1.22.0", + "numpy==1.23.5", "scipy>=0.14.0", "matplotlib", "opencv-python",