@@ -490,11 +509,11 @@ class ParticleDetectionView(QtWidgets.QWidget):
arr1=self.dataset.seedpoints
# what seeds are actually in image view?
forpointinarr1:#Josef says: I replaced the commented logic with the one right here below, as the old one somehow did not work.... The for-loop might become slow at some point??
forpointinarr2:#Josef says: I replaced the commented logic with the one right here below, as the old one somehow did not work.... The for-loop might become slow at some point??
@@ -524,8 +543,15 @@ class ParticleDetectionView(QtWidgets.QWidget):
ifself.drag:
self.lastcenter=self.lastmove
self.drag=False
self.detectShow(None)
self.autoUpdateIfDesired()
defautoUpdateIfDesired(self):
try:
ifself.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...
#ich habe jetzt nur noch den Skimage Watershed integriert. Oben auskommentiert der opencv watershed, falls wir ihn doch nochmal für irgendwas brauchen...
markers=ndi.label(sure_fg)[0]
markers=watershed(-dist_transform,markers,mask=sure_bg,compactness=self.compactness,watershed_line=True)#labels = 0 for background, 1... for particles
# modify sure_fg and sure_bg with seedpoints and deletepoints