Macros: add a function to attach results to image
Macros: add a function to attach results to image

Another use case for ImageJ-OMERO: ImageJ 1.x does not have a built-in
way to associate a table with a particular image. To work around this,
ImageJ-OMERO uses the "tables" property of the ImagePlus (accessible via
ImagePlus.getProperty("tables")); if there is a Collection<ResultsTable>
in there, the elements are treated as tables attached to that image,
intended for upload to the OMERO database.

This method lets you attach the singleton ResultsTable to the active
ImagePlus from a macro by writing:

    call("net.imagej.legacy.Macros.attachResultsTable")

So now it possible to populate the ResultsTable from a headless macro,
and then attach it to an image output. For example:

    getStatistics(area, mean, min, max, std, histogram)
    setResult("Area", 0, area)
    setResult("Mean", 0, mean)
    setResult("Min", 0, min)
    setResult("Max", 0, max)
    setResult("Standard Deviation", 0, std)
    call("net.imagej.legacy.Macros.attachResultsTable")

imagej/imagej-legacy,imagej/imagej-legacy,imagej/imagej-legacy,imagej/imagej-legacy