Changeset 3449


Ignore:
Timestamp:
12/06/07 15:18:02 (12 years ago)
Author:
melissa
Message:

Updated MetadataStore population logic to handle multiple series.

File:
1 edited

Legend:

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

    r3446 r3449  
    9999  private String[] seriesBlocks; 
    100100  private Vector fileVector; 
     101  private Vector seriesNames; 
    101102 
    102103  // -- Constructors -- 
     
    859860      seriesBlocks = (String[]) sBlock.toArray(new String[0]); 
    860861      fileVector = new Vector(); 
     862      seriesNames = new Vector(); 
    861863 
    862864      String file = fp.getFiles()[0]; 
     
    11481150    boolean little = reader.isLittleEndian(); 
    11491151    MetadataStore s = reader.getMetadataStore(); 
    1150     s.setPixels(new Integer(core.sizeX[sno]), new Integer(core.sizeY[sno]), 
    1151       new Integer(core.sizeZ[sno]), new Integer(core.sizeC[sno]), 
    1152       new Integer(core.sizeT[sno]), new Integer(pixelType), 
    1153       new Boolean(!little), core.currentOrder[sno], new Integer(sno), null); 
     1152    for (int i=0; i<core.sizeX.length; i++) { 
     1153      s.setImage((String) seriesNames.get(i), null, null, new Integer(i)); 
     1154    } 
     1155    FormatTools.populatePixels(s, this); 
    11541156  } 
    11551157 
     
    12501252      if (blockNum == seriesBlocks.length - 1) { 
    12511253        fileVector.add(newPattern.getFiles()); 
     1254        String name = newPattern.getPattern(); 
     1255        if (name.indexOf(File.separator) != -1) { 
     1256          name = name.substring(name.lastIndexOf(File.separator) + 1); 
     1257        } 
     1258        seriesNames.add(name); 
    12521259      } 
    12531260      else { 
Note: See TracChangeset for help on using the changeset viewer.