Changeset 6303


Ignore:
Timestamp:
05/13/10 10:53:56 (10 years ago)
Author:
melissa
Message:

Fixed bug that caused get*BitLookupTable() to return null if openBytes had not yet been called.

File:
1 edited

Legend:

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

    r6230 r6303  
    157157 
    158158  private int[][] realChannel; 
    159   private int lastChannel = -1; 
     159  private int lastChannel = 0; 
    160160 
    161161  // -- Constructor -- 
     
    179179  public byte[][] get8BitLookupTable() { 
    180180    FormatTools.assertId(currentId, true, 1); 
    181     if (getPixelType() != FormatTools.UINT8 || lastChannel == -1) return null; 
     181    if (getPixelType() != FormatTools.UINT8) return null; 
    182182    return lastChannel < BYTE_LUTS.length ? BYTE_LUTS[lastChannel] : null; 
    183183  } 
     
    186186  public short[][] get16BitLookupTable() { 
    187187    FormatTools.assertId(currentId, true, 1); 
    188     if (getPixelType() != FormatTools.UINT16 || lastChannel == -1) return null; 
     188    if (getPixelType() != FormatTools.UINT16) return null; 
    189189    return lastChannel < SHORT_LUTS.length ? SHORT_LUTS[lastChannel] : null; 
    190190  } 
     
    244244      offsets = null; 
    245245      realChannel = null; 
    246       lastChannel = -1; 
     246      lastChannel = 0; 
    247247    } 
    248248  } 
Note: See TracChangeset for help on using the changeset viewer.