Changeset 5134


Ignore:
Timestamp:
05/29/09 11:07:08 (11 years ago)
Author:
melissa
Message:
  • Better SEQ comment parsing.
  • Fixed a bunch of LSM metadata population issues.
Location:
trunk/components/bio-formats/src/loci/formats/in
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/components/bio-formats/src/loci/formats/in/SEQReader.java

    r5130 r5134  
    104104      StringTokenizer tokenizer = new StringTokenizer(descr, "\n"); 
    105105      while (tokenizer.hasMoreTokens()) { 
    106         String token = tokenizer.nextToken(); 
     106        String token = tokenizer.nextToken().trim(); 
    107107        int eq = token.indexOf("="); 
     108        if (eq == -1) eq = token.indexOf(":"); 
    108109        if (eq != -1) { 
    109110          String label = token.substring(0, eq); 
  • trunk/components/bio-formats/src/loci/formats/in/ZeissLSMReader.java

    r5121 r5134  
    359359    String keyPrefix = "Series " + series + " "; 
    360360 
    361     status("Reading LSM metadata"); 
     361    status("Reading LSM metadata for series #" + series); 
    362362 
    363363    MetadataStore store = 
     
    365365 
    366366    // link Instrument and Image 
    367     store.setInstrumentID("Instrument:0", series); 
    368     store.setImageInstrumentRef("Instrument:0", series); 
     367    store.setInstrumentID("Instrument:" + series, series); 
     368    store.setImageInstrumentRef("Instrument:" + series, series); 
    369369 
    370370    // get TIF_CZ_LSMINFO structure 
     
    796796 
    797797            // link Objective to Image 
    798             store.setObjectiveID("Objective:0", series, 0); 
    799             store.setObjectiveSettingsObjective("Objective:0", series); 
     798            store.setObjectiveID("Objective:" + series, series, 0); 
     799            store.setObjectiveSettingsObjective("Objective:" + series, series); 
    800800 
    801801            break; 
     
    935935    store.setDimensionsPhysicalSizeZ(pixZ, series, 0); 
    936936 
    937     float firstStamp = 
    938       timestamps.size() == 0 ? 0f : ((Double) timestamps.get(0)).floatValue(); 
     937    int offset = 0; 
     938    for (int i=0; i<series; i++) { 
     939      setSeries(i); 
     940      offset += getImageCount(); 
     941    } 
     942    setSeries(series); 
     943 
     944    float firstStamp = timestamps.size() <= offset ? 0f : 
     945      ((Double) timestamps.get(offset)).floatValue(); 
    939946 
    940947    for (int i=0; i<getImageCount(); i++) { 
    941948      int[] zct = FormatTools.getZCTCoords(this, i); 
    942949 
    943       if (zct[2] < timestamps.size()) { 
    944         float thisStamp = ((Double) timestamps.get(zct[2])).floatValue(); 
    945         store.setPlaneTimingDeltaT(new Float(thisStamp - firstStamp), 0, 0, i); 
     950      if (offset + zct[2] < timestamps.size()) { 
     951        float thisStamp = 
     952          ((Double) timestamps.get(offset + zct[2])).floatValue(); 
     953        store.setPlaneTimingDeltaT(new Float(thisStamp - firstStamp), 
     954          series, 0, i); 
    946955        float nextStamp = zct[2] < getSizeT() - 1 ? 
    947           ((Double) timestamps.get(zct[2] + 1)).floatValue() : thisStamp; 
     956          ((Double) timestamps.get(offset + zct[2] + 1)).floatValue() : 
     957          thisStamp; 
    948958        if (i == getSizeT() - 1 && zct[2] > 0) { 
    949           thisStamp = ((Double) timestamps.get(zct[2] - 1)).floatValue(); 
     959          thisStamp = 
     960            ((Double) timestamps.get(offset + zct[2] - 1)).floatValue(); 
    950961        } 
    951962        store.setPlaneTimingExposureTime(new Float(nextStamp - thisStamp), 
Note: See TracChangeset for help on using the changeset viewer.