Changeset 6677


Ignore:
Timestamp:
07/08/10 16:31:28 (9 years ago)
Author:
curtis
Message:

Backport r6672,r6673,r6676 to 4.2 branch.

Location:
branches/4.2
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/4.2

  • branches/4.2/components/loci-plugins

  • branches/4.2/components/loci-plugins/src/loci/plugins

  • branches/4.2/components/loci-plugins/src/loci/plugins/in/Calibrator.java

  • branches/4.2/components/loci-plugins/src/loci/plugins/in/ImagePlusReader.java

    r6669 r6677  
    205205 
    206206  private List<ImagePlus> readImages() throws FormatException, IOException { 
     207    final ImporterOptions options = process.getOptions(); 
    207208    final ImageProcessorReader reader = process.getReader(); 
    208     final ImporterOptions options = process.getOptions(); 
    209209 
    210210    List<ImagePlus> imps = new ArrayList<ImagePlus>(); 
     
    273273      imp = vip; 
    274274    } 
    275     else { 
    276       imp = createImage(title, stack, luts); 
    277     } 
    278    
     275    else imp = createImage(title, stack, luts); 
     276 
    279277    // configure image 
    280278 
     
    300298    throws FormatException, IOException 
    301299  { 
     300    final ImporterOptions options = process.getOptions(); 
    302301    final ImageProcessorReader reader = process.getReader(); 
    303     final ImporterOptions options = process.getOptions(); 
    304  
     302    reader.setSeries(s); 
    305303    final int zCount = process.getZCount(s); 
    306304    final int cCount = process.getCCount(s); 
     
    325323    final ImageProcessorReader reader = process.getReader(); 
    326324    reader.setSeries(s); 
    327  
    328325    final int zCount = process.getZCount(s); 
    329326    final int cCount = process.getCCount(s); 
     
    362359      } 
    363360    } 
    364      
     361 
    365362    return createStack(procs, labels, luts); 
    366363  } 
  • branches/4.2/components/loci-plugins/src/loci/plugins/in/ImportProcess.java

    r6669 r6677  
    5656import loci.plugins.util.VirtualReader; 
    5757import loci.plugins.util.WindowTools; 
    58  
    5958import ome.xml.model.enums.DimensionOrder; 
    6059import ome.xml.model.enums.EnumerationException; 
     
    284283    int cEnd = options.getCEnd(s); 
    285284    if (cEnd >= 0) return cEnd; 
     285    reader.setSeries(s); 
    286286    return reader.getEffectiveSizeC() - 1; 
    287287  } 
     
    294294    int zEnd = options.getZEnd(s); 
    295295    if (zEnd >= 0) return zEnd; 
     296    reader.setSeries(s); 
    296297    return reader.getSizeZ() - 1; 
    297298  } 
     
    304305    int tEnd = options.getTEnd(s); 
    305306    if (tEnd >= 0) return tEnd; 
     307    reader.setSeries(s); 
    306308    return reader.getSizeT() - 1; 
    307309  } 
     
    313315    assertStep(ImportStep.STACK); 
    314316    Region region = options.doCrop() ? options.getCropRegion(s) : null; 
    315     ImageProcessorReader r = getReader(); 
    316     int sizeX = r.getSizeX(), sizeY = r.getSizeY(); 
     317    reader.setSeries(s); 
     318    int sizeX = reader.getSizeX(), sizeY = reader.getSizeY(); 
    317319    if (region == null) { 
    318320      // entire image plane is the default region 
     
    363365    for (int s=0; s<seriesCount; s++) { 
    364366      if (!options.isSeriesOn(s)) continue; 
     367      reader.setSeries(s); 
    365368      // determine size of one image plane 
    366369      final Region cropRegion = getCropRegion(s); 
     
    414417 
    415418  /** Performed following ImportStep.READER notification. */ 
    416   private void initializeReader() { 
     419  private void initializeReader() throws FormatException, IOException { 
    417420    computeNameAndLocation(); 
    418421    createBaseReader(); 
     
    534537   * according to the current configuration. 
    535538   */ 
    536   private void createBaseReader() { 
     539  private void createBaseReader() throws FormatException, IOException { 
    537540    if (options.isLocal() || options.isHTTP()) { 
    538541      BF.status(options.isQuiet(), "Identifying " + idName); 
     
    542545        WindowTools.reportException(exc, options.isQuiet(), 
    543546          "Sorry, there was an error reading the file."); 
    544         return; 
     547        throw exc; 
    545548      } 
    546549      catch (IOException exc) { 
    547550        WindowTools.reportException(exc, options.isQuiet(), 
    548551          "Sorry, there was a I/O problem reading the file."); 
    549         return; 
     552        throw exc; 
    550553      } 
    551554    } 
     
    553556      WindowTools.reportException(null, options.isQuiet(), 
    554557        "Sorry, there has been an internal error: unknown data source"); 
     558      cancel(); 
     559      return; 
    555560    } 
    556561    Exception exc = null; 
     
    565570        WindowTools.reportException(exc, options.isQuiet(), 
    566571          "Sorry, there was a problem constructing the OME-XML metadata store"); 
     572        throw new FormatException(exc); 
    567573    } 
    568574    baseReader.setMetadataStore(meta); 
  • branches/4.2/components/loci-plugins/test/loci/plugins/in/ImporterTest.java

    r6669 r6677  
    11071107 
    11081108  /** tests BF's options.setUngroupFiles() */ 
    1109   private void datsetOpenFilesIndividuallyTester(boolean virtual) 
     1109  private void datasetOpenFilesIndividuallyTester(boolean virtual) 
    11101110  { 
    11111111    // TODO - try to remove file dependency 
     
    21202120  { 
    21212121    for (boolean virtual : BOOLEAN_STATES) 
    2122       datsetOpenFilesIndividuallyTester(virtual); 
     2122      datasetOpenFilesIndividuallyTester(virtual); 
    21232123  } 
    21242124 
  • branches/4.2/components/ome-xml

Note: See TracChangeset for help on using the changeset viewer.