Login  Register

Re: Need to close the result table from my java application

Posted by David Webster on Mar 18, 2010; 1:16am
URL: http://imagej.273.s1.nabble.com/Need-to-close-the-result-table-from-my-java-application-tp3687988p3688005.html

All,

I am/have been using ResultsTables to pass general, array strructurable data
form one plugin to the next. For example, one plugin  might detect objects,
the next extract object features, and a third run a pattern classifier on
those feaures. Right now, the only way to do this is to write the
ResultsTables  to a text file using a ResultsTable.save(..) and then reading
them back in using ResultsTable.open(..) . This works, but having multiple
open the results table objects would really be nice.

David Webster

On Wed, Mar 17, 2010 at 12:29 PM, Bob Loushin <[hidden email]> wrote:

> Thanks, BW, for pointing this out.
>
> Like the solution that I found myself (and which I felt was
> unsatisfactory), this one has the problem that the Results table does not
> come back the next time an IJ.write() is done. Obviously, this one is better
> than my method, because it points the way to getting it back: do a
> setVisible(true) when writing to the table. I can do that in my own plugins,
> but if I use this in my plugins, they will cause problems when mixed with
> plugins that are outside my control but also use the Results table for
> output. Is there a still better solution, or is this a problem inherent in
> the Results table system itself?
>
> Perhaps using the Results table for general output isn't a good idea. It
> doesn't appear that it was originally designed for that task, but I (and
> apparently others) have adopted it for that task because there doesn't
> appear to be a better solution within ImageJ. I'm still new to ImageJ. Is
> this the correct forum to make feature requests? If I decide to invest time
> in building a more complete version of this, is there a way to submit it to
> get it into the official build?
>
> Bob
>
>
> ----- Original Message -----
> From: "Tamjid" <[hidden email]>
> To: [hidden email]
> Sent: Wednesday, March 17, 2010 4:24:16 AM GMT -06:00 US/Canada Central
> Subject: Re: Need to close the result table from my java application
>
> Many thanks.
>
> - Tamjid
>
> On Wed, Mar 17, 2010 at 4:43 AM, EHB2010 <[hidden email]>
> wrote:
>
> > I'm sorry that was bad advice. I've just had a quick look at the source
> > code
> > for results tables. It's actually very simple- this plugin makes
> invisible
> > the results window on my system:
> >
> > import ij.WindowManager;
> > import ij.plugin.PlugIn;
> > import java.awt.*;
> >
> > public class TestPlugin_ implements PlugIn {
> >
> > public void run(String arg) {
> >
> > Frame[] arrayOfFrames = WindowManager.getNonImageWindows();
> > for (int i = 0 ; i < arrayOfFrames.length ; ++i) {
> > String localName = arrayOfFrames[i].getTitle();
> > if ( localName.equalsIgnoreCase("Results")){
> > arrayOfFrames[i].setVisible(false);
> > }
> > }
> > }
> > }
> >
> > BW
> > --
> > View this message in context:
> >
> http://n2.nabble.com/Need-to-close-the-result-table-from-my-java-application-tp4713378p4745635.html
> > Sent from the ImageJ mailing list archive at Nabble.com.
> >
>