Changeset 4300


Ignore:
Timestamp:
08/07/08 15:24:58 (12 years ago)
Author:
melissa
Message:

Fixed various bugs exposed by test suite.

Location:
trunk/loci/formats
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/FileStitcher.java

    r4291 r4300  
    768768  public MetadataStore getMetadataStore() { 
    769769    FormatTools.assertId(currentId, true, 2); 
    770     return store; 
     770    return noStitch ? reader.getMetadataStore() : store; 
    771771  } 
    772772 
     
    774774  public Object getMetadataStoreRoot() { 
    775775    FormatTools.assertId(currentId, true, 2); 
    776     return store.getRoot(); 
     776    return noStitch ? reader.getMetadataStoreRoot() : store.getRoot(); 
    777777  } 
    778778 
  • trunk/loci/formats/in/APNGReader.java

    r4268 r4300  
    253253 
    254254    core.currentOrder[0] = "XYCTZ"; 
    255     core.interleaved[0] = true; 
     255    core.interleaved[0] = false; 
    256256 
    257257    BufferedImage img = 
  • trunk/loci/formats/in/AVIReader.java

    r4274 r4300  
    150150 
    151151    if (getSizeX() == w && pad == 0) { 
    152       in.read(buf); 
     152      for (int row=0; row<getSizeY(); row++) { 
     153        in.read(buf, (getSizeY() - row - 1) * scanline, scanline); 
     154      } 
     155 
    153156      // swap channels 
    154157      if (bmpBitsPerPixel == 24) { 
  • trunk/loci/formats/in/FV1000Reader.java

    r4268 r4300  
    144144 
    145145    int[] coords = getZCTCoords(no); 
    146     coords[1] = channelIndexes[coords[1]]; 
    147     lastChannel = coords[1]; 
     146    if (coords[1] < channelIndexes.length) { 
     147      coords[1] = channelIndexes[coords[1]]; 
     148      lastChannel = coords[1]; 
     149    } 
    148150 
    149151    int planeNum = FormatTools.getIndex(getDimensionOrder(), getSizeZ(), 
     
    161163 
    162164  /* @see loci.formats.IFormatReader#openThumbImage(int) */ 
     165  /* 
    163166  public BufferedImage openThumbImage(int no) 
    164167    throws FormatException, IOException 
     
    175178    return thumbReader.openImage(0); 
    176179  } 
     180  */ 
    177181 
    178182  /* @see loci.formats.IFormatReader#getUsedFiles() */ 
  • trunk/loci/formats/in/LIFReader.java

    r4260 r4300  
    196196    Vector ycal = handler.getYCal(); 
    197197    Vector zcal = handler.getZCal(); 
     198    Vector bits = handler.getBits(); 
    198199 
    199200    numDatasets = widths.size(); 
     
    230231      } 
    231232 
     233      int nBits = ((Integer) bits.get(i)).intValue(); 
     234 
    232235      core.metadataComplete[i] = true; 
    233236      core.littleEndian[i] = true; 
    234       core.rgb[i] = false; 
    235       core.interleaved[i] = false; 
     237      core.rgb[i] = 
     238        nBits == (bitsPerPixel[i] * core.sizeC[i]) && core.sizeC[i] > 1; 
     239      core.interleaved[i] = core.rgb[i]; 
    236240      core.imageCount[i] = core.sizeZ[i] * core.sizeT[i]; 
    237       core.imageCount[i] *= core.sizeC[i]; 
     241      if (!core.rgb[i]) core.imageCount[i] *= core.sizeC[i]; 
    238242      core.indexed[i] = false; 
    239243      core.falseColor[i] = false; 
  • trunk/loci/formats/in/LeicaReader.java

    r4282 r4300  
    593593          int dimId = stream.readInt(); 
    594594          String dimType = (String) dimensionNames.get(new Integer(dimId)); 
     595          if (dimType == null) dimType = ""; 
    595596 
    596597          int size = stream.readInt(); 
  • trunk/loci/formats/in/MicromanagerReader.java

    r4274 r4300  
    218218          value = token.substring(token.indexOf("[") + 1, token.indexOf("]")); 
    219219        } 
    220         value = value.trim().substring(0, value.length() - 1); 
     220        value = value.trim(); 
     221        value = value.substring(0, value.length() - 1); 
    221222        addMeta(key, value); 
    222223        if (key.equals("Channels")) core.sizeC[0] = Integer.parseInt(value); 
  • trunk/loci/formats/in/PerkinElmerReader.java

    r4255 r4300  
    198198      String[] ls = parent.list(); 
    199199      for (int i=0; i<ls.length; i++) { 
    200         if (checkSuffix(ls[i], HTM_SUFFIX)) { 
     200        if (checkSuffix(ls[i], HTM_SUFFIX) && !ls[i].startsWith(".")) { 
    201201          id = new Location(parent.getAbsolutePath(), ls[i]).getAbsolutePath(); 
    202202          break; 
     
    220220      workingDirPath = ""; 
    221221    } 
     222 
     223    // remove files that start with '.' 
     224 
     225    Vector v = new Vector(); 
     226    for (int i=0; i<ls.length; i++) { 
     227      String file = ls[i]; 
     228      if (file.indexOf(File.separator) != -1) { 
     229        file = file.substring(file.lastIndexOf(File.separator) + 1); 
     230      } 
     231      if (!file.startsWith(".")) { 
     232        v.add(ls[i]); 
     233      } 
     234    } 
     235    ls = (String[]) v.toArray(new String[0]); 
    222236 
    223237    status("Searching for all metadata companion files"); 
Note: See TracChangeset for help on using the changeset viewer.