loci.formats.in

## Class ZeissTIFFHandler

- java.lang.Object
- - org.xml.sax.helpers.DefaultHandler
  - - loci.formats.in.ZeissTIFFHandler

- All Implemented Interfaces:
    org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

      public class ZeissTIFFHandler
      extends org.xml.sax.helpers.DefaultHandler

  SAX handler for parsing XML in Zeiss TIFF files.
  Author:
    Roger Leigh

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `class` | `ZeissTIFFHandler.Plane` Metadata for a single image plane.
    `(package private) class` | `ZeissTIFFHandler.Scaling` Scaling metadata.
    `(package private) class` | `ZeissTIFFHandler.Tag` Content of a single tag from a Tags block.
    `(package private) class` | `ZeissTIFFHandler.TagSet` A collection of tags from a single Tags block.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private java.lang.String` | `cdata`
    `private BaseZeissReader.Layer` | `current_layer`
    `private ZeissTIFFHandler.Scaling` | `current_scaling`
    `private BaseZeissReader.Shape` | `current_shape`
    `private BaseZeissReader.Tag` | `current_tag`
    `private ZeissTIFFHandler.TagSet` | `current_tagset`
    `(package private) int` | `layer_count`
    `java.util.ArrayList<BaseZeissReader.Layer>` | `layers`
    `private static org.slf4j.Logger` | `LOGGER`
    `ZeissTIFFHandler.TagSet` | `main_tagset`
    `private java.util.Stack<java.lang.String>` | `nameStack`
    `private java.util.Set<java.lang.String>` | `planeNames`
    `java.util.ArrayList<ZeissTIFFHandler.Plane>` | `planes`
    `(package private) BaseZeissReader` | `reader`
    `java.util.ArrayList<ZeissTIFFHandler.Scaling>` | `scalings`
    `(package private) int` | `shape_count`
    `(package private) int` | `tag_count`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ZeissTIFFHandler(ZeissTIFFReader reader)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `characters(char[] ch, int start, int length)`
    `void` | `endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)`
    `protected static int` | `parseColor(byte r, byte g, byte b)`
    `private static double` | `parseDouble(java.lang.String number)` Parse a Double from a String.
    `void` | `startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes)`
    `java.lang.String` | `toString()`

    - ### Methods inherited from class org.xml.sax.helpers.DefaultHandler

      `endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### LOGGER

          private static final org.slf4j.Logger LOGGER

    - #### reader

          BaseZeissReader reader

    - #### nameStack

          private java.util.Stack<java.lang.String> nameStack

    - #### cdata

          private java.lang.String cdata

    - #### main_tagset

          public ZeissTIFFHandler.TagSet main_tagset

    - #### planes

          public java.util.ArrayList<ZeissTIFFHandler.Plane> planes

    - #### scalings

          public java.util.ArrayList<ZeissTIFFHandler.Scaling> scalings

    - #### layers

          public java.util.ArrayList<BaseZeissReader.Layer> layers

    - #### current_tagset

          private ZeissTIFFHandler.TagSet current_tagset

    - #### current_tag

          private BaseZeissReader.Tag current_tag

    - #### current_scaling

          private ZeissTIFFHandler.Scaling current_scaling

    - #### current_layer

          private BaseZeissReader.Layer current_layer

    - #### current_shape

          private BaseZeissReader.Shape current_shape

    - #### planeNames

          private java.util.Set<java.lang.String> planeNames

    - #### tag_count

          int tag_count

    - #### layer_count

          int layer_count

    - #### shape_count

          int shape_count

  - ### Constructor Detail

    - #### ZeissTIFFHandler

          ZeissTIFFHandler(ZeissTIFFReader reader)

  - ### Method Detail

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### endElement

          public void endElement(java.lang.String uri,
                                 java.lang.String localName,
                                 java.lang.String qName)

      Specified by:
        `endElement` in interface `org.xml.sax.ContentHandler`
      Overrides:
        `endElement` in class `org.xml.sax.helpers.DefaultHandler`

    - #### characters

          public void characters(char[] ch,
                                 int start,
                                 int length)

      Specified by:
        `characters` in interface `org.xml.sax.ContentHandler`
      Overrides:
        `characters` in class `org.xml.sax.helpers.DefaultHandler`

    - #### startElement

          public void startElement(java.lang.String uri,
                                   java.lang.String localName,
                                   java.lang.String qName,
                                   org.xml.sax.Attributes attributes)

      Specified by:
        `startElement` in interface `org.xml.sax.ContentHandler`
      Overrides:
        `startElement` in class `org.xml.sax.helpers.DefaultHandler`

    - #### parseDouble

          private static double parseDouble(java.lang.String number)

      Parse a Double from a String. Unlike the standard method, this one replaces commas with decimal points (if present).
      Parameters:
        `number` - the number to parse
      Returns:
        a Double. 0 if number was null.

    - #### parseColor

          protected static int parseColor(byte r,
                                          byte g,
                                          byte b)

Copyright © 2026 Open Microscopy Environment