Changeset 7086


Ignore:
Timestamp:
10/18/10 18:13:29 (9 years ago)
Author:
melissa
Message:

A few more file stitching fixes.

Location:
trunk/components/bio-formats/src/loci/formats
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/components/bio-formats/src/loci/formats/AxisGuesser.java

    r7070 r7086  
    7979  protected static final String[] S = {"s", "series", "sp"}; 
    8080 
     81  protected static final String ONE = "1"; 
    8182  protected static final String TWO = "2"; 
    8283  protected static final String THREE = "3"; 
     
    186187      if (axisTypes[i] != UNKNOWN_AXIS) continue; 
    187188 
    188       // check special case: <2-3> (Bio-Rad PIC) 
    189       if (elements[i].length == 2 && elements[i][0].equals(TWO) && 
    190         elements[i][1].equals(THREE) && suffix.equalsIgnoreCase(".pic")) 
     189      // check special case: <2-3>, <1-3> (Bio-Rad PIC) 
     190      if (suffix.equalsIgnoreCase(".pic") && i == axisTypes.length - 1 && 
     191        ((elements[i].length == 2 && 
     192        (elements[i][0].equals(ONE) || elements[i][0].equals(TWO)) && 
     193        (elements[i][1].equals(TWO) || elements[i][1].equals(THREE))) || 
     194        (elements[i].length == 3 && 
     195        elements[i][0].equals(ONE) && elements[i][1].equals(TWO) && 
     196        elements[i][2].equals(THREE)))) 
    191197      { 
    192198        axisTypes[i] = C_AXIS; 
    193         break; 
     199        continue; 
    194200      } 
    195201      else if (elements[i].length == 2 || elements[i].length == 3) { 
     
    204210        { 
    205211          axisTypes[i] = C_AXIS; 
    206           break; 
     212          continue; 
    207213        } 
    208214      } 
  • trunk/components/bio-formats/src/loci/formats/FileStitcher.java

    r7076 r7086  
    464464  /* @see IFormatReader#close(boolean) */ 
    465465  public void close(boolean fileOnly) throws IOException { 
    466     if (reader != null) reader.close(fileOnly); 
     466    super.close(fileOnly); 
    467467    if (externals != null) { 
    468468      for (ExternalSeries s : externals) { 
     
    480480      series = 0; 
    481481      store = null; 
     482      patternIds = false; 
    482483    } 
    483484  } 
     
    709710 
    710711    FilePattern fp = new FilePattern(id); 
     712    if (!patternIds) patternIds = fp.isValid() && fp.getFiles().length > 1; 
    711713 
    712714    boolean mustGroup = false; 
     
    722724      // reader subclass is handling file grouping 
    723725      noStitch = true; 
     726      reader.close(); 
     727      reader.setGroupFiles(true); 
     728 
    724729      if (patternIds && fp.isValid()) { 
    725730        reader.setId(fp.getFiles()[0]); 
Note: See TracChangeset for help on using the changeset viewer.