Login  Register

Re: Setting results table column headings - repost

Posted by Gabriel Landini on Jan 24, 2009; 9:18am
URL: http://imagej.273.s1.nabble.com/setting-results-table-column-headings-tp3693953p3693957.html

On Friday 23 January 2009, Tony Collins wrote:

> Hi Justin,
>
> That's what I figured but:
> Analyzer.getResultsTable().getColumnHeadings());
>
> returns the correct heading string if I've used the menu 'measure' command,
> e.g. " Area Mean StdDev"
>
> But returns a blank string if I've set the headings in the results window
> using my plugin with: IJ.setColumnHeadings(headerString);
>
> ...even though the results window is open and has column headers set
> correctly.
>
> Is this the wrong code to get the column headers of the results window?

Tony, why don't you just use:

rt.setValue(ColumnName, row, value);

If the column does not exist, it will be created.
This way you are guaranteed that the headers are created correctly.
I hope it helps.

G.