title: imagej get current image from imagestack
body: <p>i need to get the current image opened after importing an image sequence to ImageJ.
  As i need to save the overlay information to a text file bearing the name of the image</p>
  
  <pre><code>int number = imp.getImageStackSize();
  if(number &gt; 1)
  {
    ImagePlus check = imp.duplicate();
    gd.removeAll();
    gd.addMessage(check.getTitle());
    gd.showDialog();          
  }
  </code></pre>
  
  <p><code>imp.gettitle</code> returns the folder name the images were loaded from.</p>
  
  <p>couldn't find any solution so far :(</p>
  
  <p>Any way to find the text in the status bar would be appreciated..</p>