Changeset 3952


Ignore:
Timestamp:
04/18/08 13:46:22 (12 years ago)
Author:
melissa
Message:

Updated plane width/height calculation based on new files.

File:
1 edited

Legend:

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

    r3854 r3952  
    186186      else if (relativePath.indexOf("Image_Height") != -1) { 
    187187        byte[] b = poi.getDocumentBytes(name, 8); 
    188         core.sizeY[0] = 
    189           (int) ((DataTools.bytesToLong(b, 0, false) & 0x1f00) >> 8) * 64; 
     188        long val = DataTools.bytesToLong(b, 0, false); 
     189        int mul = (int) ((val & 0x1f00) >> 8); 
     190        if (mul == 0) mul = (int) ((val & 0xf000) >> 12); 
     191        core.sizeY[0] = mul * 64; 
    190192      } 
    191193      else if (relativePath.indexOf("Image_Width") != -1) { 
    192194        byte[] b = poi.getDocumentBytes(name, 8); 
    193         core.sizeX[0] = 
    194           (int) ((DataTools.bytesToLong(b, 0, false) & 0x1f00) >> 8) * 64; 
     195        long val = DataTools.bytesToLong(b, 0, false); 
     196        int mul = (int) ((val & 0x1f00) >> 8); 
     197        if (mul == 0) mul = (int) ((val & 0xf000) >> 12); 
     198        core.sizeX[0] = mul * 64; 
    195199      } 
    196200    } 
Note: See TracChangeset for help on using the changeset viewer.