diff --git a/init/InitButtons.py b/init/InitButtons.py index ee728a17c25ac9a6115a396bbf458792aee52ccc..d98a108559e9f82ffaacd0840327258060984ab6 100644 --- a/init/InitButtons.py +++ b/init/InitButtons.py @@ -211,9 +211,7 @@ def Init(parent): parent.button_extractfluorescence.setStatusTip('Extract the total intensity, area and variance of the cells in the different channels') # SHOW THE VALUES OF THE CELLS - parent.button_showval.stateChanged.connect(parent.m.ShowCellNumbersCurr) - parent.button_showval.stateChanged.connect(parent.m.ShowCellNumbersPrev) - parent.button_showval.stateChanged.connect(parent.m.ShowCellNumbersNext) + parent.button_showval.stateChanged.connect(parent.m.UpdatePlots) parent.button_showval.setShortcut('V') parent.button_showval.setToolTip("Use V Key for shortcut") diff --git a/misc/PlotCanvas.py b/misc/PlotCanvas.py index 447aeb67e00cd014abac1a091b693ec17e315824..0c4b1c6c09fa4248b9c0d372768bec8b238ea105 100644 --- a/misc/PlotCanvas.py +++ b/misc/PlotCanvas.py @@ -324,7 +324,6 @@ class PlotCanvas(FigureCanvas): # Plot cell numbers self.ShowCellNumbers() - self.update() self.flush_events() @@ -379,6 +378,8 @@ class PlotCanvas(FigureCanvas): self.ShowCellNumbersCurr() self.ShowCellNumbersNext() self.ShowCellNumbersPrev() + else: + self.clearAnnLists() def ShowCellNumbersCurr(self): @@ -447,6 +448,18 @@ class PlotCanvas(FigureCanvas): self.draw() + def clearAnnLists(self): + for ann in self.ann_list: + ann.remove() + self.ann_list = [] + for ann in self.ann_list_prev: + ann.remove() + self.ann_list_prev = [] + for ann in self.ann_list_next: + ann.remove() + self.ann_list_next = [] + + def updateplot(self, posx, posy): """ it updates the plot once the user clicks on the plot and draws a 4x4 pixel dot diff --git a/packages.txt b/packages.txt index 9b8d1215f6799150ed0613fe628c434a687e37b9..5aac81fba2f805cdd3c711460fdd822a7a373844 100644 --- a/packages.txt +++ b/packages.txt @@ -1,16 +1,16 @@ -install numpy -install PyQt5 -install matplotlib -install nd2reader==3.2.1 -install h5py -install scikit-image -install openpyxl -install Tensorflow==1.9.0 -install Keras -install opencv-python-headless -install pytiff -install pandas -install munkres -install sklearn -install imageio -install Pillow \ No newline at end of file +numpy +PyQt5 +matplotlib +nd2reader==3.2.1 +h5py +scikit-image +openpyxl +Tensorflow==1.9.0 +Keras +opencv-python-headless +pytiff +pandas +munkres +sklearn +imageio +Pillow \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8be1b7d786b36d2f4d54401168596d619dc04a9c --- /dev/null +++ b/requirements.txt @@ -0,0 +1,16 @@ +numpy==1.17.4 +PyQt5 +matplotlib==3.1.1 +nd2reader==3.2.1 +h5py==2.9.0 +scikit-image==0.15.0 +openpyxl==3.0.1 +Tensorflow==1.9.0 +Keras==2.3.1 +opencv-python-headless==4.2.0.34 +pytiff==0.8.1 +pandas==0.25.3 +munkres==1.1.2 +sklearn==0.0 +imageio==2.6.1 +Pillow==6.2.1