Changeset 6357


Ignore:
Timestamp:
05/21/10 09:12:18 (10 years ago)
Author:
melissa
Message:

Ported r6356 to 4.2 branch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/4.2/components/bio-formats/src/loci/formats/in/LeicaReader.java

    r6315 r6357  
    5454import ome.xml.r201004.primitives.PositiveInteger; 
    5555 
     56import org.slf4j.Logger; 
     57import org.slf4j.LoggerFactory; 
     58 
    5659/** 
    5760 * LeicaReader is the file format reader for Leica files. 
     
    6669 
    6770  // -- Constants - 
     71 
     72  private static final Logger LOGGER = 
     73    LoggerFactory.getLogger(LeicaReader.class); 
    6874 
    6975  public static final String[] LEI_SUFFIX = {"lei"}; 
     
    10331039    in.skipBytes(4); 
    10341040 
     1041    long initialOffset = in.getFilePointer(); 
     1042    long elementOffset = 0; 
     1043 
     1044    LOGGER.trace("Element LOOP; series {} at offset", series, initialOffset); 
    10351045    for (int j=0; j<nElements; j++) { 
    1036       in.seek(24 + j * cbElements); 
     1046      elementOffset = initialOffset + j * cbElements; 
     1047      LOGGER.trace("Seeking to: {}", elementOffset); 
     1048      in.seek(elementOffset); 
    10371049      String contentID = getString(128); 
     1050      LOGGER.trace("contentID: {}", contentID); 
    10381051      String description = getString(64); 
     1052      LOGGER.trace("description: {}", description); 
    10391053      String data = getString(64); 
    10401054      int dataType = in.readShort(); 
     1055      LOGGER.trace("dataType: {}", dataType); 
    10411056      in.skipBytes(6); 
    10421057 
     
    10641079      } 
    10651080 
    1066       if (data.trim().length() == 0) continue; 
     1081      LOGGER.trace("data: {}", data); 
     1082      if (data.trim().length() == 0) { 
     1083        LOGGER.trace("Zero length dat string, continuing..."); 
     1084        continue; 
     1085      } 
    10671086 
    10681087      String[] tokens = contentID.split("\\|"); 
    10691088 
     1089      LOGGER.trace("Parsing tokens: {}", tokens); 
    10701090      if (tokens[0].startsWith("CDetectionUnit")) { 
    10711091        // detector information 
Note: See TracChangeset for help on using the changeset viewer.