test if imagePlus oject is open

Posted by Nicola B. on
URL: http://imagej.273.s1.nabble.com/test-if-imagePlus-oject-is-open-tp3698300.html

Hi all,
does anybody tell me how can I test if an ImagePlus object is actualy
open and display on screen?
this seems not work:
code:
-----------------------------------------------------------
ImagePlus imp;
...
// imp does not necessary initialized (only if needed)
if ( imp!=null && imp.getWindow().isVisible() )
    System.out.println("image Plus object is visible")
-----------------------------------------------------------
I only need a test to control is imagePlus is visible...

Regards,
     -nicola