Commit fdec6985 authored by Julia Garriga Ferrer's avatar Julia Garriga Ferrer
Browse files

[orangecontrib] background substraction done automatically, hidden compute button

parent 02783720
......@@ -62,6 +62,12 @@ class BackgroundSubstractionWidget(qt.QWidget):
self._computeB.clicked.connect(self.computeBS)
def hideButton(self):
self._computeB.hide()
def showButton(self):
self._computeB.show()
def computeBS(self):
"""
Function that starts starts the thread to compute the background
......
......@@ -21,11 +21,13 @@ class BackgroundSubstractionWidgetOW(OWWidget):
self._widget = BackgroundSubstractionWidget(parent=self)
self._widget.signalComputed.connect(self._sendSignal)
self.controlArea.layout().addWidget(self._widget)
self._widget.hideButton()
@Inputs.dataset
def set_dataset(self, dataset):
assert dataset.dark_frames, "Dark frames must be given in order to compute noise reduction"
self._widget.setDataset(dataset=dataset)
self._widget.computeBS()
def _sendSignal(self):
self.Outputs.dataset.send(self._widget.dataset)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment