Changeset 7474


Ignore:
Timestamp:
12/29/10 14:05:50 (9 years ago)
Author:
melissa
Message:

Allow multi-series files to be stitched if the file pattern contains only one series. Closes #624.

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

Legend:

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

    r7086 r7474  
    128128    String[][] elements = fp.getElements(); 
    129129    axisTypes = new int[elements.length]; 
    130     boolean foundZ = false, foundT = false; 
     130    boolean foundZ = false, foundT = false, foundC = false; 
    131131 
    132132    // -- 1) fill in "known" axes based on known patterns and conventions -- 
     
    173173        if (p.equals(C[j])) { 
    174174          axisTypes[i] = C_AXIS; 
     175          foundC = true; 
    175176          break; 
    176177        } 
     
    238239    boolean canBeZ = !foundZ && sizeZ == 1; 
    239240    boolean canBeT = !foundT && sizeT == 1; 
     241    boolean canBeC = !foundC && sizeC == 1; 
    240242 
    241243    certain = isCertain; 
     
    253255        canBeT = false; 
    254256      } 
    255       else axisTypes[i] = C_AXIS; 
     257      else if (canBeC) { 
     258        axisTypes[i] = C_AXIS; 
     259        canBeC = false; 
     260      } 
     261      else { 
     262        char lastAxis = newOrder.charAt(newOrder.length() - 1); 
     263        if (lastAxis == 'C') { 
     264          axisTypes[i] = C_AXIS; 
     265        } 
     266        else if (lastAxis == 'Z') { 
     267          axisTypes[i] = Z_AXIS; 
     268        } 
     269        else axisTypes[i] = T_AXIS; 
     270      } 
    256271    } 
    257272  } 
  • trunk/components/bio-formats/src/loci/formats/FileStitcher.java

    r7257 r7474  
    751751 
    752752    String msg = " Please rename your files or disable file stitching."; 
    753     if (reader.getSeriesCount() > 1 && 
    754       (externals.length > 1 || fp.getFiles().length > 1)) 
    755     { 
     753    if (reader.getSeriesCount() > 1 && externals.length > 1) { 
    756754      throw new FormatException("Unsupported grouping: File pattern contains " + 
    757755        "multiple files and each file contains multiple series." + msg); 
Note: See TracChangeset for help on using the changeset viewer.