tables and results table

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

tables and results table

fabrice senger-2
Hi there,

this is more general and related to table manipulation.
As I understood, the Results Table is the "object" wich might be manipulated
by macro commands...in a recent mail I found the info that you can rename
any table to Results...that way it should be possible to manipulate data in
whatever table, one just has to switch between names...unfortunatly the
command IJ.renameResults("Results") doesn't work for me, when I test the
command in a little piece of macro I get an error message with function
unknown...

Hum, seems I have lots of questions thos days, thank you for your patience,

Fabrice.
Reply | Threaded
Open this post in threaded view
|

Re: tables and results table

Gabriel Landini
On Monday 30 August 2010, you wrote:
> As I understood, the Results Table is the "object" wich might be
> manipulated by macro commands...in a recent mail I found the info that you
> can rename any table to Results...that way it should be possible to
> manipulate data in whatever table, one just has to switch between
> names...unfortunatly the command IJ.renameResults("Results") doesn't work
> for me, when I test the command in a little piece of macro I get an error
> message with function unknown...

I have been assuming (but I might be out of date on this) that there is only
one Results table (that is a number of data arrays) where one can use the
macros commands:
getResultLabel(row)
getResult("Column", row)
nResults
setResult("Column", row, value)
setResult("Label", row, value)

One can of course have more than one text window "tables" formatted with
columns generated with IJ.log() or IJ.write from a plugin, but I believed that
from these seemingly-but-not-quite-result tables, one cannot retrieve the
values using the macro get* commands above as they are not "in" the Results
table arrays despite what one sees on screen.

To put those values in the Results table and be able to retrieve them back one
needs to  use the methods listed in:
http://rsb.info.nih.gov/ij/developer/api/ij/measure/ResultsTable.html

However seeing some recent comments about more than one results table, I
wonder if this might have changed.
It would be very useful to have this clarified.

Regards

Gabriel
Reply | Threaded
Open this post in threaded view
|

Re: tables and results table

David Webster
All,

The macros probably only work on the "System Results Table" whereas a plugin
can generate non-system tables. Just changing a non-system tabels title to
Results probably isn't enough. Maybe can
Analyzer.*setResultsTable*<http://rsb.info.nih.gov/ij/developer/api/ij/plugin/filter/Analyzer.html#setResultsTable(ij.measure.ResultsTable)>
(ResultsTable<http://rsb.info.nih.gov/ij/developer/api/ij/measure/ResultsTable.html>
 rt)be called from a macro?

As an aside, I tthink it would be nice if multiple results tables could held
"internally" to imageJ and passed to different plugins like images, but
right now you have to do this vai Results tabel file I/O.

David Webster

On Mon, Aug 30, 2010 at 2:51 AM, Gabriel Landini <[hidden email]>wrote:

> On Monday 30 August 2010, you wrote:
> > As I understood, the Results Table is the "object" wich might be
> > manipulated by macro commands...in a recent mail I found the info that
> you
> > can rename any table to Results...that way it should be possible to
> > manipulate data in whatever table, one just has to switch between
> > names...unfortunatly the command IJ.renameResults("Results") doesn't work
> > for me, when I test the command in a little piece of macro I get an error
> > message with function unknown...
>
> I have been assuming (but I might be out of date on this) that there is
> only
> one Results table (that is a number of data arrays) where one can use the
> macros commands:
> getResultLabel(row)
> getResult("Column", row)
> nResults
> setResult("Column", row, value)
> setResult("Label", row, value)
>
> One can of course have more than one text window "tables" formatted with
> columns generated with IJ.log() or IJ.write from a plugin, but I believed
> that
> from these seemingly-but-not-quite-result tables, one cannot retrieve the
> values using the macro get* commands above as they are not "in" the Results
> table arrays despite what one sees on screen.
>
> To put those values in the Results table and be able to retrieve them back
> one
> needs to  use the methods listed in:
> http://rsb.info.nih.gov/ij/developer/api/ij/measure/ResultsTable.html
>
> However seeing some recent comments about more than one results table, I
> wonder if this might have changed.
> It would be very useful to have this clarified.
>
> Regards
>
> Gabriel
>