Commit d9b6effc authored by JosefBrandt's avatar JosefBrandt

Segmentation now running on sub-components, FuzzyClustering added

The segmentation now takes considerably less memory and can run on larger images.

(Optional) fuzzy clustering of seedpoints per component reduces over-segmentation.
parent dd71babf
......@@ -312,6 +312,7 @@ class ParticleDetectionView(QtWidgets.QWidget):
self.showseedpoints.stateChanged.connect(self.imglabel.changeSeedDisplay)
self.showseedpoints.setChecked(True)
self.setImageCenter()
group = QtWidgets.QGroupBox("Detection settings", self)
grid = QtWidgets.QGridLayout()
self.parameters = []
......@@ -327,6 +328,7 @@ class ParticleDetectionView(QtWidgets.QWidget):
colstretch = 2
if p.dtype == np.bool:
paramui = QtWidgets.QCheckBox(p.helptext, self)
paramui.stateChanged.connect(self.autoUpdateIfDesired)
paramui.setChecked(p.value)
valuefunc = makeValueLambda(paramui.isChecked)
colstretch = 2
......@@ -346,6 +348,7 @@ class ParticleDetectionView(QtWidgets.QWidget):
paramui.setSingleStep(p.stepsize)
paramui.setValue(p.value)
paramui.setMinimumWidth(70)
paramui.valueChanged.connect(self.autoUpdateIfDesired)
valuefunc = makeValueLambda(paramui.value)
elif p.dtype is None:
label = QtWidgets.QLabel(p.helptext, self)
......@@ -538,8 +541,14 @@ class ParticleDetectionView(QtWidgets.QWidget):
if self.drag:
self.lastcenter = self.lastmove
self.drag = False
self.autoUpdateIfDesired()
def autoUpdateIfDesired(self):
try:
if self.autoUpdateCheckBox.isChecked():
self.detectShow(None)
except: #the method is already called when automatically setting default parameters, which causes various errors because initialization is not yet finished...
pass
def setDataSet(self, ds):
self.dataset = ds
......
This diff is collapsed.
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