Changeset 3950


Ignore:
Timestamp:
04/18/08 12:49:11 (12 years ago)
Author:
melissa
Message:

Fixed ArrayIndexOutOfBounds; one more getUsedFiles fix.

Location:
trunk/loci/formats/in
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/in/ImarisTiffReader.java

    r3854 r3950  
    152152        } 
    153153        else if (key.equals("LSMEmissionWavelength") && !value.equals("0")) { 
    154           store.setLogicalChannelEmWave(new Integer(value), 0, 
    155             channelIndexes[1]++); 
     154          if (channelIndexes[1] < core.sizeC[0]) { 
     155            store.setLogicalChannelEmWave(new Integer(value), 0, 
     156              channelIndexes[1]++); 
     157          } 
    156158        } 
    157159        else if (key.equals("LSMExcitationWavelength") && !value.equals("0")) { 
    158           store.setLogicalChannelExWave(new Integer(value), 0, 
    159             channelIndexes[2]++); 
     160          if (channelIndexes[2] < core.sizeC[0]) { 
     161            store.setLogicalChannelExWave(new Integer(value), 0, 
     162              channelIndexes[2]++); 
     163          } 
    160164        } 
    161165        else if (key.equals("Name") && !currentId.endsWith(value)) { 
    162           store.setLogicalChannelName(value, 0, channelIndexes[0]++); 
     166          if (channelIndexes[0] < core.sizeC[0]) { 
     167            store.setLogicalChannelName(value, 0, channelIndexes[0]++); 
     168          } 
    163169        } 
    164170        else if (key.equals("RecordingDate")) { 
  • trunk/loci/formats/in/TCSReader.java

    r3854 r3950  
    158158      v.add(tiffs.get(i)); 
    159159    } 
     160    if (!v.contains(currentId)) v.add(currentId); 
    160161    return (String[]) v.toArray(new String[0]); 
    161162  } 
Note: See TracChangeset for help on using the changeset viewer.