Changeset 3486


Ignore:
Timestamp:
12/17/07 16:05:18 (12 years ago)
Author:
melissa
Message:
  • Better parsing of ImageJ TIFF comments.
  • Detect variation in SizeZ between series (Imaris HDF).
  • Detect and parse array of Strings in Software field (TCS TIFF).
Location:
trunk/loci/formats/in
Files:
3 edited

Legend:

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

    r3419 r3486  
    101101 
    102102    int[] zct = FormatTools.getZCTCoords(this, no); 
     103    if (previousImageNumber > getImageCount()) previousImageNumber = -1; 
    103104    int[] oldZCT = previousImageNumber == -1 ? new int[] {-1, -1, -1} : 
    104105      FormatTools.getZCTCoords(this, previousImageNumber); 
     106 
    105107    if (zct[1] != oldZCT[1] || zct[2] != oldZCT[2] || series != previousSeries) 
    106108    { 
     
    243245        core.sizeX[i] = Integer.parseInt(getValue("g", "ImageSizeX")); 
    244246        core.sizeY[i] = Integer.parseInt(getValue("g", "ImageSizeY")); 
    245       } 
    246     } 
     247        core.sizeZ[i] = Integer.parseInt(getValue("g", "ImageSizeZ")); 
     248        core.imageCount[i] = core.sizeZ[i] * core.sizeC[0] * core.sizeT[0]; 
     249      } 
     250    } 
     251    core.imageCount[0] = core.sizeZ[0] * core.sizeC[0] * core.sizeT[0]; 
    247252 
    248253    try { 
     
    276281    Arrays.fill(core.thumbSizeX, 128); 
    277282    Arrays.fill(core.thumbSizeY, 128); 
    278     Arrays.fill(core.imageCount, core.sizeZ[0] * core.sizeC[0] * core.sizeT[0]); 
    279283    Arrays.fill(core.orderCertain, true); 
    280284    Arrays.fill(core.littleEndian, true); 
  • trunk/loci/formats/in/TCSReader.java

    r3456 r3486  
    149149      String document = (String) ifd.get(new Integer(TiffTools.DOCUMENT_NAME)); 
    150150      if (document == null) document = ""; 
    151       String software = (String) ifd.get(new Integer(TiffTools.SOFTWARE)); 
     151      Object s = ifd.get(new Integer(TiffTools.SOFTWARE)); 
     152      String software = s instanceof String ? (String) s : 
     153        s instanceof String[] ? ((String[]) s)[0] : null; 
    152154      if (software == null) software = ""; 
    153155      return document.startsWith("CHANNEL") || software.trim().equals("TCSNTV"); 
  • trunk/loci/formats/in/TiffReader.java

    r3477 r3486  
    8282 
    8383      core.sizeZ[0] = 1; 
    84       core.sizeC[0] = 1; 
    8584      core.sizeT[0] = 1; 
    8685 
     
    102101        } 
    103102      } 
    104       if (core.sizeZ[0] * core.sizeT[0] * core.sizeC[0] == 1) { 
     103      if (core.sizeZ[0] * core.sizeT[0] * core.sizeC[0] == core.sizeC[0]) { 
    105104        core.sizeT[0] = core.imageCount[0]; 
    106105      } 
Note: See TracChangeset for help on using the changeset viewer.