Changeset 4201


Ignore:
Timestamp:
07/15/08 11:24:44 (12 years ago)
Author:
melissa
Message:

Removed debugging statements and fixed Z size parsing.

File:
1 edited

Legend:

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

    r4200 r4201  
    6262  private String creationDate; 
    6363  private int startRow, startCol; 
     64  private int fieldCount, zCount; 
    6465 
    6566  private int wellRows, wellCols; 
     
    159160    InCellHandler handler = new InCellHandler(store); 
    160161 
    161     status("starting xml parse"); 
    162     long t1 = System.currentTimeMillis();  
    163162    try { 
    164163      SAXParser parser = SAX_FACTORY.newSAXParser(); 
     
    171170      throw new FormatException(exc); 
    172171    } 
    173     long t2 = System.currentTimeMillis(); 
    174     status("finished xml parse (" + (t2 - t1) + ")"); 
     172    core.sizeZ[0] = fieldCount * zCount; 
    175173 
    176174    seriesCount = totalImages / (getSizeZ() * getSizeC() * getSizeT()); 
     
    187185    Arrays.fill(core.imageCount, z * c * t); 
    188186    Arrays.fill(core.currentOrder, "XYZCT"); 
    189  
    190     for (int i=0; i<wellCoordinates.size(); i++) { 
    191       int row = (int) ((Point) wellCoordinates.get(i)).x - startRow; 
    192       int col = (int) ((Point) wellCoordinates.get(i)).y - startCol; 
    193       store.setWellSampleIndex(new Integer(i), 0, row*wellCols + col, 0); 
    194     } 
    195187 
    196188    tiffReader = new MinimalTiffReader(); 
     
    216208        store.setPlaneTimingExposureTime(new Float(0), i, 0, q); 
    217209      } 
     210 
     211      int row = (int) ((Point) wellCoordinates.get(i)).x - startRow; 
     212      int col = (int) ((Point) wellCoordinates.get(i)).y - startCol; 
     213      store.setWellSampleIndex(new Integer(i), 0, row*wellCols + col, 0); 
    218214    } 
    219215 
     
    281277      } 
    282278      else if (qName.equals("Identifier")) { 
     279        int field = Integer.parseInt(attributes.getValue("field_index")) + 1; 
    283280        int z = Integer.parseInt(attributes.getValue("z_index")) + 1; 
    284281        int c = Integer.parseInt(attributes.getValue("wave_index")) + 1; 
    285282        int t = Integer.parseInt(attributes.getValue("time_index")) + 1; 
    286         core.sizeZ[0] = (int) Math.max(getSizeZ(), z); 
     283        fieldCount = (int) Math.max(fieldCount, field); 
     284        zCount = (int) Math.max(zCount, z); 
    287285        core.sizeC[0] = (int) Math.max(getSizeC(), c); 
    288286        core.sizeT[0] = (int) Math.max(getSizeT(), t); 
Note: See TracChangeset for help on using the changeset viewer.