Changeset 4758


Ignore:
Timestamp:
01/27/09 12:45:33 (11 years ago)
Author:
melissa
Message:

Fixed NPE if LogicalChannel.SamplesPerPixel is not populated.

File:
1 edited

Legend:

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

    r4749 r4758  
    200200        } 
    201201        String order = meta.getPixelsDimensionOrder(i, p); 
    202         int samples = meta.getLogicalChannelSamplesPerPixel(i, 0).intValue(); 
     202 
     203        Integer samplesPerPixel = meta.getLogicalChannelSamplesPerPixel(i, 0); 
     204        int samples = samplesPerPixel == null ? 
     205          TiffTools.getSamplesPerPixel(firstIFD) : samplesPerPixel.intValue(); 
     206 
    203207        int effSizeC = meta.getPixelsSizeC(i, p).intValue() / samples; 
    204208        if (effSizeC == 0) effSizeC = 1; 
Note: See TracChangeset for help on using the changeset viewer.