Ignore:
Timestamp:
06/03/10 13:00:02 (10 years ago)
Author:
melissa
Message:

Synced up export/MetadataConverter fixes between trunk and 4.2. OME-TIFF export and re-import should be working again.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/4.2/components/loci-plugins/src/loci/plugins/out/Exporter.java

    r6457 r6459  
    5858import loci.formats.IFormatWriter; 
    5959import loci.formats.ImageWriter; 
     60import loci.formats.MetadataTools; 
    6061import loci.formats.gui.AWTImageTools; 
    6162import loci.formats.gui.ExtensionFileFilter; 
     
    278279      store.setPixelsSizeT(new PositiveInteger(imp.getNFrames()), 0); 
    279280 
     281      if (store.getImageID(0) == null) { 
     282        store.setImageID(MetadataTools.createLSID("Image", 0), 0); 
     283      } 
     284      if (store.getPixelsID(0) == null) { 
     285        store.setPixelsID(MetadataTools.createLSID("Pixels", 0), 0); 
     286      } 
     287 
    280288      if (store.getPixelsType(0) == null) { 
    281289        try { 
     
    296304        catch (EnumerationException e) { } 
    297305      } 
    298       if (store.getChannelSamplesPerPixel(0, 0) == null) { 
     306      if (store.getChannelCount(0) == 0 || 
     307        store.getChannelSamplesPerPixel(0, 0) == null) 
     308      { 
    299309        store.setChannelSamplesPerPixel(new Integer(channels), 0, 0); 
     310      } 
     311      for (int channel=0; channel<store.getChannelCount(0); channel++) { 
     312        if (store.getChannelID(0, channel) == null) { 
     313          String lsid = MetadataTools.createLSID("Channel", 0, channel); 
     314          store.setChannelID(lsid, 0, channel); 
     315        } 
    300316      } 
    301317 
Note: See TracChangeset for help on using the changeset viewer.