Changeset 4255


Ignore:
Timestamp:
07/25/08 12:25:06 (11 years ago)
Author:
melissa
Message:

Handle yet another case where there are too many pixels files.

File:
1 edited

Legend:

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

    r4228 r4255  
    641641    // throw away files, if necessary 
    642642 
    643     if (files.length > getImageCount()) { 
     643    int calcCount = getSizeZ() * getEffectiveSizeC() * getSizeT(); 
     644    if (files.length > getImageCount() || getImageCount() != calcCount) { 
     645      status("Removing extraneous files"); 
    644646      String[] tmpFiles = files; 
    645       files = new String[getImageCount()]; 
     647      int imageCount = (int) Math.min(getImageCount(), calcCount); 
     648      files = new String[imageCount]; 
    646649 
    647650      Hashtable zSections = new Hashtable(); 
     
    664667      for (int i=0; i<keys.length; i++) { 
    665668        int oldCount = ((Integer) zSections.get(keys[i])).intValue(); 
    666         int nPlanes = (isTiff ? tiff.getEffectiveSizeC() : getSizeC()) * 
    667           getSizeT(); 
     669        int nPlanes = 
     670          (isTiff ? tiff.getEffectiveSizeC() : getSizeC()) * getSizeT(); 
    668671        int count = (int) Math.min(oldCount, nPlanes); 
    669672        for (int j=0; j<count; j++) { 
     
    672675        if (count < oldCount) oldFile += (oldCount - count); 
    673676      } 
    674  
     677      core.imageCount[0] = getSizeZ() * getEffectiveSizeC() * getSizeT(); 
    675678    } 
    676679 
Note: See TracChangeset for help on using the changeset viewer.