ijpb / MorphoLibJ

Collection of mathematical morphology methods and plugins for ImageJ
http://imagej.net/MorphoLibJ
GNU Lesser General Public License v3.0
101 stars 48 forks source link

add centroid coordinates to measurements #25

Closed tischi closed 5 years ago

tischi commented 6 years ago

Would it be possible to add centroid coordinates to all results tables in "Analyze"?

  1. I think it simply is a cheap and good information to have.
  2. I think it is important, because, in practice, this often is the way of finding a specific object back in an image, given a saved results table.
  3. In particular, having the coordinates, one could add a new plugin "Overlay results", where the user could select one measurement column from a results table and the plugin would show the numbers as overlays at the object centroid coordinates. A functionality that is very(!) good to have! (In CellProfiler, e.g., it is called: DisplayNumbersOnImage).
tischi commented 6 years ago

@iarganda Maybe the Elliposid parameters that are available in "Particle Analysis 3D" could be added to "Region Morphometry"? Like this there would be some particle centre measurements available in 2D as well.

dlegland commented 6 years ago

Hi, I am not sure this is a great idea... Within MorphoLibJ, the identification of regions oftens goes through the label, which is stored within ResultsTable. Also, we tried to keep the table simple, so that it is easy to concatenate only the necesasry information.

Bythe way, the next version of MorphoLibJ is in preparation, with several changes in the "Analyze" menu. In particular, the "Analyze Regions" and "Analyze Regions 3D" (replacement of Particle Analysis 3D) have been largely reworked, and allows easy gathering of descriptive features. Well, I just checked, and the centroid is not included... Maybe because most of the time, ellipse / ellispoid is directly computed. So, I will add 2D/3D centroid computation in Analyse Regions plugins.

I like the idea of you point 3. This should not be too complicated to implement, I can have a look.

tischi commented 6 years ago

Hi, Thanks for looking into it! Here is a macro that does the job for the 3D analysis: https://github.com/tischi/imagej-courses/blob/master/data/results-visualisations/measurements-text-overlay.ijm

tischi commented 6 years ago

...and I agree that adding the centroids to all tables is not very nice. What would be nice though (for users without programming experience) is to have a plugin: Combine results tables by label

dlegland commented 6 years ago

Just committed a version that allows for computing 2D/3D centroids when using "Analyze Regions" or "Analyze Regions 3D". Note that when computing inertia ellipses or inertia ellipsoids, the centers are the same as the centroids.

dlegland commented 6 years ago

Hi, I made a new release that includes centroid measurement (in the "Analyze Region" and "Analyze Regions 3D" plugins).

There is also a version including two plugins in the "Plugins->Table" menu: "Concatenate Tables" and "Overlay Values". I am not sure yet if the best is to include into MorphoLibJ or as a separate plugin (as the usage is very general).

Best, David

tischi commented 6 years ago

Wow! Thanks for implementing! I will use it in my upcoming courses!