Ignore:
Timestamp:
06/01/10 12:06:02 (10 years ago)
Author:
melissa
Message:
  • Updated OMEXMLMetadataImpl based on  ome-xml:r618.
  • Fixed a bunch of minor bugs exposed during testing.
Location:
branches/4.2/components/bio-formats/src/loci/formats/in
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/4.2/components/bio-formats/src/loci/formats/in/AVIReader.java

    r6230 r6430  
    480480      else { 
    481481        // skipping unknown block 
    482         readTypeAndSize(); 
     482        if (in.getFilePointer() + 8 < in.length()) { 
     483          readTypeAndSize(); 
     484        } 
     485        else break; 
    483486        if (in.getFilePointer() + size + 4 <= in.length()) { 
    484487          in.skipBytes(size); 
  • branches/4.2/components/bio-formats/src/loci/formats/in/BDReader.java

    r6376 r6430  
    520520        store.setRectangleWidth(new Double(cols[4]), i - firstRow, 0); 
    521521        store.setRectangleHeight(new Double(cols[5]), i - firstRow, 0); 
    522         String roiID = MetadataTools.createLSID("Rectangle", i - firstRow, 0); 
    523         store.setRectangleID(roiID, i - firstRow, 0); 
     522        String roiID = MetadataTools.createLSID("ROI", i - firstRow); 
     523        store.setROIID(roiID, i - firstRow); 
    524524        store.setImageROIRef(roiID, 0, i - firstRow); 
    525525      } 
  • branches/4.2/components/bio-formats/src/loci/formats/in/ICSReader.java

    r6376 r6430  
    821821 
    822822      Integer[] lasers = wavelengths.keySet().toArray(new Integer[0]); 
    823       for (Integer laser : lasers) { 
     823      for (int i=0; i<lasers.length; i++) { 
    824824        store.setLaserWavelength( 
    825           new PositiveInteger(wavelengths.get(laser)), 0, laser.intValue()); 
    826         store.setLaserType(getLaserType("Other"), 0, laser.intValue()); 
    827         store.setLaserLaserMedium(getLaserMedium("Other"), 0, laser.intValue()); 
     825          new PositiveInteger(wavelengths.get(lasers[i])), 0, i); 
     826        store.setLaserType(getLaserType("Other"), 0, i); 
     827        store.setLaserLaserMedium(getLaserMedium("Other"), 0, i); 
    828828      } 
    829829 
  • branches/4.2/components/bio-formats/src/loci/formats/in/LEOReader.java

    r6230 r6430  
    122122      store.setPixelsPhysicalSizeY(xSize, 0); 
    123123      store.setObjectiveWorkingDistance(workingDistance, 0, 0); 
     124      store.setObjectiveImmersion(getImmersion("Other"), 0, 0); 
     125      store.setObjectiveCorrection(getCorrection("Other"), 0, 0); 
    124126    } 
    125127  } 
  • branches/4.2/components/bio-formats/src/loci/formats/in/MetamorphReader.java

    r6381 r6430  
    926926        return l.exists() ? l.getAbsolutePath() : null; 
    927927      } 
    928       else return l.getAbsolutePath(); 
    929     } 
    930     return null; 
     928    } 
     929    return l.getAbsolutePath(); 
    931930  } 
    932931 
  • branches/4.2/components/bio-formats/src/loci/formats/in/OpenlabReader.java

    r6376 r6430  
    142142    lastPlane = no; 
    143143 
     144    if (no >= planeOffsets[series].length) return buf; 
    144145    int index = planeOffsets[series][no]; 
    145146 
    146147    long first = planes[index].planeOffset; 
    147     long last = no == getImageCount() - 1 ? in.length() : 
     148    long last = no == planeOffsets[series].length - 1 || 
     149      planeOffsets[series][no + 1] >= planes.length ? in.length() : 
    148150      planes[planeOffsets[series][no + 1]].planeOffset; 
    149151    in.seek(first); 
     
    723725      core[s].sizeZ /= core[s].sizeT; 
    724726    } 
     727 
     728    int newCount = getSizeZ() * getSizeT(); 
     729    if (!isRGB()) newCount *= getSizeC(); 
     730 
     731    if (newCount < getImageCount()) { 
     732      char firstAxis = getDimensionOrder().charAt(2); 
     733      if (firstAxis == 'Z') core[s].sizeZ++; 
     734      else if (firstAxis == 'C' && !isRGB()) core[s].sizeC++; 
     735      else core[s].sizeT++; 
     736      core[s].imageCount = getSizeZ() * getSizeT(); 
     737      if (!isRGB()) core[s].imageCount *= getSizeC(); 
     738    } 
     739    else if (newCount > getImageCount()) core[s].imageCount = newCount; 
    725740  } 
    726741 
  • branches/4.2/components/bio-formats/src/loci/formats/in/TCSReader.java

    r6301 r6430  
    147147    TiffParser tp = new TiffParser(stream); 
    148148    IFD ifd = tp.getFirstIFD(); 
    149     if (ifd == null) return false; 
     149    if (ifd == null) { 
     150      stream.seek(0); 
     151      return stream.readString(6).equals("<Data>"); 
     152    } 
    150153    String document = ifd.getIFDTextValue(IFD.DOCUMENT_NAME); 
    151154    if (document == null) document = ""; 
     
    191194    FormatTools.assertId(currentId, true, 1); 
    192195    if (noPixels) { 
    193       String name = currentId.toLowerCase(); 
    194       if (checkSuffix(name, TiffReader.TIFF_SUFFIXES)) return null; 
    195       return new String[] {currentId}; 
     196      return xmlFile == null ? null : new String[] {xmlFile}; 
    196197    } 
    197198    Vector<String> v = new Vector<String>(); 
    198199    v.addAll(tiffs); 
    199  
    200     String absoluteId = new Location(currentId).getAbsolutePath(); 
    201     if (!v.contains(absoluteId)) v.add(absoluteId); 
     200    if (xmlFile != null) v.add(xmlFile); 
    202201    return v.toArray(new String[v.size()]); 
    203202  } 
     
    237236      } 
    238237    } 
     238 
     239    if (isXML) xmlFile = l.getAbsolutePath(); 
    239240 
    240241    super.initFile(id); 
Note: See TracChangeset for help on using the changeset viewer.