Changeset 6877


Ignore:
Timestamp:
09/03/10 09:28:30 (9 years ago)
Author:
melissa
Message:
  • Return blank planes if pixel data is missing from an OME-XML file.
  • Reverted changes to ChannelFiller from r6876.
Location:
trunk/components/bio-formats/src/loci/formats
Files:
2 edited

Legend:

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

    r6876 r6877  
    2525 
    2626import java.io.IOException; 
    27  
    28 import org.slf4j.Logger; 
    29 import org.slf4j.LoggerFactory; 
    3027 
    3128import loci.formats.meta.MetadataStore; 
     
    4441public class ChannelFiller extends ReaderWrapper { 
    4542 
    46   // -- Constants -- 
    47  
    48   private static final Logger LOGGER = 
    49     LoggerFactory.getLogger(ChannelFiller.class); 
    50  
    5143  // -- Utility methods -- 
    5244 
     
    268260    // NB: For some formats, LUTs are plane-specific and will 
    269261    // only be available after opening a particular image plane. 
    270     try { 
    271       reader.openBytes(0, 0, 0, 1, 1); // read a single pixel, for performance 
    272     } catch (Exception e) { 
    273       LOGGER.warn("Unable to read initial single pixel.", e); 
    274     } 
     262    reader.openBytes(0, 0, 0, 1, 1); // read a single pixel, for performance 
    275263    lut8 = reader.get8BitLookupTable(); 
    276264    if (lut8 != null) return lut8.length; 
  • trunk/components/bio-formats/src/loci/formats/in/OMEXMLReader.java

    r6862 r6877  
    154154 
    155155    byte[] pixels = new Base64Codec().decompress(in, options); 
     156 
     157    // return a blank plane if no pixel data was stored 
     158    if (pixels.length == 0) { 
     159      LOGGER.debug("No pixel data for plane #{}", no); 
     160      return buf; 
     161    } 
     162 
    156163    // TODO: Create a method uncompress to handle all compression methods 
    157164    if (compress.equals("bzip2")) { 
Note: See TracChangeset for help on using the changeset viewer.