Changeset 3373


Ignore:
Timestamp:
11/15/07 14:49:26 (12 years ago)
Author:
melissa
Message:
  • Removed separate FileStitcher, since data browser integration is much better now.
  • If we open a stitched dataset, use the corresponding file pattern in the window title (instead of the primary file's name).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/plugins/Importer.java

    r3371 r3373  
    140140 
    141141    try { 
    142       FileStitcher fs = null; 
    143142      r.setMetadataFiltered(true); 
    144143      r.setId(id); 
     
    156155        catch (NullPointerException e) { } 
    157156        id = options.getId(); 
    158       } 
    159  
    160       // CTR FIXME -- why is the file stitcher separate from the reader? 
    161       // (answer: because of the clunkiness of the 4D Data Browser integration) 
    162       if (groupFiles) r = fs = new FileStitcher(r, true); 
     157        if (id == null) id = currentFile; 
     158      } 
     159 
     160      if (groupFiles) r = new FileStitcher(r, true); 
    163161      r = new ChannelSeparator(r); 
    164162      r.setId(id); 
     
    488486          showStack(stackB, currentFile, seriesName, store, 
    489487            cCount[i], zCount[i], tCount[i], sizeZ[i], sizeC[i], sizeT[i], 
    490             fi, r, fs, options); 
     488            fi, r, options); 
    491489          showStack(stackS, currentFile, seriesName, store, 
    492490            cCount[i], zCount[i], tCount[i], sizeZ[i], sizeC[i], sizeT[i], 
    493             fi, r, fs, options); 
     491            fi, r, options); 
    494492          showStack(stackF, currentFile, seriesName, store, 
    495493            cCount[i], zCount[i], tCount[i], sizeZ[i], sizeC[i], sizeT[i], 
    496             fi, r, fs, options); 
     494            fi, r, options); 
    497495          showStack(stackO, currentFile, seriesName, store, 
    498496            cCount[i], zCount[i], tCount[i], sizeZ[i], sizeC[i], sizeT[i], 
    499             fi, r, fs, options); 
     497            fi, r, options); 
    500498 
    501499          long endTime = System.currentTimeMillis(); 
     
    602600    OMEXMLMetadata store, int cCount, int zCount, int tCount, 
    603601    int sizeZ, int sizeC, int sizeT, FileInfo fi, IFormatReader r, 
    604     FileStitcher fs, ImporterOptions options) 
     602    ImporterOptions options) 
    605603    throws FormatException, IOException 
    606604  { 
    607605    if (stack == null) return; 
     606    String[] used = r.getUsedFiles(); 
    608607    String title = file.substring(file.lastIndexOf(File.separator) + 1); 
    609     if (series != null && !file.endsWith(series)) { 
     608    if (used.length > 1) { 
     609      FilePattern fp = new FilePattern(new Location(file)); 
     610      if (fp != null) title = fp.getPattern(); 
     611    } 
     612    if (series != null && !file.endsWith(series) && r.getSeriesCount() > 1) { 
    610613      title += " - " + series; 
    611614    } 
     
    623626    imp.setFileInfo(fi); 
    624627    imp.setDimensions(cCount, zCount, tCount); 
    625     displayStack(imp, r, fs, options); 
     628    displayStack(imp, r, options); 
    626629  } 
    627630 
    628631  /** Displays the image stack using the appropriate plugin. */ 
    629632  private void displayStack(ImagePlus imp, 
    630     IFormatReader r, FileStitcher fs, ImporterOptions options) 
     633    IFormatReader r, ImporterOptions options) 
    631634  { 
    632635    boolean mergeChannels = options.isMergeChannels(); 
Note: See TracChangeset for help on using the changeset viewer.