Changeset 3465


Ignore:
Timestamp:
12/11/07 16:34:38 (12 years ago)
Author:
melissa
Message:

FileStitcher's behaviour should no longer be dependent upon which file is passed to setId.

Location:
trunk/loci/formats
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/FilePattern.java

    r3015 r3465  
    421421            while (j < width && !same[j]) j++; 
    422422            String p = findPattern(name, nameList, jx, indexList[i] + j, ""); 
    423             if (p == null) { 
     423            char c = name.charAt(indexList[i] - 1); 
     424            // check if this block represents the series axis 
     425            if (p == null && c != 'S' && c != 's' && c != 'E' && c != 'e') { 
    424426              // unable to find an appropriate breakdown of numerical blocks 
    425427              return null; 
    426428            } 
    427             sb.append(p); 
     429            else if (p == null) { 
     430              sb.append(name.charAt(endList[i] - 1)); 
     431            } 
     432            else sb.append(p); 
    428433          } 
    429434        } 
  • trunk/loci/formats/FileStitcher.java

    r3450 r3465  
    656656      // this could happen with, e.g., a stitched collection of ICS/IDS pairs 
    657657      // we have no datasets structured this way, so this logic is untested 
     658      /* 
    658659      if (usedFiles == null) { 
    659660        String[][][] used = new String[files.length][][]; 
     
    684685        } 
    685686      } 
    686       return usedFiles; 
     687      */ 
     688      return reader.getUsedFiles(); 
    687689    } 
    688690    // assume every constituent file has no other used files 
     
    832834 
    833835    currentId = id; 
    834     fp = findPattern(id); 
     836 
     837    fp = findPattern(currentId); 
     838    String[] tmpFiles = fp.getFiles(); 
     839    Arrays.sort(tmpFiles); 
     840 
     841    fp = new FilePattern(new Location(tmpFiles[0])); 
    835842 
    836843    reader.setId(fp.getFiles()[0]); 
Note: See TracChangeset for help on using the changeset viewer.