Changeset 5688


Ignore:
Timestamp:
11/15/09 17:29:13 (10 years ago)
Author:
callan
Message:

Handling cases where the plane index is not present

File:
1 edited

Legend:

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

    r5685 r5688  
    10191019 
    10201020    boolean validMask = false; 
    1021     BitWriter bits = new BitWriter(planes[index].length / 8); 
    1022     for (int p=0; p<planes[index].length; p++) { 
    1023       bits.write(planes[index][p] == 0 ? 0 : 1, 1); 
    1024       if (planes[index][p] != 0) { 
    1025         validMask = true; 
     1021    BitWriter bits = null; 
     1022    if (planes.length > index) { 
     1023      bits = new BitWriter(planes[index].length / 8); 
     1024      for (int p=0; p<planes[index].length; p++) { 
     1025        bits.write(planes[index][p] == 0 ? 0 : 1, 1); 
     1026        if (planes[index][p] != 0) { 
     1027          validMask = true; 
     1028        } 
    10261029      } 
    10271030    } 
Note: See TracChangeset for help on using the changeset viewer.