Changeset 2276


Ignore:
Timestamp:
02/15/07 13:42:24 (13 years ago)
Author:
melissa
Message:

Instantiate OMEReader directly if we are downloading from OME (since OMEReader
was removed from readers.txt).

Location:
trunk/loci/plugins
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/plugins/Importer.java

    r2252 r2276  
    4141import javax.swing.*; 
    4242import loci.formats.*; 
     43import loci.formats.in.OMEReader; 
    4344import loci.plugins.browser.LociDataBrowser; 
    4445 
     
    185186 
    186187    // determine whether we can handle this file 
    187     ImageReader reader = new ImageReader(); 
    188188    IFormatReader r = null; 
    189     try { r = reader.getReader(id); } 
    190     catch (Exception exc) { 
    191       exc.printStackTrace(); 
    192       IJ.showStatus(""); 
    193       if (!quiet) { 
    194         String msg = exc.getMessage(); 
    195         IJ.error("LOCI Bio-Formats", "Sorry, there was a problem " + 
    196           "reading the file" + (msg == null ? "." : (":\n" + msg))); 
    197       } 
    198       return; 
    199     } 
     189    if (!LOCATION_OME.equals(location)) { 
     190      ImageReader reader = new ImageReader();  
     191      try { r = reader.getReader(id); } 
     192      catch (Exception exc) { 
     193        exc.printStackTrace(); 
     194        IJ.showStatus(""); 
     195        if (!quiet) { 
     196          String msg = exc.getMessage(); 
     197          IJ.error("LOCI Bio-Formats", "Sorry, there was a problem " + 
     198            "reading the file" + (msg == null ? "." : (":\n" + msg))); 
     199        } 
     200        return; 
     201      } 
     202    } 
     203    else r = new OMEReader(); 
    200204 
    201205    // -- Step 3: get parameter values -- 
  • trunk/loci/plugins/OMEPlugin.java

    r2251 r2276  
    3030import java.awt.TextField; 
    3131import java.util.*; 
    32 import loci.formats.*; 
    3332import loci.ome.util.OMEUtils; 
    3433import loci.plugins.Util; 
     
    337336          IJ.showMessage("OME Download", 
    338337            "No images matched the specified criteria."); 
     338          return; 
    339339        } 
    340340        else { 
     
    352352      //download into ImageJ 
    353353      for (int i=0; i<images.length; i++) { 
    354         ImageReader reader = new ImageReader(); 
    355354        String file = server + "?user=" + username + "&password=" + password + 
    356355          "&id=" + images[i].getID(); 
Note: See TracChangeset for help on using the changeset viewer.