Changeset 3191


Ignore:
Timestamp:
09/21/07 11:13:13 (12 years ago)
Author:
melissa
Message:

Slight speed improvement when reading intensity data.

File:
1 edited

Legend:

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

    r3184 r3191  
    142142      in.seek(off + 2 * core.sizeX[series] * core.sizeY[series] * 
    143143        timeBins * no); 
     144      byte[] timeBin = new byte[timeBins * 2]; 
    144145      for (int y=0; y<core.sizeY[series]; y++) { 
    145146        for (int x=0; x<core.sizeX[series]; x++) { 
     
    148149          // combine lifetime bins into intensity value 
    149150          short sum = 0; 
     151          in.read(timeBin); 
    150152          for (int t=0; t<timeBins; t++) { 
    151             sum += DataTools.read2SignedBytes(in, true); 
     153            sum += DataTools.bytesToShort(timeBin, t*2, true); 
    152154          } 
    153155          int ndx = 2 * (core.sizeX[0] * y + x); 
Note: See TracChangeset for help on using the changeset viewer.