Describe the bug
Analysis>Measure objects is one of the first things you see when you open the analysis menu, and one of the most likely things you'd want to use. The same tool(s) in ImageJ (Analyze>Measure or Analyze>Analyze Particles) measure area/perimeter of binary clusters. Presumably our Measure objects should also work on clusters. However, after clustering, this is the traceback
Error whilst running Analysis>Measure objects
==============================================
python-microscopy=20.11.07
python=3.6.10, platform=darwin
numpy=1.16.6, wx=4.0.4 osx-cocoa (phoenix) wxWidgets 3.0.5
Traceback
=========
Traceback (most recent call last):
File "/Users/zachcm/Code/python-microscopy/PYME/ui/progress.py", line 107, in func
return fcn(*args, **kwargs)
File "/Users/zachcm/Code/python-microscopy/PYME/LMVis/Extras/objectMeasurements.py", line 88, in OnMeasure
ids = set(pipeline.mapping['objectID'].astype('i'))
File "/Users/zachcm/Code/python-microscopy/PYME/IO/tabular.py", line 923, in __getitem__
return self.resultsSource[keys]
File "/Users/zachcm/Code/python-microscopy/PYME/IO/tabular.py", line 923, in __getitem__
return self.resultsSource[keys]
File "/Users/zachcm/Code/python-microscopy/PYME/IO/tabular.py", line 723, in __getitem__
return self.resultsSource[key][self.Index][sl]
File "/Users/zachcm/Code/python-microscopy/PYME/IO/tabular.py", line 879, in __getitem__
res = np.array(self.resultsSource[key])[self.Index]
File "/Users/zachcm/Code/python-microscopy/PYME/IO/tabular.py", line 923, in __getitem__
return self.resultsSource[keys]
File "/Users/zachcm/Code/python-microscopy/PYME/IO/tabular.py", line 923, in __getitem__
return self.resultsSource[keys]
File "/Users/zachcm/Code/python-microscopy/PYME/IO/tabular.py", line 468, in __getitem__
raise KeyError('Key (%s) not found' % key)
KeyError: 'Key (objectID) not found'
It looks this means we need to create an image and then get segmented IDs from the image and use these as the clusters. We have no posted documentation on how to do this. If you just run Analysis>Get segmented IDs from image, you get the traceback
Error whilst running Analysis>Get segmented IDs from image
==============================================
python-microscopy=20.11.07
python=3.6.10, platform=darwin
numpy=1.16.6, wx=4.0.4 osx-cocoa (phoenix) wxWidgets 3.0.5
Traceback
=========
Traceback (most recent call last):
File "/Users/zachcm/Code/python-microscopy/PYME/ui/progress.py", line 107, in func
return fcn(*args, **kwargs)
File "/Users/zachcm/Code/python-microscopy/PYME/LMVis/Extras/objectMeasurements.py", line 64, in OnGetIDs
wx.CHOICEDLG_STYLE
TypeError: SingleChoiceDialog(): argument 4 has unexpected type 'generator'
We should fix and document (I think this has been done, even though it is not online) this pipeline. Is it possible to generalize this and make Measure objects work on all types of clusters (generated from DBSCAN or Corrections>Chaining)?
Describe the bug
Analysis>Measure objectsis one of the first things you see when you open the analysis menu, and one of the most likely things you'd want to use. The same tool(s) in ImageJ (Analyze>MeasureorAnalyze>Analyze Particles) measure area/perimeter of binary clusters. Presumably our Measure objects should also work on clusters. However, after clustering, this is the tracebackIt looks this means we need to create an image and then get segmented IDs from the image and use these as the clusters. We have no posted documentation on how to do this. If you just run
Analysis>Get segmented IDs from image, you get the tracebackWe should fix and document (I think this has been done, even though it is not online) this pipeline. Is it possible to generalize this and make Measure objects work on all types of clusters (generated from DBSCAN or Corrections>Chaining)?