Changeset 6440


Ignore:
Timestamp:
06/02/10 08:50:47 (9 years ago)
Author:
callan
Message:

Fixing issues with endianness parsing for OME-TIFFs. Re-run of code generation ( ome-xml:r624)

Location:
trunk/components/bio-formats/src/loci/formats
Files:
5 edited

Legend:

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

    r6414 r6440  
    555555        } 
    556556 
    557         core[s].littleEndian = 
    558           !meta.getPixelsBinDataBigEndian(i, 0).booleanValue(); 
    559         boolean tiffLittleEndian = firstIFD.isLittleEndian(); 
    560         if (core[s].littleEndian != tiffLittleEndian) { 
    561           LOGGER.warn("BigEndian mismatch: OME={}, TIFF={}", 
    562             !core[s].littleEndian, !tiffLittleEndian); 
    563         } 
     557        if (meta.getPixelsBinDataCount(i) > 1) { 
     558          LOGGER.warn("OME-TIFF Pixels element contains BinData elements! " + 
     559                      "Ignoring."); 
     560        } 
     561        core[s].littleEndian = firstIFD.isLittleEndian(); 
    564562        core[s].interleaved = false; 
    565563        core[s].indexed = photo == PhotoInterp.RGB_PALETTE && 
  • trunk/components/bio-formats/src/loci/formats/meta/AggregateMetadata.java

    r6413 r6440  
    9999  // - Entity counting - 
    100100 
     101  /* @see MetadataRetrieve#getPixelsBinDataCount(int) */ 
     102  public int getPixelsBinDataCount(int imageIndex) { 
     103    for (Iterator iter = delegates.iterator(); iter.hasNext();) { 
     104      Object o = iter.next(); 
     105      if (o instanceof MetadataRetrieve) { 
     106        MetadataRetrieve retrieve = (MetadataRetrieve) o; 
     107        int result = retrieve.getPixelsBinDataCount(imageIndex); 
     108        if (result >= 0) return result; 
     109      } 
     110    } 
     111    return -1; 
     112  } 
     113 
    101114  /* @see MetadataRetrieve#getBooleanAnnotationCount() */ 
    102115  public int getBooleanAnnotationCount() { 
  • trunk/components/bio-formats/src/loci/formats/meta/DummyMetadata.java

    r6413 r6440  
    3131 
    3232package loci.formats.meta; 
     33 
     34import java.util.Iterator; 
    3335 
    3436import ome.xml.r201004.Image; 
     
    5860  // - Entity counting - 
    5961 
     62  /* @see MetadataRetrieve#getPixelsBinDataCount(int) */ 
     63  public int getPixelsBinDataCount(int imageIndex) { 
     64    return -1; 
     65  } 
     66 
    6067  /* @see MetadataRetrieve#getBooleanAnnotationCount() */ 
    6168  public int getBooleanAnnotationCount() { 
  • trunk/components/bio-formats/src/loci/formats/meta/MetadataRetrieve.java

    r6428 r6440  
    3333 * 
    3434 * THIS IS AUTOMATICALLY GENERATED CODE.  DO NOT MODIFY. 
    35  * Created by callan via xsd-fu on 2010-06-01 11:44:50.965032 
     35 * Created by callan via xsd-fu on 2010-06-02 14:15:02.248588 
    3636 * 
    3737 *----------------------------------------------------------------------------- 
     
    7373public interface MetadataRetrieve { 
    7474 
    75         // -- Entity counting -- 
     75        // -- Entity counting (manual definitions) -- 
     76 
     77        int getPixelsBinDataCount(int imageIndex); 
     78 
     79        // -- Entity counting (code generated definitions) -- 
    7680 
    7781        // AnnotationRef entity counting 
  • trunk/components/bio-formats/src/loci/formats/ome/OMEXMLMetadataImpl.java

    r6430 r6440  
    3333 * 
    3434 * THIS IS AUTOMATICALLY GENERATED CODE.  DO NOT MODIFY. 
    35  * Created by melissa via xsd-fu on 2010-06-01 11:06:50.718672 
     35 * Created by callan via xsd-fu on 2010-06-02 14:15:07.135315 
    3636 * 
    3737 *----------------------------------------------------------------------------- 
     
    9797        } 
    9898 
    99         // -- Entity counting -- 
     99        // -- Entity counting (manual definitions) -- 
     100 
     101        public int getPixelsBinDataCount(int imageIndex) 
     102        { 
     103                return root.getImage(imageIndex).getPixels().sizeOfBinDataList(); 
     104        } 
     105 
     106        // -- Entity counting (code generated definitions) -- 
    100107 
    101108        // AnnotationRef entity counting 
     
    16081615        // ExperimenterRef property storage 
    16091616        // 
    1610         // Indexes: {u'Project': [u'int projectIndex'], u'MicrobeamManipulation': [u'int experimentIndex', u'int microbeamManipulationIndex'], u'Image': [u'int imageIndex'], u'Experiment': [u'int experimentIndex'], u'Dataset': [u'int datasetIndex']} 
     1617        // Indexes: {u'Project': [u'int projectIndex'], u'Image': [u'int imageIndex'], u'Experiment': [u'int experimentIndex'], u'MicrobeamManipulation': [u'int experimentIndex', u'int microbeamManipulationIndex'], u'Dataset': [u'int datasetIndex']} 
    16111618        // {u'Project': {u'OME': None}, u'Image': {u'OME': None}, u'Dataset': {u'OME': None}, u'Experiment': {u'OME': None}, u'MicrobeamManipulation': {u'Experiment': {u'OME': None}}} 
    16121619        // Is multi path? True 
Note: See TracChangeset for help on using the changeset viewer.