Changeset 2860


Ignore:
Timestamp:
06/13/07 08:21:00 (12 years ago)
Author:
melissa
Message:

Added the file name and series name to each image's "info" property.

File:
1 edited

Legend:

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

    r2843 r2860  
    477477          String seriesName = store.getImageName(new Integer(i)); 
    478478 
    479           showStack(stackB, currentFile + " - " + seriesName, store,  
     479          showStack(stackB, currentFile, seriesName, store,  
    480480            cCount[i], zCount[i], tCount[i], sizeZ[i], sizeC[i], sizeT[i],  
    481481            fi, r, fs, options); 
    482           showStack(stackS, currentFile + " - " + seriesName, store,  
     482          showStack(stackS, currentFile, seriesName, store,  
    483483            cCount[i], zCount[i], tCount[i], sizeZ[i], sizeC[i], sizeT[i],  
    484484            fi, r, fs, options); 
    485           showStack(stackF, currentFile + " - " + seriesName, store,  
     485          showStack(stackF, currentFile, seriesName, store,  
    486486            cCount[i], zCount[i], tCount[i], sizeZ[i], sizeC[i], sizeT[i],  
    487487            fi, r, fs, options); 
    488           showStack(stackO, currentFile + " - " + seriesName, store,  
     488          showStack(stackO, currentFile, seriesName, store,  
    489489            cCount[i], zCount[i], tCount[i], sizeZ[i], sizeC[i], sizeT[i],  
    490490            fi, r, fs, options); 
     
    581581   * the specified parameters and import options. 
    582582   */ 
    583   private void showStack(ImageStack stack, String label, 
     583  private void showStack(ImageStack stack, String file, String series, 
    584584    OMEXMLMetadataStore store, int cCount, int zCount, int tCount, 
    585585    int sizeZ, int sizeC, int sizeT, FileInfo fi, IFormatReader r, 
     
    589589    if (stack == null) return; 
    590590    if (!options.isMergeChannels() && options.isSplitWindows()) { 
    591       slice(stack, label, sizeZ, sizeC, sizeT, fi, r, fs, options); 
     591      slice(stack, file, series, sizeZ, sizeC, sizeT, fi, r, fs, options); 
    592592    } 
    593593    else { 
    594       ImagePlus imp = new ImagePlus(label, stack); 
     594      ImagePlus imp = new ImagePlus(file + " - " + series, stack); 
     595      imp.setProperty("Info", "File full path=" + file +  
     596        "\nSeries name=" + series + "\n"); 
    595597 
    596598      // retrieve the spatial calibration information, if available 
     
    603605 
    604606  /** Opens each channel of the source stack in a separate window. */ 
    605   private void slice(ImageStack is, String label, int z, int c, int t,  
    606     FileInfo fi, IFormatReader r, FileStitcher fs, ImporterOptions options) 
     607  private void slice(ImageStack is, String file, String series, int z, int c,  
     608    int t, FileInfo fi, IFormatReader r, FileStitcher fs,  
     609    ImporterOptions options) 
    607610    throws FormatException, IOException 
    608611  { 
     
    642645 
    643646    for (int i=0; i<newStacks.length; i++) { 
    644       ImagePlus imp = new ImagePlus(label + " - Ch" + (i+1), newStacks[i]); 
     647      ImagePlus imp = new ImagePlus(file + " - " + series + " - Ch" + (i+1),  
     648        newStacks[i]); 
     649      imp.setProperty("Info", "File full path=" + file + 
     650        "\nSeries name=" + series + "\n"); 
    645651      applyCalibration((OMEXMLMetadataStore) r.getMetadataStore(), imp, 
    646652        r.getSeries()); 
Note: See TracChangeset for help on using the changeset viewer.