Changeset 7037


Ignore:
Timestamp:
10/05/10 12:48:29 (9 years ago)
Author:
melissa
Message:

One more very temporary fix that prevents too many Channels from being populated. Hopefully closes #2939.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/components/bio-formats/src/loci/formats/in/LIFReader.java

    r7010 r7037  
    4141import loci.formats.ImageTools; 
    4242import loci.formats.MetadataTools; 
     43import loci.formats.meta.IMetadata; 
    4344import loci.formats.meta.MetadataStore; 
    4445import loci.formats.services.OMEXMLService; 
     
    334335  /** Parses a string of XML and puts the values in a Hashtable. */ 
    335336  private void initMetadata(String xml) throws FormatException, IOException { 
     337    IMetadata omexml = MetadataTools.createOMEXMLMetadata(); 
    336338    MetadataStore store = makeFilterMetadata(); 
    337339    MetadataLevel level = getMetadataOptions().getMetadataLevel(); 
    338     LeicaHandler handler = new LeicaHandler(store, level); 
     340    LeicaHandler handler = new LeicaHandler(omexml, level); 
    339341 
    340342    // the XML blocks stored in a LIF file are invalid, 
     
    385387    } 
    386388 
    387     MetadataTools.populatePixels(store, this, true, false); 
    388  
    389389    // remove any Channels that do not have an ID 
    390390 
     
    392392    try { 
    393393      service = new ServiceFactory().getInstance(OMEXMLService.class); 
    394       if (service.isOMEXMLRoot(store.getRoot())) { 
    395         OME root = (OME) store.getRoot(); 
     394      if (service.isOMEXMLRoot(omexml.getRoot())) { 
     395        OME root = (OME) omexml.getRoot(); 
    396396        for (int i=0; i<getSeriesCount(); i++) { 
    397397          setSeries(i); 
     
    407407        } 
    408408        setSeries(0); 
    409         store.setRoot(root); 
     409        omexml.setRoot(root); 
     410        service.convertMetadata(omexml, store); 
    410411      } 
    411412    } 
     
    413414      LOGGER.trace("Failed to remove channels", e); 
    414415    } 
     416 
     417    MetadataTools.populatePixels(store, this, true, false); 
    415418  } 
    416419 
Note: See TracChangeset for help on using the changeset viewer.