Changeset 6306


Ignore:
Timestamp:
05/13/10 12:35:13 (10 years ago)
Author:
melissa
Message:

Exported OME-XML files can now be read.

File:
1 edited

Legend:

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

    r6272 r6306  
    8989  private Vector<Long> binDataLengths; 
    9090  private Vector<String> compression; 
     91  private Vector<Boolean> bigEndian; 
    9192 
    9293  private String omexml; 
     
    243244      binDataOffsets = null; 
    244245      binDataLengths = null; 
     246      bigEndian = null; 
    245247      omexml = null; 
    246248      hasSPW = false; 
     
    260262    binDataLengths = new Vector<Long>(); 
    261263    compression = new Vector<String>(); 
     264    bigEndian = new Vector<Boolean>(); 
    262265 
    263266    DefaultHandler handler = new OMEXMLHandler(); 
     
    301304    int oldSeries = getSeries(); 
    302305 
     306    int imageIndex = 0; 
    303307    for (int i=0; i<numDatasets; i++) { 
    304308      setSeries(i); 
     
    314318        throw new FormatException("Image dimensions not found"); 
    315319      } 
    316       Boolean endian = omexmlMeta.getPixelsBinDataBigEndian(i, 0); 
     320 
     321      Boolean endian = bigEndian.get(imageIndex); 
    317322      String pixType = omexmlMeta.getPixelsType(i).toString(); 
    318323      core[i].dimensionOrder = omexmlMeta.getPixelsDimensionOrder(i).toString(); 
     
    330335      core[i].pixelType = FormatTools.pixelTypeFromString(pixType); 
    331336      core[i].orderCertain = true; 
     337      imageIndex += core[i].imageCount; 
    332338    } 
    333339    setSeries(oldSeries); 
     
    412418        compression.add(compress == null ? "" : compress); 
    413419        binDataChars = 0; 
     420        String endian = attributes.getValue("BigEndian"); 
     421        bigEndian.add(new Boolean(endian)); 
    414422      } 
    415423 
Note: See TracChangeset for help on using the changeset viewer.