Changeset 6293


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

Remove non-working OMERO importer logic.

Location:
trunk/components/loci-plugins/src/loci/plugins/in
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/components/loci-plugins/src/loci/plugins/in/ImportProcess.java

    r6284 r6293  
    8484  // reader stack, from bottom to top 
    8585  private IFormatReader baseReader; 
     86  private ImageReader imageReader; 
    8687  private FileStitcher fileStitcher; 
    8788  private ChannelSeparator channelSeparator; 
     
    126127    assertStep(ImportStep.READER); 
    127128    return baseReader; 
     129  } 
     130  /** Valid only after {@link ImportStep#READER}. */ 
     131  public IFormatReader getImageReader() { 
     132    assertStep(ImportStep.READER); 
     133    return imageReader; 
    128134  } 
    129135  /** Valid only after {@link ImportStep#READER}. */ 
     
    348354    r.setId(options.getId()); 
    349355 
    350     if (options.isVirtual() || !options.isMergeChannels() || 
    351       FormatTools.getBytesPerPixel(r.getPixelType()) != 1) 
    352     { 
     356    int bpp = FormatTools.getBytesPerPixel(r.getPixelType()); 
     357    if (options.isVirtual() || !options.isMergeChannels() || bpp != 1) { 
    353358      r = channelSeparator = new ChannelSeparator(r); 
    354359    } 
     
    416421      idName = idLoc.getName(); 
    417422    } 
    418 //    else if (options.isOMERO()) { 
    419 //      // NB: strip out username and password when opening from OMERO 
    420 //      StringTokenizer st = new StringTokenizer(id, "?&"); 
    421 //      StringBuffer idBuf = new StringBuffer(); 
    422 //      int tokenCount = 0; 
    423 //      while (st.hasMoreTokens()) { 
    424 //        String token = st.nextToken(); 
    425 //        if (token.startsWith("username=") || token.startsWith("password=")) { 
    426 //          continue; 
    427 //        } 
    428 //        if (tokenCount == 1) idBuf.append("?"); 
    429 //        else if (tokenCount > 1) idBuf.append("&"); 
    430 //        idBuf.append(token); 
    431 //        tokenCount++; 
    432 //      } 
    433 //      idName = idBuf.toString(); 
    434 //    } 
    435423  } 
    436424 
     
    442430    if (options.isLocal() || options.isHTTP()) { 
    443431      BF.status(options.isQuiet(), "Identifying " + idName); 
    444       ImageReader reader = LociPrefs.makeImageReader(); 
    445       try { baseReader = reader.getReader(options.getId()); } 
     432      imageReader = LociPrefs.makeImageReader(); 
     433      try { baseReader = imageReader.getReader(options.getId()); } 
    446434      catch (FormatException exc) { 
    447435        WindowTools.reportException(exc, options.isQuiet(), 
     
    455443      } 
    456444    } 
    457 //    else if (options.isOMERO()) { 
    458 //      // NB: avoid dependencies on optional loci.ome.io package 
    459 //      try { 
    460 //        ServiceFactory factory = new ServiceFactory(); 
    461 //        OMEReaderWriterService service = 
    462 //          factory.getInstance(OMEReaderWriterService.class); 
    463 //        baseReader = service.newOMEROReader(); 
    464 //      } 
    465 //      catch (DependencyException exc) { 
    466 //        WindowTools.reportException(exc, options.isQuiet(), 
    467 //          "Sorry, there was a problem constructing the OMERO I/O engine"); 
    468 //      } 
    469 //      if (baseReader == null) return; 
    470 //    } 
    471445    else { 
    472446      WindowTools.reportException(null, options.isQuiet(), 
     
    505479  // -- Helper methods -- ImportStep.STACK -- 
    506480   
    507   /** Initializes the seriesLabels derived value. */ 
    508481  private void computeSeriesLabels() { 
    509482    int seriesCount = getSeriesCount(); 
  • trunk/components/loci-plugins/src/loci/plugins/in/ImporterOptions.java

    r6273 r6293  
    8383  public static final String LOCATION_LOCAL = "Local machine"; 
    8484  public static final String LOCATION_HTTP  = "Internet"; 
    85   //public static final String LOCATION_OMERO = "OMERO server"; 
    8685 
    8786  // possible values for stackFormat 
     
    237236  public boolean isLocal() { return LOCATION_LOCAL.equals(getLocation()); } 
    238237  public boolean isHTTP() { return LOCATION_HTTP.equals(getLocation()); } 
    239   //public boolean isOMERO() { return LOCATION_OMERO.equals(getLocation()); } 
    240238  public void setLocation(String s) { setValue(KEY_LOCATION, s); } 
    241239 
  • trunk/components/loci-plugins/src/loci/plugins/in/importer-options.txt

    r6284 r6293  
    128128values = \ 
    129129  Local machine, \ 
    130   Internet,      \ 
    131   OME server,    \ 
    132   OMERO server 
     130  Internet 
    133131 
    134132[mergeChannels] 
Note: See TracChangeset for help on using the changeset viewer.