Changeset 3022 for trunk


Ignore:
Timestamp:
08/01/07 10:26:30 (13 years ago)
Author:
melissa
Message:

Bugfixes.

Location:
trunk/loci/formats/in
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/in/DicomReader.java

    r3015 r3022  
    319319      SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); 
    320320      if (d != null) stamp = fmt.format(d); 
    321     } 
     321      else stamp = null;  
     322    } 
     323 
     324    if (stamp == null || stamp.trim().equals("")) stamp = null; 
    322325 
    323326    store.setImage( 
  • trunk/loci/formats/in/FluoviewReader.java

    r3015 r3022  
    121121      return super.openBytes(no, buf); 
    122122    } 
    123     FormatTools.assertId(currentId, false, 1); 
     123    FormatTools.assertId(currentId, true, 1); 
    124124    if (no < 0 || no >= core.imageCount[0]) { 
    125125      throw new FormatException("Invalid image number: " + no); 
  • trunk/loci/formats/in/OIBReader.java

    r3015 r3022  
    437437  private void initMetadata() throws FormatException, IOException { 
    438438    MetadataStore store = getMetadataStore(); 
    439     store.setImage((String) getMeta("DataName"), null, null, null); 
     439    store.setImage((String) getMeta("[File Info] - DataName"), null, 
     440      null, null); 
    440441 
    441442    for (int i=0; i<width.size(); i++) { 
  • trunk/loci/formats/in/OpenlabRawReader.java

    r3015 r3022  
    138138    bytesPerPixel = in.read(); 
    139139    in.read(); 
    140     Date timestamp = new Date(in.readLong()); 
    141     SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); 
    142     addMeta("Timestamp", sdf.format(timestamp)); 
     140    
     141    long stamp = in.readLong(); 
     142    Date timestamp = null; 
     143    SimpleDateFormat sdf = null; 
     144    if (stamp > 0) {  
     145      stamp /= 1000000; 
     146      stamp -= (67 * 365.25 * 24 * 60 * 60); 
     147     
     148      timestamp = new Date(stamp); 
     149      sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); 
     150      addMeta("Timestamp", sdf.format(timestamp)); 
     151    }  
    143152    in.skipBytes(4); 
    144153    byte[] s = new byte[256]; 
     
    180189    } 
    181190 
    182     store.setImage((String) getMeta("Image name"), sdf.format(timestamp), 
    183       null, null); 
     191    store.setImage((String) getMeta("Image name"),  
     192      timestamp == null ? null : sdf.format(timestamp), null, null); 
    184193    store.setPixels( 
    185194      new Integer(core.sizeX[0]), 
  • trunk/loci/formats/in/QTReader.java

    r3015 r3022  
    326326 
    327327    core.imageCount[0] = offsets.size(); 
    328     if (chunkSizes.size() < core.imageCount[0]) { 
     328    if (chunkSizes.size() < core.imageCount[0] && chunkSizes.size() > 0) { 
    329329      core.imageCount[0] = chunkSizes.size(); 
    330330    } 
Note: See TracChangeset for help on using the changeset viewer.