Changeset 5717


Ignore:
Timestamp:
11/23/09 15:06:02 (10 years ago)
Author:
melissa
Message:

Merged r5714 into 4.1 branch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/4.1/components/bio-formats/utils/EditImageName.java

    r5617 r5717  
    55import loci.formats.ImageReader; 
    66import loci.formats.MetadataTools; 
    7 import loci.formats.meta.MetadataRetrieve; 
    8 import loci.formats.meta.MetadataStore; 
     7import loci.formats.meta.IMetadata; 
    98 
    109/** 
     
    2423    ImageReader reader = new ImageReader(); 
    2524    // record metadata to OME-XML format 
    26     reader.setMetadataStore(MetadataTools.createOMEXMLMetadata()); 
     25    IMetadata omexmlMeta = MetadataTools.createOMEXMLMetadata(); 
     26    reader.setMetadataStore(omexmlMeta); 
    2727    String id = args[0]; 
    2828    System.out.print("Reading metadata "); 
    2929    reader.setId(id); 
    30     MetadataStore omexmlMeta = reader.getMetadataStore(); 
    3130    System.out.println(" [done]"); 
    3231 
    3332    // get image name 
    34     String name = ((MetadataRetrieve) omexmlMeta).getImageName(0); 
     33    String name = omexmlMeta.getImageName(0); 
    3534    System.out.println("Initial Image name = " + name); 
    3635    // change image name (reverse it) 
     
    4948    // output full OME-XML block 
    5049    System.out.println("Full OME-XML dump:"); 
    51     String xml = MetadataTools.getOMEXML((MetadataRetrieve) omexmlMeta); 
     50    String xml = MetadataTools.getOMEXML(omexmlMeta); 
    5251    System.out.println(xml); 
    5352  } 
Note: See TracChangeset for help on using the changeset viewer.