Changeset 5720 for branches/4.1


Ignore:
Timestamp:
11/25/09 16:12:07 (11 years ago)
Author:
melissa
Message:
  • Added a bunch of status messages to FlexReader.
  • Tweaked IFD.getIFDTextValue to correctly create a String from an array of shorts.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/4.1/components/bio-formats/src/loci/formats/in/FlexReader.java

    r5677 r5720  
    262262  private void initResFile(String id) throws FormatException, IOException { 
    263263    debug("initResFile(" + id + ")"); 
     264    status("Initializing .res file"); 
    264265    Location thisFile = new Location(id).getAbsoluteFile(); 
    265266    Location parent = thisFile.getParentFile(); 
    266267    debug("  Looking for an .mea file in " + parent.getAbsolutePath()); 
     268    status("Looking for corresponding .mea file"); 
    267269    String[] list = parent.list(); 
    268270    for (String file : list) { 
     
    283285  private void initMeaFile(String id) throws FormatException, IOException { 
    284286    debug("initMeaFile(" + id + ")"); 
     287    status("Initializing .mea file"); 
    285288    Location file = new Location(id).getAbsoluteFile(); 
    286289    if (!measurementFiles.contains(file.getAbsolutePath())) { 
     
    290293    // parse the .mea file to get a list of .flex files 
    291294    MeaHandler handler = new MeaHandler(); 
     295    status("Reading contents of .mea file"); 
    292296    String xml = DataTools.readFile(id); 
     297    status("Parsing XML from .mea file"); 
    293298    XMLTools.parseXML(xml, handler); 
    294299 
     
    296301    if (flex.size() == 0) { 
    297302      debug("Could not build .flex list from .mea."); 
     303      status("Building list of valid .flex files"); 
    298304      String[] files = findFiles(file); 
    299305      if (files != null) { 
     
    308314    } 
    309315    else { 
     316      status("Looking for corresponding .res file"); 
    310317      String[] files = findFiles(file, new String[] {RES_SUFFIX}); 
    311318      if (files != null) { 
     
    327334  private void initFlexFile(String id) throws FormatException, IOException { 
    328335    debug("initFlexFile(" + id + ")"); 
     336    status("Initializing .flex file"); 
    329337    boolean doGrouping = true; 
    330338 
    331339    Location currentFile = new Location(id).getAbsoluteFile(); 
    332340 
     341    status("Storing well indices"); 
    333342    try { 
    334343      String name = currentFile.getName(); 
     
    342351    } 
    343352 
     353    status("Looking for other .flex files"); 
    344354    if (!isGroupFiles()) doGrouping = false; 
    345355 
     
    363373      new FilterMetadata(getMetadataStore(), isMetadataFiltered()); 
    364374 
     375    status("Making sure that all .flex files are valid"); 
    365376    Vector<String> flex = new Vector<String>(); 
    366377    if (doGrouping) { 
     
    393404 
    394405  private void populateMetadataStore(MetadataStore store) { 
     406    status("Populating MetadataStore"); 
    395407    MetadataTools.populatePixels(store, this, true); 
    396408    String instrumentID = MetadataTools.createLSID("Instrument", 0); 
     
    522534    throws FormatException, IOException 
    523535  { 
     536    status("Parsing .flex file (well " + (wellRow + 'A') + (wellCol + 1) + ")"); 
    524537    debug("Parsing .flex file associated with well row " + wellRow + 
    525538      ", column " + wellCol); 
     
    555568    DefaultHandler handler = 
    556569      new FlexHandler(n, f, store, firstFile, currentWell); 
     570    status("Parsing XML in .flex file"); 
    557571    XMLTools.parseXML(xml.getBytes(), handler); 
    558572 
     
    560574 
    561575    int totalPlanes = getSeriesCount() * getImageCount(); 
     576 
     577    status("Populating pixel scaling factors"); 
    562578 
    563579    // verify factor count 
     
    611627    throws FormatException 
    612628  { 
     629    status("Populating core metadata"); 
    613630    debug("Populating core metadata for well row " + wellRow + ", column " + 
    614631      wellCol); 
     
    720737    debug("findFiles(" + baseFile.getAbsolutePath() + ")"); 
    721738 
     739    status("Looking for files that are in the same dataset as " + 
     740      baseFile.getAbsolutePath()); 
    722741    Vector<String> fileList = new Vector<String>(); 
    723742 
     
    866885    throws FormatException, IOException 
    867886  { 
     887    status("Grouping together files in the same dataset"); 
    868888    HashMap<String, String> v = new HashMap<String, String>(); 
    869889    for (String file : fileList) { 
     
    907927        wellNumber[currentWell][1] = col; 
    908928        s = new RandomAccessInputStream(flexFiles[row][col]); 
     929        status("Parsing IFDs for well " + (row + 'A') + (col + 1)); 
    909930        TiffParser tp = new TiffParser(s); 
    910931        ifds[row][col] = tp.getIFDs(); 
Note: See TracChangeset for help on using the changeset viewer.