Changeset 3152


Ignore:
Timestamp:
09/11/07 09:19:47 (13 years ago)
Author:
melissa
Message:

Fixed tiling bug.

File:
1 edited

Legend:

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

    r3139 r3152  
    154154      int tiles = tileRows * tileColumns; 
    155155      if (tiles == 0) { 
    156         tiles = 1;  
     156        tiles = 1; 
    157157        tileRows = 1; 
    158158        tileColumns = 1; 
    159       }  
     159      } 
    160160      int start = no * tiles; 
    161       
    162       int bytes =  
     161 
     162      int bytes = 
    163163        FormatTools.getBytesPerPixel(core.pixelType[0]) * getRGBChannelCount(); 
    164164      int ex = core.sizeX[0] / tileColumns; 
     
    167167 
    168168      int[] tileOrder = new int[tiles]; 
    169       if (tiles == 1) tileOrder[0] = 0; 
     169      if (tiles == 1) tileOrder[0] = no; 
    170170      else { 
    171171        int p = 0; 
     
    200200        r.exec("blah = dis.skip(skipBytes)"); 
    201201        r.setVar("data", buf); 
    202         
     202 
    203203        int xf = ((i - start) % tileColumns) * ex * bytes;  
    204204        int yf = ((i - start) / tileRows) * ey;  
     
    314314      if (core.sizeC[0] != cIndices.size()) core.sizeC[0] *= cIndices.size(); 
    315315 
    316       core.imageCount[0] = core.sizeZ[0] * core.sizeT[0] *  
     316      core.imageCount[0] = core.sizeZ[0] * core.sizeT[0] * 
    317317        (core.rgb[0] ? 1 : core.sizeC[0]); 
    318318 
     
    323323        tileColumns = lowerLeft - middle - 1; 
    324324        tileRows = (lowerLeft / tileColumns) + 1; 
     325        if (tileColumns < 0) tileColumns = 1; 
     326        if (tileRows < 0) tileRows = 1; 
    325327        core.sizeX[0] *= tileColumns; 
    326328        core.sizeY[0] *= tileRows; 
     329        if (tileColumns == 1 && tileRows == 1) isTiled = false;  
    327330      } 
    328331 
Note: See TracChangeset for help on using the changeset viewer.