Changeset 6034


Ignore:
Timestamp:
03/17/10 10:43:56 (10 years ago)
Author:
melissa
Message:
  • Fixed 16-bit lookup table handling in ImageJ.
  • Prevent IFD.printIFD from taking forever if debugging is turned off.
Location:
trunk/components
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/components/bio-formats/src/loci/formats/in/MinimalTiffReader.java

    r6026 r6034  
    146146        else return null; 
    147147      } 
     148 
    148149      short[][] table = new short[3][colorMap.length / 3]; 
    149150      int next = 0; 
    150151      for (int i=0; i<table.length; i++) { 
    151152        for (int j=0; j<table[0].length; j++) { 
    152           table[i][j] = (short) ((colorMap[next++] >> 8) & 0xffff); 
     153          table[i][j] = (short) (colorMap[next++] & 0xffff); 
    153154        } 
    154155      } 
  • trunk/components/bio-formats/src/loci/formats/tiff/IFD.java

    r6026 r6034  
    843843      { 
    844844        v = value.toString(); 
     845        LOGGER.debug("\t{}={}", getIFDTagName(tag.intValue()), v); 
    845846      } 
    846847      else { 
    847848        // this is an array of primitive types, Strings, or TiffRationals 
     849        LOGGER.debug("\t{}=", getIFDTagName(tag.intValue())); 
    848850        int nElements = Array.getLength(value); 
    849         v = ""; 
    850851        for (int i=0; i<nElements; i++) { 
    851           v += Array.get(value, i); 
    852           if (i < nElements - 1) v += ","; 
     852          LOGGER.debug("\t\t{}", Array.get(value, i)); 
    853853        } 
    854854      } 
    855       LOGGER.debug("\t{}={}", getIFDTagName(tag.intValue()), v); 
    856855    } 
    857856  } 
  • trunk/components/loci-plugins/src/loci/plugins/util/ImagePlusReader.java

    r6025 r6034  
    215215 
    216216        for (int i=0; i<byteTable[0].length; i++) { 
    217           int index = (int) (((float) i / byteTable[0].length) * 65535); 
    218           byteTable[0][i] = (byte) ((shortTable[0][index] / 65535f) * 255); 
    219           byteTable[1][i] = (byte) ((shortTable[1][index] / 65535f) * 255); 
    220           byteTable[2][i] = (byte) ((shortTable[2][index] / 65535f) * 255); 
     217          byteTable[0][i] = (byte) shortTable[0][i]; 
     218          byteTable[1][i] = (byte) shortTable[1][i]; 
     219          byteTable[2][i] = (byte) shortTable[2][i]; 
    221220        } 
    222221 
Note: See TracChangeset for help on using the changeset viewer.