Changeset 6238


Ignore:
Timestamp:
05/05/10 16:09:59 (10 years ago)
Author:
curtis
Message:

Add toplevel utility method for obtaining ImagePlus from path string.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/components/loci-plugins/src/loci/plugins/util/BF.java

    r6229 r6238  
    2727 
    2828import ij.IJ; 
     29import ij.ImagePlus; 
     30 
     31import java.io.IOException; 
     32 
     33import loci.formats.FormatException; 
     34import loci.plugins.in.ImagePlusReader; 
     35import loci.plugins.in.ImporterOptions; 
    2936 
    3037/** 
     
    4754  } 
    4855 
     56  public static ImagePlus[] openImagePlus(String path) 
     57    throws FormatException, IOException 
     58  { 
     59    ImporterOptions options = new ImporterOptions(); 
     60    options.setId(path); 
     61    return openImagePlus(options); 
     62  } 
     63 
     64  public static ImagePlus[] openImagePlus(ImporterOptions options) 
     65    throws FormatException, IOException 
     66  { 
     67    options.setQuiet(true); 
     68    options.showDialogs(); 
     69    ImagePlusReader ipr = new ImagePlusReader(options); 
     70    return ipr.openImagePlus(); 
     71  } 
     72 
    4973} 
Note: See TracChangeset for help on using the changeset viewer.