Changeset 2301


Ignore:
Timestamp:
02/20/07 12:47:49 (13 years ago)
Author:
melissa
Message:

Fixed issues with downloading from OME.

Location:
trunk/loci/plugins
Files:
2 edited

Legend:

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

    r2296 r2301  
    9696      // parse location from argument 
    9797      location = Macro.getValue(arg, "location", null); 
    98       arg = null; 
    99     } 
    100  
    101     boolean quiet = arg != null && !arg.equals(""); 
     98      if (arg.indexOf("open") == -1) arg = null; 
     99    } 
     100 
     101    boolean quiet = arg != null && !arg.equals("") && arg.indexOf("open=") == -1; 
    102102 
    103103    // -- Step 1: get filename to open -- 
     
    114114        String open = Macro.getValue(options, "open", null); 
    115115        if (open != null) id = open; 
     116      } 
     117      if (arg != null) { 
     118        id = Macro.getValue(arg, "open", null); 
     119        arg = null; 
    116120      } 
    117121    } 
     
    155159        } 
    156160      } 
    157       else if (LOCATION_OME.equals(location)) { 
     161      else if (LOCATION_OME.equals(location) && id == null) { 
    158162        IJ.runPlugIn("loci.plugins.OMEPlugin", ""); 
    159163        return; 
     
    181185    // -- Step 2: identify file -- 
    182186 
    183     if (!LOCATION_OME.equals(location)) { 
    184       IJ.showStatus("Identifying " + fileName); 
    185     } 
    186  
    187187    // determine whether we can handle this file 
    188188    IFormatReader r = null; 
    189189    if (!LOCATION_OME.equals(location)) { 
     190      IJ.showStatus("Identifying " + fileName); 
    190191      ImageReader reader = new ImageReader();  
    191192      try { r = reader.getReader(id); } 
     
    291292    // -- Step 4: open file -- 
    292293 
    293     IJ.showStatus("Analyzing " + fileName); 
     294    IJ.showStatus("Analyzing " + r.getCurrentFile()); 
    294295 
    295296    try { 
  • trunk/loci/plugins/OMEPlugin.java

    r2276 r2301  
    352352      //download into ImageJ 
    353353      for (int i=0; i<images.length; i++) { 
    354         String file = server + "?user=" + username + "&password=" + password + 
    355           "&id=" + images[i].getID(); 
     354        String file = "location=[OME server] open=[" + server + "?user=" +  
     355          username + "&password=" + password + "&id=" + images[i].getID() + "]"; 
    356356        IJ.runPlugIn("loci.plugins.LociImporter", file); 
    357357 
Note: See TracChangeset for help on using the changeset viewer.