Changeset 3193


Ignore:
Timestamp:
09/26/07 10:33:07 (12 years ago)
Author:
curtis
Message:

Print series names in core metadata listing if metadata store is set.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/tools/ImageInfo.java

    r3180 r3193  
    203203 
    204204    if (!normalize && reader.getPixelType() == FormatTools.FLOAT) { 
    205       throw new FormatException("Sorry, unnormalized floating point " + 
    206         "data is not supported. Please use the '-normalize' option."); 
     205      LogTools.println("Warning: Java does not support " + 
     206        "display of unnormalized floating point data."); 
     207      LogTools.println("Please use the '-normalize' option " + 
     208        "to avoid receiving a cryptic exception."); 
    207209    } 
    208210 
     
    242244    int seriesCount = reader.getSeriesCount(); 
    243245    LogTools.println("Series count = " + seriesCount); 
     246    MetadataStore ms = reader.getMetadataStore(); 
     247    MetadataRetrieve mr = ms instanceof MetadataRetrieve ? 
     248      (MetadataRetrieve) ms : null; 
    244249    for (int j=0; j<seriesCount; j++) { 
    245250      reader.setSeries(j); 
     
    266271 
    267272      // output basic metadata for series #i 
    268       LogTools.println("Series #" + j + ":"); 
     273      String seriesName = mr == null ? null : mr.getImageName(new Integer(j)); 
     274      LogTools.println("Series #" + j + 
     275        (seriesName == null ? "" : " -- " + seriesName) + ":"); 
    269276      LogTools.println("\tImage count = " + imageCount); 
    270277      LogTools.print("\tRGB = " + rgb + " (" + rgbChanCount + ")"); 
     
    527534      LogTools.println(); 
    528535      LogTools.println("Generating OME-XML"); 
    529       MetadataStore ms = reader.getMetadataStore(); 
    530536      if (MetadataTools.isOMEXMLMetadata(ms)) { 
    531537        String xml = MetadataTools.getOMEXML((MetadataRetrieve) ms); 
Note: See TracChangeset for help on using the changeset viewer.