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

[gui][grainplot] Add label to plots and start with COM

parent 4cd01777
......@@ -130,7 +130,6 @@ class GrainPlotWidget(qt.QMainWindow):
self._computeContoursB.clicked.connect(self._computeContours)
self._methodCB.model().item(4).setEnabled(True)
self._methodCB.setCurrentIndex(4)
self._updatePlot(self._methodCB.currentText())
self._thread = OperationThread(self, self.dataset.apply_moments)
self._thread.setArgs(self.indices)
self._thread.finished.connect(self._updateData)
......@@ -156,6 +155,7 @@ class GrainPlotWidget(qt.QMainWindow):
rg = len(Method) if self.dataset.dims.ndim > 1 else 4
for i in range(rg):
self._methodCB.model().item(i).setEnabled(True)
self._methodCB.setCurrentIndex(0)
else:
print("\nComputation aborted")
......@@ -237,10 +237,10 @@ class GrainPlotWidget(qt.QMainWindow):
xscale = (self.dataset.transformation[0][-1][-1] - px) / len(self.dataset.transformation[0][0])
yscale = (self.dataset.transformation[1][-1][-1] - py) / len(self.dataset.transformation[1][0])
for i, plot in enumerate(self._plots):
plot.addImage(self._moments[i][0], origin=(px, py), scale=(xscale, yscale))
plot.addImage(self._moments[i][0], origin=(px, py), scale=(xscale, yscale), xlabel='µm', ylabel='µm')
else:
for i, plot in enumerate(self._plots):
plot.addImage(self._moments[i][0])
plot.addImage(self._moments[i][0], xlabel='pixels', ylabel='pixels')
elif method == Method.SKEWNESS:
self._plotWidget.show()
for i, plot in enumerate(self._plots):
......
Markdown is supported
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