Login  Register

Re: ResultsTable questions

Posted by Michael Schmid on Jun 03, 2009; 9:13pm
URL: http://imagej.273.s1.nabble.com/ResultsTable-questions-tp3692278p3692284.html

Hi Mike,

(1) you can't set the value of a cell to null, but you can set it to  
Double.NaN (not a number) to signify an empty cell. Use Double.isNaN
(x) to test for it.

(2) did you try WindowManager.getFrame("Measurements")? It should  
tell you whether a non-image frame with this title has been added to  
the list of windows.

Michael
________________________________________________________________

On 3 Jun 2009, at 19:52, Michael Doube wrote:

> Hi all
>
> I am writing a method that will collate results into the same row  
> of a result table when running different plugins on the same image,  
> so each image will get 1 row with results from different plugins in  
> the cells.
>
> 1. Is there a value other than 0 that represents an empty cell? At  
> the moment, if no value is entered for a cell when another cell in  
> the same row is updated, 0 is shown in the table.  This is not the  
> same as 'no data' - null seems more appropriate.
>
> 2. I can create a new results table and call it "Measurements" like  
> this:
> ResultsTable rt = new ResultsTable();
> rt.show("Measurements");
> But how do I check whether the "Measurements" table already exists,  
> and write to it instead of overwriting it with a new instance each  
> time? This is trivial if I use the system Results table,
> ResultsTable rt = ResultsTable.getResultsTable();
> but I want to leave the "Results" table free for other stuff and  
> have a dedicated table for my plugins' results.
>
> Cheers
>
> Mike