Changeset 6139


Ignore:
Timestamp:
04/19/10 13:49:12 (10 years ago)
Author:
melissa
Message:

Fixed a couple of bugs that prevented Nikon images with more than one sample per pixel from being read.

File:
1 edited

Legend:

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

    r6129 r6139  
    134134 
    135135    IFD ifd = ifds.get(no); 
    136  
    137     int dataSize = ifd.getBitsPerSample()[0]; 
     136    int[] bps = ifd.getBitsPerSample(); 
     137 
     138    if (bps.length > 1) { 
     139      return super.openBytes(no, buf, x, y, w, h); 
     140    } 
     141 
     142    int dataSize = bps[0]; 
    138143 
    139144    long[] byteCounts = ifd.getStripByteCounts(); 
     
    396401 
    397402    core[0].imageCount = 1; 
    398     core[0].interleaved = true; 
     403    if (ifds.get(0).getSamplesPerPixel() == 1) { 
     404      core[0].interleaved = true; 
     405    } 
    399406  } 
    400407 
Note: See TracChangeset for help on using the changeset viewer.