loci.formats

## Class FormatTools

- java.lang.Object
- - loci.formats.FormatTools

-     public final class FormatTools
      extends java.lang.Object

  A utility class for format reader and writer implementations.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String[]` | `ALL_DOMAINS` List of all supported domains.
    `static java.lang.String` | `ASTRONOMY_DOMAIN` Identifies the astronomy domain.
    `static int` | `BIT` Identifies the BIT data type used to store pixel values.
    `static int` | `CAN_GROUP`
    `static int` | `CANNOT_GROUP`
    `static java.lang.String` | `CHANNEL` Identifies the Channel dimensional type, representing a generic channel dimension.
    `static java.lang.String` | `CHANNEL_NAME`
    `static java.lang.String` | `CHANNEL_NUM`
    `static java.lang.String` | `CREATOR` Value to use when setting creator/software fields in exported files.
    `static java.lang.String` | `DATE` Date on which this release was built.
    `static int` | `DOUBLE` Identifies the DOUBLE data type used to store pixel values.
    `static java.lang.String` | `EM_DOMAIN` Identifies the electron microscopy domain.
    `static java.lang.String` | `FLIM_DOMAIN` Identifies the fluorescence-lifetime domain.
    `static int` | `FLOAT` Identifies the FLOAT data type used to store pixel values.
    `static java.lang.String` | `FREQUENCY` Identifies the Frequency dimensional type, representing a dimension consisting of frequencies.
    `static java.lang.String` | `GEL_DOMAIN` Identifies the gel and blot imaging domain.
    `static java.lang.String` | `GRAPHICS_DOMAIN` Identifies the graphics domain.
    `static java.lang.String` | `HCS_DOMAIN` Identifies the high content screening domain.
    `static java.lang.String` | `HISTOLOGY_DOMAIN` Identifies the histology domain.
    `static java.lang.String` | `ILLUMINATION` Identifies the Illumination dimensional type, representing a dimension consisting of illuminations.
    `static int` | `INT16` Identifies the INT16 data type used to store pixel values.
    `static int` | `INT32` Identifies the INT32 data type used to store pixel values.
    `static int` | `INT8` Identifies the INT8 data type used to store pixel values.
    `static java.lang.String` | `LIFETIME` Identifies the Lifetime dimensional type, representing a dimension consisting of a lifetime histogram.
    `static java.lang.String` | `LM_DOMAIN` Identifies the light microscopy domain.
    `protected static org.slf4j.Logger` | `LOGGER`
    `static java.lang.String` | `MEDICAL_DOMAIN` Identifies the medical imaging domain.
    `static int` | `MUST_GROUP` File grouping options.
    `static java.lang.String[]` | `NON_GRAPHICS_DOMAINS` List of non-graphics domains.
    `static java.lang.String[]` | `NON_HCS_DOMAINS` List of non-HCS domains.
    `static java.lang.String[]` | `NON_SPECIAL_DOMAINS` List of domains that do not require special handling.
    `static java.lang.String` | `PHASE` Identifies the Phase dimensional type, representing a dimension consisting of phases.
    `private static java.lang.String[]` | `pixelTypes` Human readable pixel type.
    `static java.lang.String` | `POLARIZATION` Identifies the Polarization dimensional type, representing a dimension consisting of polarization states.
    `static java.lang.String` | `PROPERTY_FILE` Deprecated. The property file is no longer used.
    `static java.lang.String` | `ROTATION` Identifies the Rotation dimensional type, representing a dimension consisting of rotations.
    `static java.lang.String` | `SEM_DOMAIN` Identifies the scanning electron microscopy domain.
    `static java.lang.String` | `SERIES_NAME`
    `static java.lang.String` | `SERIES_NUM` Patterns to be used when constructing a pattern for output filenames.
    `static java.lang.String` | `SPECTRA` Identifies the Spectra dimensional type, representing a dimension consisting of spectral channels.
    `static java.lang.String` | `SPM_DOMAIN` Identifies the scanning probe microscopy domain.
    `static java.lang.String` | `T_NUM`
    `static java.lang.String` | `TILE_NUM`
    `static java.lang.String` | `TILE_X`
    `static java.lang.String` | `TILE_Y`
    `static java.lang.String` | `TIMESTAMP`
    `static int` | `UINT16` Identifies the UINT16 data type used to store pixel values.
    `static int` | `UINT32` Identifies the UINT32 data type used to store pixel values.
    `static int` | `UINT8` Identifies the UINT8 data type used to store pixel values.
    `static java.lang.String` | `UNKNOWN_DOMAIN` Identifies an unknown domain.
    `static java.lang.String` | `URL_BIO_FORMATS` URL of Bio-Formats web page.
    `static java.lang.String` | `URL_BIO_FORMATS_LIBRARIES` URL of 'Bio-Formats as a Java Library' web page.
    `static java.lang.String` | `URL_OME_TIFF` URL of OME-TIFF web page.
    `static java.lang.String` | `VCS_REVISION` Current VCS revision.
    `static java.lang.String` | `VCS_SHORT_REVISION` Deprecated. Use the general `VCS_REVISION` field.
    `static java.lang.String` | `VERSION` Version number of this release.
    `static java.util.Properties` | `VERSION_PROPERTIES`
    `static java.lang.String` | `YEAR` Year in which this release was built.
    `static java.lang.String` | `Z_NUM`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `private` | `FormatTools()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `assertId(java.lang.String currentId, boolean notNull, int depth)` Asserts that the current file is either null, or not, according to the given flag.
    `static boolean` | `canUsePrecompressedTiles(IFormatReader reader, IFormatWriter writer, int series, int resolution)` Compare the given reader and writer at the specified series and resolution to see if pre-compressed tiles can be transferred directly from the reader to the writer.
    `static void` | `checkBufferSize(IFormatReader r, int len)`
    `static void` | `checkBufferSize(IFormatReader r, int len, int w, int h)` Checks that the given buffer size is large enough to hold a w * h image as returned by the given reader.
    `static void` | `checkPlaneNumber(IFormatReader r, int no)` Checks that the given plane number is valid for the given reader.
    `static void` | `checkPlaneParameters(IFormatReader r, int no, int bufLength, int x, int y, int w, int h)` Convenience method for checking that the plane number, tile size and buffer sizes are all valid for the given reader.
    `static void` | `checkTileSize(IFormatReader r, int x, int y, int w, int h)` Checks that the given tile size is valid for the given reader.
    `static void` | `convert(IFormatReader input, IFormatWriter output, java.lang.String outputFile)` Convenience method for writing all of the images and metadata obtained from the specified IFormatReader into the specified IFormatWriter.
    `static void` | `convert(java.lang.String input, java.lang.String output)` Convenience method for converting the specified input file to the specified output file.
    `static ome.units.quantity.Angle` | `createAngle(java.lang.Double value, ome.units.unit.Unit<ome.units.quantity.Angle> valueUnit)`
    `static ome.units.quantity.Angle` | `createAngle(java.lang.Integer value, ome.units.unit.Unit<ome.units.quantity.Angle> valueUnit)`
    `static <T extends ome.xml.model.primitives.PrimitiveNumber> ome.units.quantity.Angle` | `createAngle(T value, ome.units.unit.Unit<ome.units.quantity.Angle> valueUnit)`
    `static ome.units.quantity.ElectricPotential` | `createElectricPotential(java.lang.Double value, ome.units.unit.Unit<ome.units.quantity.ElectricPotential> valueUnit)`
    `static ome.units.quantity.ElectricPotential` | `createElectricPotential(java.lang.Integer value, ome.units.unit.Unit<ome.units.quantity.ElectricPotential> valueUnit)`
    `static <T extends ome.xml.model.primitives.PrimitiveNumber> ome.units.quantity.ElectricPotential` | `createElectricPotential(T value, ome.units.unit.Unit<ome.units.quantity.ElectricPotential> valueUnit)`
    `static ome.units.quantity.Frequency` | `createFrequency(java.lang.Double value, ome.units.unit.Unit<ome.units.quantity.Frequency> valueUnit)`
    `static ome.units.quantity.Frequency` | `createFrequency(java.lang.Integer value, ome.units.unit.Unit<ome.units.quantity.Frequency> valueUnit)`
    `static <T extends ome.xml.model.primitives.PrimitiveNumber> ome.units.quantity.Frequency` | `createFrequency(T value, ome.units.unit.Unit<ome.units.quantity.Frequency> valueUnit)`
    `static ome.units.quantity.Length` | `createLength(java.lang.Double value, ome.units.unit.Unit<ome.units.quantity.Length> valueUnit)`
    `static ome.units.quantity.Length` | `createLength(java.lang.Integer value, ome.units.unit.Unit<ome.units.quantity.Length> valueUnit)`
    `static <T extends ome.xml.model.primitives.PrimitiveNumber> ome.units.quantity.Length` | `createLength(T value, ome.units.unit.Unit<ome.units.quantity.Length> valueUnit)`
    `static ome.units.quantity.Power` | `createPower(java.lang.Double value, ome.units.unit.Unit<ome.units.quantity.Power> valueUnit)`
    `static ome.units.quantity.Power` | `createPower(java.lang.Integer value, ome.units.unit.Unit<ome.units.quantity.Power> valueUnit)`
    `static <T extends ome.xml.model.primitives.PrimitiveNumber> ome.units.quantity.Power` | `createPower(T value, ome.units.unit.Unit<ome.units.quantity.Power> valueUnit)`
    `static ome.units.quantity.Pressure` | `createPressure(java.lang.Double value, ome.units.unit.Unit<ome.units.quantity.Pressure> valueUnit)`
    `static ome.units.quantity.Pressure` | `createPressure(java.lang.Integer value, ome.units.unit.Unit<ome.units.quantity.Pressure> valueUnit)`
    `static <T extends ome.xml.model.primitives.PrimitiveNumber> ome.units.quantity.Pressure` | `createPressure(T value, ome.units.unit.Unit<ome.units.quantity.Pressure> valueUnit)`
    `static ome.units.quantity.Temperature` | `createTemperature(java.lang.Double value, ome.units.unit.Unit<ome.units.quantity.Temperature> valueUnit)`
    `static ome.units.quantity.Temperature` | `createTemperature(java.lang.Integer value, ome.units.unit.Unit<ome.units.quantity.Temperature> valueUnit)`
    `static <T extends ome.xml.model.primitives.PrimitiveNumber> ome.units.quantity.Temperature` | `createTemperature(T value, ome.units.unit.Unit<ome.units.quantity.Temperature> valueUnit)`
    `static ome.units.quantity.Time` | `createTime(java.lang.Double value, ome.units.unit.Unit<ome.units.quantity.Time> valueUnit)`
    `static ome.units.quantity.Time` | `createTime(java.lang.Integer value, ome.units.unit.Unit<ome.units.quantity.Time> valueUnit)`
    `static <T extends ome.xml.model.primitives.PrimitiveNumber> ome.units.quantity.Time` | `createTime(T value, ome.units.unit.Unit<ome.units.quantity.Time> valueUnit)`
    `static long[]` | `defaultMinMax(int pixelType)` Get the default range for the specified pixel type.
    `static boolean` | `equalReaders(IFormatReader a, IFormatReader b)` Check if the two given readers are equal.
    `static int` | `getBytesPerPixel(int pixelType)` Retrieves how many bytes per pixel the current plane or section has.
    `static int` | `getBytesPerPixel(java.lang.String pixelType)` Retrieves the number of bytes per pixel in the current plane.
    `static ome.units.quantity.Length` | `getCutIn(java.lang.Double value)`
    `static ome.units.quantity.Length` | `getCutOut(java.lang.Double value)`
    `static ome.units.quantity.Length` | `getEmissionWavelength(java.lang.Double value)`
    `static ome.units.quantity.Length` | `getExcitationWavelength(java.lang.Double value)`
    `static java.lang.String` | `getFilename(int series, int image, IFormatReader r, java.lang.String pattern)`
    `static java.lang.String` | `getFilename(int series, int image, IFormatReader r, java.lang.String pattern, boolean padded)`
    `static java.lang.String` | `getFilename(int series, int image, MetadataRetrieve retrieve, java.lang.String pattern, boolean padded)`
    `static java.lang.String[]` | `getFilenames(java.lang.String pattern, IFormatReader r)`
    `static ome.units.quantity.Length` | `getFontSize(java.lang.Integer value)`
    `static int` | `getImagesPerFile(java.lang.String pattern, IFormatReader r)`
    `static int` | `getIndex(IFormatReader reader, int z, int c, int t)` Gets the rasterized index corresponding to the given Z, C and T coordinates (real sizes).
    `static int` | `getIndex(IFormatReader reader, int z, int c, int t, int moduloZ, int moduloC, int moduloT)` Gets the rasterized index corresponding to the given Z, C, T, ModuloZ, ModuloC and ModuloT coordinates (effective sizes).
    `static int` | `getIndex(java.lang.String order, int zSize, int cSize, int tSize, int num, int z, int c, int t)` Gets the rasterized index corresponding to the given Z, C and T coordinates (real sizes).
    `static int` | `getIndex(java.lang.String order, int zSize, int cSize, int tSize, int moduloZSize, int moduloCSize, int moduloTSize, int num, int z, int c, int t, int moduloZ, int moduloC, int moduloT)` Gets the rasterized index corresponding to the given Z, C, T, ModuloZ, ModuloC, ModuloT coordinates (effective sizes).
    `static ome.xml.model.primitives.PositiveInteger` | `getMaxFieldCount(java.lang.Integer value)`
    `static ome.units.quantity.Length` | `getPhysicalSize(java.lang.Double value, java.lang.String unit)`
    `static ome.units.quantity.Length` | `getPhysicalSizeX(java.lang.Double value)` Formats the input value for the physical size in X into a length in microns
    `static ome.units.quantity.Length` | `getPhysicalSizeX(java.lang.Double value, java.lang.String unit)` Formats the input value for the physical size in X into a length of the given unit.
    `static ome.units.quantity.Length` | `getPhysicalSizeX(java.lang.Double value, ome.units.unit.Unit<ome.units.quantity.Length> unit)` Formats the input value for the physical size in X into a length of the given unit.
    `static ome.units.quantity.Length` | `getPhysicalSizeY(java.lang.Double value)` Formats the input value for the physical size in Y into a length in microns
    `static ome.units.quantity.Length` | `getPhysicalSizeY(java.lang.Double value, java.lang.String unit)` Formats the input value for the physical size in Y into a length of the given unit.
    `static ome.units.quantity.Length` | `getPhysicalSizeY(java.lang.Double value, ome.units.unit.Unit<ome.units.quantity.Length> unit)` Formats the input value for the physical size in Y into a length of the given unit.
    `static ome.units.quantity.Length` | `getPhysicalSizeZ(java.lang.Double value)` Formats the input value for the physical size in Z into a length in microns.
    `static ome.units.quantity.Length` | `getPhysicalSizeZ(java.lang.Double value, java.lang.String unit)` Formats the input value for the physical size in Z into a length of the given unit.
    `static ome.units.quantity.Length` | `getPhysicalSizeZ(java.lang.Double value, ome.units.unit.Unit<ome.units.quantity.Length> unit)` Formats the input value for the physical size in Z into a length of the given unit.
    `static java.lang.String` | `getPixelTypeString(int pixelType)` Takes a pixel type value and gets a corresponding string representation.
    `static int` | `getPlaneSize(IFormatReader r)` Returns the size in bytes of a single plane.
    `static int` | `getPlaneSize(IFormatReader r, int w, int h)` Returns the size in bytes of a w * h tile.
    `static int` | `getRasterLength(int[] lengths)` Computes the number of raster values for a positional array with the given lengths.
    `static IFormatReader` | `getReader(IFormatReader r, java.lang.Class<? extends IFormatReader> c)` Recursively look for the first underlying reader that is an instance of the given class.
    `static int` | `getReorderedIndex(IFormatReader reader, java.lang.String newOrder, int newIndex)` Converts index from the given dimension order to the reader's native one.
    `static int` | `getReorderedIndex(java.lang.String origOrder, java.lang.String newOrder, int zSize, int cSize, int tSize, int num, int newIndex)` Converts index from one dimension order to another.
    `static int` | `getRequiredDirectories(java.lang.String[] files)` Returns the maximum number of directories below the common parent of a list of file paths
    `static ome.units.quantity.Length` | `getStagePosition(java.lang.Double value, java.lang.String unit)` Formats the input value for the stage position into a length of the given unit.
    `static ome.units.quantity.Length` | `getStagePosition(java.lang.Double value, ome.units.unit.Unit<ome.units.quantity.Length> unit)` Formats the input value for the stage position into a length of the given unit.
    `static java.lang.String` | `getTileFilename(int tileX, int tileY, int tileIndex, java.lang.String pattern)`
    `static ome.units.quantity.Time` | `getTime(java.lang.Double value, java.lang.String unit)` Formats the input value for the time into a length of the given unit.
    `static ome.units.quantity.Length` | `getWavelength(java.lang.Double value)`
    `static ome.units.quantity.Length` | `getWavelength(java.lang.Double value, java.lang.String unit)` Formats the input value for the wavelength into a length of the given unit.
    `static java.lang.String` | `getWellName(int row, int col)` Create a simple name for the well at the given row and column.
    `static java.lang.String` | `getWellRowName(int row)` Create a simple name for the given row of wells.
    `static int[]` | `getZCTCoords(IFormatReader reader, int index)` Gets the Z, C and T coordinates corresponding to the given rasterized index value (real sizes).
    `static int[]` | `getZCTCoords(java.lang.String order, int zSize, int cSize, int tSize, int num, int index)` Gets the Z, C and T coordinates corresponding to the given rasterized index value (real sizes).
    `static int[]` | `getZCTCoords(java.lang.String order, int zSize, int cSize, int tSize, int moduloZSize, int moduloCSize, int moduloTSize, int num, int index)` Gets the Z, C and T coordinates corresponding to the given rasterized index value.
    `static int[]` | `getZCTModuloCoords(IFormatReader reader, int index)` Gets the Z, C, T, ModuloZ, ModuloC and ModuloZ coordinates corresponding to the given rasterized index value (effective sizes).
    `static boolean` | `isFloatingPoint(IFormatReader reader)` Determines whether the given reader represents any floating point data.
    `static boolean` | `isFloatingPoint(int pixelType)` Determines whether the given pixel type is floating point or integer.
    `static boolean` | `isPositiveValue(java.lang.Double value)`
    `static boolean` | `isSigned(int pixelType)` Determines whether the given pixel type is signed or unsigned.
    `private static java.util.jar.Manifest` | `loadManifest()`
    `(package private) static java.util.Properties` | `loadProperties()` Deprecated. This method should no longer be used. The properties are now obtained from the jar manifest.
    `(package private) static java.lang.String[]` | `makePixelTypes()`
    `static byte[]` | `openThumbBytes(IFormatReader reader, int no)` Default implementation for `IFormatReader.openThumbBytes(int)`.
    `static ome.units.quantity.Length` | `parseLength(java.lang.String s)` Parse a length composed of a value and an optional unit
    `static ome.units.quantity.Length` | `parseLength(java.lang.String s, java.lang.String defaultUnit)` Parse a length composed of a value and an optional unit
    `static int` | `pixelTypeFromBytes(int bytes, boolean signed, boolean fp)` Returns an appropriate pixel type given the number of bytes per pixel.
    `static int` | `pixelTypeFromString(java.lang.String pixelTypeAsString)` Takes a string value and maps it to one of the pixel type enumerations.
    `static int` | `positionToRaster(int[] lengths, int[] pos)` Computes a unique 1-D index corresponding to the given multidimensional position.
    `static int[]` | `rasterToPosition(int[] lengths, int raster)` Computes a unique N-D position corresponding to the given rasterized index value.
    `static int[]` | `rasterToPosition(int[] lengths, int raster, int[] pos)` Computes a unique N-D position corresponding to the given rasterized index value.
    `static boolean` | `validStream(loci.common.RandomAccessInputStream stream, int len, boolean littleEndian)` Returns true if the given RandomAccessInputStream conatins at least 'len' bytes.

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

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

- - ### Field Detail

    - #### LOGGER

          protected static final org.slf4j.Logger LOGGER

    - #### INT8

          public static final int INT8

      Identifies the INT8 data type used to store pixel values.
      See Also:
        Constant Field Values

    - #### UINT8

          public static final int UINT8

      Identifies the UINT8 data type used to store pixel values.
      See Also:
        Constant Field Values

    - #### INT16

          public static final int INT16

      Identifies the INT16 data type used to store pixel values.
      See Also:
        Constant Field Values

    - #### UINT16

          public static final int UINT16

      Identifies the UINT16 data type used to store pixel values.
      See Also:
        Constant Field Values

    - #### INT32

          public static final int INT32

      Identifies the INT32 data type used to store pixel values.
      See Also:
        Constant Field Values

    - #### UINT32

          public static final int UINT32

      Identifies the UINT32 data type used to store pixel values.
      See Also:
        Constant Field Values

    - #### FLOAT

          public static final int FLOAT

      Identifies the FLOAT data type used to store pixel values.
      See Also:
        Constant Field Values

    - #### DOUBLE

          public static final int DOUBLE

      Identifies the DOUBLE data type used to store pixel values.
      See Also:
        Constant Field Values

    - #### BIT

          public static final int BIT

      Identifies the BIT data type used to store pixel values.
      See Also:
        Constant Field Values

    - #### pixelTypes

          private static final java.lang.String[] pixelTypes

      Human readable pixel type.

    - #### CHANNEL

          public static final java.lang.String CHANNEL

      Identifies the Channel dimensional type, representing a generic channel dimension.
      See Also:
        Constant Field Values

    - #### SPECTRA

          public static final java.lang.String SPECTRA

      Identifies the Spectra dimensional type, representing a dimension consisting of spectral channels.
      See Also:
        Constant Field Values

    - #### LIFETIME

          public static final java.lang.String LIFETIME

      Identifies the Lifetime dimensional type, representing a dimension consisting of a lifetime histogram.
      See Also:
        Constant Field Values

    - #### POLARIZATION

          public static final java.lang.String POLARIZATION

      Identifies the Polarization dimensional type, representing a dimension consisting of polarization states.
      See Also:
        Constant Field Values

    - #### PHASE

          public static final java.lang.String PHASE

      Identifies the Phase dimensional type, representing a dimension consisting of phases.
      See Also:
        Constant Field Values

    - #### FREQUENCY

          public static final java.lang.String FREQUENCY

      Identifies the Frequency dimensional type, representing a dimension consisting of frequencies.
      See Also:
        Constant Field Values

    - #### ROTATION

          public static final java.lang.String ROTATION

      Identifies the Rotation dimensional type, representing a dimension consisting of rotations.
      See Also:
        Constant Field Values

    - #### ILLUMINATION

          public static final java.lang.String ILLUMINATION

      Identifies the Illumination dimensional type, representing a dimension consisting of illuminations.
      See Also:
        Constant Field Values

    - #### MUST_GROUP

          public static final int MUST_GROUP

      File grouping options.
      See Also:
        Constant Field Values

    - #### CAN_GROUP

          public static final int CAN_GROUP

      See Also:
        Constant Field Values

    - #### CANNOT_GROUP

          public static final int CANNOT_GROUP

      See Also:
        Constant Field Values

    - #### SERIES_NUM

          public static final java.lang.String SERIES_NUM

      Patterns to be used when constructing a pattern for output filenames.
      See Also:
        Constant Field Values

    - #### SERIES_NAME

          public static final java.lang.String SERIES_NAME

      See Also:
        Constant Field Values

    - #### CHANNEL_NUM

          public static final java.lang.String CHANNEL_NUM

      See Also:
        Constant Field Values

    - #### CHANNEL_NAME

          public static final java.lang.String CHANNEL_NAME

      See Also:
        Constant Field Values

    - #### Z_NUM

          public static final java.lang.String Z_NUM

      See Also:
        Constant Field Values

    - #### T_NUM

          public static final java.lang.String T_NUM

      See Also:
        Constant Field Values

    - #### TIMESTAMP

          public static final java.lang.String TIMESTAMP

      See Also:
        Constant Field Values

    - #### TILE_X

          public static final java.lang.String TILE_X

      See Also:
        Constant Field Values

    - #### TILE_Y

          public static final java.lang.String TILE_Y

      See Also:
        Constant Field Values

    - #### TILE_NUM

          public static final java.lang.String TILE_NUM

      See Also:
        Constant Field Values

    - #### VERSION_PROPERTIES

          public static final java.util.Properties VERSION_PROPERTIES

    - #### VCS_REVISION

          public static final java.lang.String VCS_REVISION

      Current VCS revision.

    - #### VCS_SHORT_REVISION

          @Deprecated
          public static final java.lang.String VCS_SHORT_REVISION

      Deprecated. Use the general `VCS_REVISION` field.
      Current VCS revision (short form).

    - #### DATE

          public static final java.lang.String DATE

      Date on which this release was built.

    - #### YEAR

          public static final java.lang.String YEAR

      Year in which this release was built.

    - #### VERSION

          public static final java.lang.String VERSION

      Version number of this release.

    - #### CREATOR

          public static final java.lang.String CREATOR

      Value to use when setting creator/software fields in exported files.

    - #### PROPERTY_FILE

          @Deprecated
          public static final java.lang.String PROPERTY_FILE

      Deprecated. The property file is no longer used.

    - #### HCS_DOMAIN

          public static final java.lang.String HCS_DOMAIN

      Identifies the high content screening domain.
      See Also:
        Constant Field Values

    - #### LM_DOMAIN

          public static final java.lang.String LM_DOMAIN

      Identifies the light microscopy domain.
      See Also:
        Constant Field Values

    - #### EM_DOMAIN

          public static final java.lang.String EM_DOMAIN

      Identifies the electron microscopy domain.
      See Also:
        Constant Field Values

    - #### SPM_DOMAIN

          public static final java.lang.String SPM_DOMAIN

      Identifies the scanning probe microscopy domain.
      See Also:
        Constant Field Values

    - #### SEM_DOMAIN

          public static final java.lang.String SEM_DOMAIN

      Identifies the scanning electron microscopy domain.
      See Also:
        Constant Field Values

    - #### FLIM_DOMAIN

          public static final java.lang.String FLIM_DOMAIN

      Identifies the fluorescence-lifetime domain.
      See Also:
        Constant Field Values

    - #### MEDICAL_DOMAIN

          public static final java.lang.String MEDICAL_DOMAIN

      Identifies the medical imaging domain.
      See Also:
        Constant Field Values

    - #### HISTOLOGY_DOMAIN

          public static final java.lang.String HISTOLOGY_DOMAIN

      Identifies the histology domain.
      See Also:
        Constant Field Values

    - #### GEL_DOMAIN

          public static final java.lang.String GEL_DOMAIN

      Identifies the gel and blot imaging domain.
      See Also:
        Constant Field Values

    - #### ASTRONOMY_DOMAIN

          public static final java.lang.String ASTRONOMY_DOMAIN

      Identifies the astronomy domain.
      See Also:
        Constant Field Values

    - #### GRAPHICS_DOMAIN

          public static final java.lang.String GRAPHICS_DOMAIN

      Identifies the graphics domain. This includes formats used exclusively by analysis software.
      See Also:
        Constant Field Values

    - #### UNKNOWN_DOMAIN

          public static final java.lang.String UNKNOWN_DOMAIN

      Identifies an unknown domain.
      See Also:
        Constant Field Values

    - #### NON_GRAPHICS_DOMAINS

          public static final java.lang.String[] NON_GRAPHICS_DOMAINS

      List of non-graphics domains.

    - #### NON_HCS_DOMAINS

          public static final java.lang.String[] NON_HCS_DOMAINS

      List of non-HCS domains.

    - #### NON_SPECIAL_DOMAINS

          public static final java.lang.String[] NON_SPECIAL_DOMAINS

      List of domains that do not require special handling. Domains that require special handling are `GRAPHICS_DOMAIN` and `HCS_DOMAIN`.

    - #### ALL_DOMAINS

          public static final java.lang.String[] ALL_DOMAINS

      List of all supported domains.

    - #### URL_BIO_FORMATS

          public static final java.lang.String URL_BIO_FORMATS

      URL of Bio-Formats web page.
      See Also:
        Constant Field Values

    - #### URL_BIO_FORMATS_LIBRARIES

          public static final java.lang.String URL_BIO_FORMATS_LIBRARIES

      URL of 'Bio-Formats as a Java Library' web page.

    - #### URL_OME_TIFF

          public static final java.lang.String URL_OME_TIFF

      URL of OME-TIFF web page.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### FormatTools

          private FormatTools()

  - ### Method Detail

    - #### makePixelTypes

          static java.lang.String[] makePixelTypes()

    - #### loadProperties

          @Deprecated
          static java.util.Properties loadProperties()

      Deprecated. This method should no longer be used. The properties are now obtained from the jar manifest.

    - #### loadManifest

          private static java.util.jar.Manifest loadManifest()

    - #### getIndex

          public static int getIndex(IFormatReader reader,
                                     int z,
                                     int c,
                                     int t)

      Gets the rasterized index corresponding to the given Z, C and T coordinates (real sizes).

    - #### getIndex

          public static int getIndex(IFormatReader reader,
                                     int z,
                                     int c,
                                     int t,
                                     int moduloZ,
                                     int moduloC,
                                     int moduloT)

      Gets the rasterized index corresponding to the given Z, C, T, ModuloZ, ModuloC and ModuloT coordinates (effective sizes). Note that the Z, C and T coordinates take the modulo dimension sizes into account. The effective size for each of these dimensions is limited to the total size of the dimension divided by the modulo size.

    - #### getIndex

          public static int getIndex(java.lang.String order,
                                     int zSize,
                                     int cSize,
                                     int tSize,
                                     int num,
                                     int z,
                                     int c,
                                     int t)

      Gets the rasterized index corresponding to the given Z, C and T coordinates (real sizes).
      Parameters:
        `order` - Dimension order.
        `zSize` - Total number of focal planes (real size).
        `cSize` - Total number of channels (real size).
        `tSize` - Total number of time points (real size).
        `num` - Total number of image planes (zSize * cSize * tSize), specified as a consistency check.
        `z` - Z coordinate of ZCT coordinate triple to convert to 1D index (real size).
        `c` - C coordinate of ZCT coordinate triple to convert to 1D index (real size).
        `t` - T coordinate of ZCT coordinate triple to convert to 1D index (real size).

    - #### getIndex

          public static int getIndex(java.lang.String order,
                                     int zSize,
                                     int cSize,
                                     int tSize,
                                     int moduloZSize,
                                     int moduloCSize,
                                     int moduloTSize,
                                     int num,
                                     int z,
                                     int c,
                                     int t,
                                     int moduloZ,
                                     int moduloC,
                                     int moduloT)

      Gets the rasterized index corresponding to the given Z, C, T, ModuloZ, ModuloC, ModuloT coordinates (effective sizes). Note that the Z, C and T coordinates take the modulo dimension sizes into account. The effective size for each of these dimensions is limited to the total size of the dimension divided by the modulo size.
      Parameters:
        `order` - Dimension order.
        `zSize` - Total number of focal planes (real size).
        `cSize` - Total number of channels (real size).
        `tSize` - Total number of time points (real size).
        `moduloZSize` - Total number of ModuloZ planes (real size).
        `moduloCSize` - Total number of ModuloC planes (real size).
        `moduloTSize` - Total number of ModuloT planes (real size).
        `num` - Total number of image planes (zSize * cSize * tSize), specified as a consistency check.
        `z` - Z coordinate of ZCTmZmCmT coordinate sextuple to convert to 1D index (effective size).
        `c` - C coordinate of ZCTmZmCmT coordinate sextuple to convert to 1D index (effective size).
        `t` - T coordinate of ZCTmZmCmT coordinate sextuple to convert to 1D index (effective size).
        `moduloZ` - ModuloZ coordinate of ZCTmZmCmT coordinate sextuple to convert to 1D index (effective size).
        `moduloC` - ModuloC coordinate of ZCTmZmCmT coordinate sextuple to convert to 1D index (effective size).
        `moduloT` - ModuloT coordinate of ZCTmZmCmT coordinate sextuple to convert to 1D index (effective size).

    - #### getZCTCoords

          public static int[] getZCTCoords(IFormatReader reader,
                                           int index)

      Gets the Z, C and T coordinates corresponding to the given rasterized index value (real sizes).

    - #### getZCTModuloCoords

          public static int[] getZCTModuloCoords(IFormatReader reader,
                                                 int index)

      Gets the Z, C, T, ModuloZ, ModuloC and ModuloZ coordinates corresponding to the given rasterized index value (effective sizes). Note that the Z, C and T coordinates are not the same as those returned by getZCTCoords(IFormatReader, int) because the size of the modulo dimensions is taken into account. The effective size for each of these dimensions is limited to the total size of the dimension divided by the modulo size.

    - #### getZCTCoords

          public static int[] getZCTCoords(java.lang.String order,
                                           int zSize,
                                           int cSize,
                                           int tSize,
                                           int num,
                                           int index)

      Gets the Z, C and T coordinates corresponding to the given rasterized index value (real sizes).
      Parameters:
        `order` - Dimension order.
        `zSize` - Total number of focal planes (real size).
        `cSize` - Total number of channels (real size).
        `tSize` - Total number of time points (real size).
        `num` - Total number of image planes (zSize * cSize * tSize), specified as a consistency check.
        `index` - 1D (rasterized) index to convert to ZCT coordinate triple.

    - #### getZCTCoords

          public static int[] getZCTCoords(java.lang.String order,
                                           int zSize,
                                           int cSize,
                                           int tSize,
                                           int moduloZSize,
                                           int moduloCSize,
                                           int moduloTSize,
                                           int num,
                                           int index)

      Gets the Z, C and T coordinates corresponding to the given rasterized index value. Note that the Z, C and T coordinates are not the same as those returned by getZCTCoords(String, int, int, int, int, int) because the size of the modulo dimensions is taken into account. The effective size for each of these dimensions is limited to the total size of the dimension divided by the modulo size.
      Parameters:
        `order` - Dimension order.
        `zSize` - Total number of focal planes (real size).
        `cSize` - Total number of channels (real size).
        `tSize` - Total number of time points (real size).
        `moduloZSize` - Total number of ModuloZ planes (real size).
        `moduloCSize` - Total number of ModuloC planes (real size).
        `moduloTSize` - Total number of ModuloT planes (real size).
        `num` - Total number of image planes (zSize * cSize * tSize), specified as a consistency check.
        `index` - 1D (rasterized) index to convert to ZCT coordinate triple.

    - #### getReorderedIndex

          public static int getReorderedIndex(IFormatReader reader,
                                              java.lang.String newOrder,
                                              int newIndex)
                                       throws FormatException

      Converts index from the given dimension order to the reader's native one. This method is useful for shuffling the planar order around (rather than eassigning ZCT sizes as `DimensionSwapper` does).
      Throws:
        `FormatException` - Never actually thrown.

    - #### getReorderedIndex

          public static int getReorderedIndex(java.lang.String origOrder,
                                              java.lang.String newOrder,
                                              int zSize,
                                              int cSize,
                                              int tSize,
                                              int num,
                                              int newIndex)

      Converts index from one dimension order to another. This method is useful for shuffling the planar order around (rather than eassigning ZCT sizes as `DimensionSwapper` does).
      Parameters:
        `origOrder` - Original dimension order.
        `newOrder` - New dimension order.
        `zSize` - Total number of focal planes (real size).
        `cSize` - Total number of channels (real size).
        `tSize` - Total number of time points (real size).
        `num` - Total number of image planes (zSize * cSize * tSize), specified as a consistency check.
        `newIndex` - 1D (rasterized) index according to new dimension order.
      Returns:
        rasterized index according to original dimension order.

    - #### positionToRaster

          public static int positionToRaster(int[] lengths,
                                             int[] pos)

      Computes a unique 1-D index corresponding to the given multidimensional position.
      Parameters:
        `lengths` - the maximum value for each positional dimension
        `pos` - position along each dimensional axis
      Returns:
        rasterized index value

    - #### rasterToPosition

          public static int[] rasterToPosition(int[] lengths,
                                               int raster)

      Computes a unique N-D position corresponding to the given rasterized index value.
      Parameters:
        `lengths` - the maximum value at each positional dimension
        `raster` - rasterized index value
      Returns:
        position along each dimensional axis

    - #### rasterToPosition

          public static int[] rasterToPosition(int[] lengths,
                                               int raster,
                                               int[] pos)

      Computes a unique N-D position corresponding to the given rasterized index value.
      Parameters:
        `lengths` - the maximum value at each positional dimension
        `raster` - rasterized index value
        `pos` - preallocated position array to populate with the result
      Returns:
        position along each dimensional axis

    - #### getRasterLength

          public static int getRasterLength(int[] lengths)

      Computes the number of raster values for a positional array with the given lengths.

    - #### pixelTypeFromString

          public static int pixelTypeFromString(java.lang.String pixelTypeAsString)

      Takes a string value and maps it to one of the pixel type enumerations.
      Parameters:
        `pixelTypeAsString` - the pixel type as a string.
      Returns:
        type enumeration value for use with class constants.

    - #### getPixelTypeString

          public static java.lang.String getPixelTypeString(int pixelType)

      Takes a pixel type value and gets a corresponding string representation.
      Parameters:
        `pixelType` - the pixel type.
      Returns:
        string value for human-readable output.

    - #### getBytesPerPixel

          public static int getBytesPerPixel(int pixelType)

      Retrieves how many bytes per pixel the current plane or section has.
      Parameters:
        `pixelType` - the pixel type as retrieved from `IFormatReader.getPixelType()`.
      Returns:
        the number of bytes per pixel.
      See Also:
        `IFormatReader.getPixelType()`

    - #### getBytesPerPixel

          public static int getBytesPerPixel(java.lang.String pixelType)

      Retrieves the number of bytes per pixel in the current plane.
      Parameters:
        `pixelType` - the pixel type, as a String.
      Returns:
        the number of bytes per pixel.
      See Also:
        `pixelTypeFromString(String)`, `getBytesPerPixel(int)`

    - #### isFloatingPoint

          public static boolean isFloatingPoint(IFormatReader reader)

      Determines whether the given reader represents any floating point data.
      Parameters:
        `reader` - the reader to check
      Returns:
        true if any of the reader's series have a floating point pixel type
      See Also:
        `isFloatingPoint(int)`

    - #### isFloatingPoint

          public static boolean isFloatingPoint(int pixelType)

      Determines whether the given pixel type is floating point or integer.
      Parameters:
        `pixelType` - the pixel type as retrieved from `IFormatReader.getPixelType()`.
      Returns:
        true if the pixel type is floating point.
      See Also:
        `IFormatReader.getPixelType()`

    - #### isSigned

          public static boolean isSigned(int pixelType)

      Determines whether the given pixel type is signed or unsigned.
      Parameters:
        `pixelType` - the pixel type as retrieved from `IFormatReader.getPixelType()`.
      Returns:
        true if the pixel type is signed.
      See Also:
        `IFormatReader.getPixelType()`

    - #### pixelTypeFromBytes

          public static int pixelTypeFromBytes(int bytes,
                                               boolean signed,
                                               boolean fp)
                                        throws FormatException

      Returns an appropriate pixel type given the number of bytes per pixel.
      Parameters:
        `bytes` - number of bytes per pixel.
        `signed` - whether or not the pixel type should be signed.
        `fp` - whether or not these are floating point pixels.
      Throws:
        `FormatException`

    - #### assertId

          public static void assertId(java.lang.String currentId,
                                      boolean notNull,
                                      int depth)

      Asserts that the current file is either null, or not, according to the given flag. If the assertion fails, an IllegalStateException is thrown.
      Parameters:
        `currentId` - File name to test.
        `notNull` - True iff id should be non-null.
        `depth` - How far back in the stack the calling method is; this name is reported as part of the exception message, if available. Use zero to suppress output of the calling method name.

    - #### checkPlaneParameters

          public static void checkPlaneParameters(IFormatReader r,
                                                  int no,
                                                  int bufLength,
                                                  int x,
                                                  int y,
                                                  int w,
                                                  int h)
                                           throws FormatException

      Convenience method for checking that the plane number, tile size and buffer sizes are all valid for the given reader. If 'bufLength' is less than 0, then the buffer length check is not performed.
      Throws:
        `FormatException`

    - #### checkPlaneNumber

          public static void checkPlaneNumber(IFormatReader r,
                                              int no)
                                       throws FormatException

      Checks that the given plane number is valid for the given reader.
      Throws:
        `FormatException`

    - #### checkTileSize

          public static void checkTileSize(IFormatReader r,
                                           int x,
                                           int y,
                                           int w,
                                           int h)
                                    throws FormatException

      Checks that the given tile size is valid for the given reader.
      Throws:
        `FormatException`

    - #### checkBufferSize

          public static void checkBufferSize(IFormatReader r,
                                             int len)
                                      throws FormatException

      Throws:
        `FormatException`

    - #### checkBufferSize

          public static void checkBufferSize(IFormatReader r,
                                             int len,
                                             int w,
                                             int h)
                                      throws FormatException

      Checks that the given buffer size is large enough to hold a w * h image as returned by the given reader.
      Throws:
        `FormatException` - if the buffer is too small

    - #### validStream

          public static boolean validStream(loci.common.RandomAccessInputStream stream,
                                            int len,
                                            boolean littleEndian)
                                     throws java.io.IOException

      Returns true if the given RandomAccessInputStream conatins at least 'len' bytes.
      Throws:
        `java.io.IOException`

    - #### getPlaneSize

          public static int getPlaneSize(IFormatReader r)

      Returns the size in bytes of a single plane.

    - #### getPlaneSize

          public static int getPlaneSize(IFormatReader r,
                                         int w,
                                         int h)

      Returns the size in bytes of a w * h tile.

    - #### getTileFilename

          public static java.lang.String getTileFilename(int tileX,
                                                         int tileY,
                                                         int tileIndex,
                                                         java.lang.String pattern)

    - #### getFilename

          public static java.lang.String getFilename(int series,
                                                     int image,
                                                     IFormatReader r,
                                                     java.lang.String pattern)
                                              throws FormatException,
                                                     java.io.IOException

      Throws:
        `FormatException` - Never actually thrown.
        `java.io.IOException` - Never actually thrown.

    - #### getFilename

          public static java.lang.String getFilename(int series,
                                                     int image,
                                                     IFormatReader r,
                                                     java.lang.String pattern,
                                                     boolean padded)
                                              throws FormatException,
                                                     java.io.IOException

      Throws:
        `FormatException` - Never actually thrown.
        `java.io.IOException` - Never actually thrown.

    - #### getFilename

          public static java.lang.String getFilename(int series,
                                                     int image,
                                                     MetadataRetrieve retrieve,
                                                     java.lang.String pattern,
                                                     boolean padded)
                                              throws FormatException,
                                                     java.io.IOException

      Throws:
        `FormatException`
        `java.io.IOException`

    - #### getFilenames

          public static java.lang.String[] getFilenames(java.lang.String pattern,
                                                        IFormatReader r)
                                                 throws FormatException,
                                                        java.io.IOException

      Throws:
        `FormatException`
        `java.io.IOException`

    - #### getImagesPerFile

          public static int getImagesPerFile(java.lang.String pattern,
                                             IFormatReader r)
                                      throws FormatException,
                                             java.io.IOException

      Throws:
        `FormatException`
        `java.io.IOException`

    - #### getReader

          public static IFormatReader getReader(IFormatReader r,
                                                java.lang.Class<? extends IFormatReader> c)

      Recursively look for the first underlying reader that is an instance of the given class.

    - #### equalReaders

          public static boolean equalReaders(IFormatReader a,
                                             IFormatReader b)

      Check if the two given readers are equal. To be equal, readers must contain the same stack of wrappers and the same state.

    - #### openThumbBytes

          public static byte[] openThumbBytes(IFormatReader reader,
                                              int no)
                                       throws FormatException,
                                              java.io.IOException

      Default implementation for `IFormatReader.openThumbBytes(int)`. At the moment, it uses `BufferedImage` objects to resize thumbnails, so it is not safe for use in headless contexts. In the future, we may reimplement the image scaling logic purely with byte arrays, but handling every case would be substantial effort, so doing so is currently a low priority item.
      Throws:
        `FormatException`
        `java.io.IOException`

    - #### getWellName

          public static java.lang.String getWellName(int row,
                                                     int col)

      Create a simple name for the well at the given row and column. The row is assigned one or two letters, the column is assigned 2 digits. For example: A01, A02, A03, ... B01, B02, B03, ... ... Z01, Z02, Z03, ... AA01, AA02, AA03, ...
      Parameters:
        `row` - the well row index, starting from 0
        `col` - the well column index, starting from 0
      Returns:
        a well name of the format described above

    - #### getWellRowName

          public static java.lang.String getWellRowName(int row)

      Create a simple name for the given row of wells. The row is assigned one or two letters, for example: A B ... Z AA
      Parameters:
        `row` - the well row index, starting from 0
      Returns:
        a well row name of the format described above

    - #### convert

          public static void convert(java.lang.String input,
                                     java.lang.String output)
                              throws FormatException,
                                     java.io.IOException

      Convenience method for converting the specified input file to the specified output file. The ImageReader and ImageWriter classes are used for input and output, respectively. To use other IFormatReader or IFormatWriter implementation,
      Parameters:
        `input` - the full path name of the existing input file
        `output` - the full path name of the output file to be created
      Throws:
        `FormatException` - if there is a general problem reading from or writing to one of the files.
        `java.io.IOException` - if there is an I/O-related error.
      See Also:
        `convert(IFormatReader, IFormatWriter, String).`

    - #### convert

          public static void convert(IFormatReader input,
                                     IFormatWriter output,
                                     java.lang.String outputFile)
                              throws FormatException,
                                     java.io.IOException

      Convenience method for writing all of the images and metadata obtained from the specified IFormatReader into the specified IFormatWriter. It is required that setId(String) be called on the IFormatReader object before it is passed to convert(...). setMetadataStore(...) should also have been called with an appropriate instance of IMetadata. The setId(String) method must not be called on the IFormatWriter object; this is taken care of internally. Additionally, the setMetadataRetrieve(...) method in IFormatWriter should not be called.
      Parameters:
        `input` - the pre-initialized IFormatReader used for reading data.
        `output` - the uninitialized IFormatWriter used for writing data.
        `outputFile` - the full path name of the output file to be created.
      Throws:
        `FormatException` - if there is a general problem reading from or writing to one of the files.
        `java.io.IOException` - if there is an I/O-related error.

    - #### defaultMinMax

          public static long[] defaultMinMax(int pixelType)

      Get the default range for the specified pixel type. Note that this is not necessarily the minimum and maximum value which may be stored, but the minimum and maximum which should be used for rendering.
      Parameters:
        `pixelType` - the pixel type.
      Returns:
        an array containing the min and max as elements 0 and 1, respectively.
      Throws:
        `java.io.IOException` - if the pixel type is floating point or invalid.

    - #### isPositiveValue

          public static boolean isPositiveValue(java.lang.Double value)

    - #### getWavelength

          public static ome.units.quantity.Length getWavelength(java.lang.Double value,
                                                                java.lang.String unit)

      Formats the input value for the wavelength into a length of the given unit.
      Parameters:
        `value` - the value of the wavelength
        `unit` - the unit of the wavelength. If null will default to Nanometre
      Returns:
        the wavelength formatted as a `Length`

    - #### getTime

          public static ome.units.quantity.Time getTime(java.lang.Double value,
                                                        java.lang.String unit)

      Formats the input value for the time into a length of the given unit.
      Parameters:
        `value` - the value of the time
        `unit` - the unit of the time. If null will default to Seconds
      Returns:
        the wavelength formatted as a `Length`

    - #### getStagePosition

          public static ome.units.quantity.Length getStagePosition(java.lang.Double value,
                                                                   ome.units.unit.Unit<ome.units.quantity.Length> unit)

      Formats the input value for the stage position into a length of the given unit.
      Parameters:
        `value` - the value of the stage position
        `unit` - the unit of the stage position
      Returns:
        the stage position formatted as a `Length`. Returns `null` if `value` is `null` or infinite or `unit` is `null`.

    - #### getStagePosition

          public static ome.units.quantity.Length getStagePosition(java.lang.Double value,
                                                                   java.lang.String unit)

      Formats the input value for the stage position into a length of the given unit.
      Parameters:
        `value` - the value of the stage position
        `unit` - the unit of the stage position. If the string cannot be converted into a base length unit, the stage position length will be constructure using the default reference frame unit.
      Returns:
        the stage position formatted as a `Length`. Returns `null` under the same conditions as `getStagePosition(Double, String)`.

    - #### getPhysicalSize

          public static ome.units.quantity.Length getPhysicalSize(java.lang.Double value,
                                                                  java.lang.String unit)

    - #### getPhysicalSizeX

          public static ome.units.quantity.Length getPhysicalSizeX(java.lang.Double value)

      Formats the input value for the physical size in X into a length in microns
      Parameters:
        `value` - the value of the physical size in X in microns
      Returns:
        the physical size formatted as a `Length`

    - #### getPhysicalSizeX

          public static ome.units.quantity.Length getPhysicalSizeX(java.lang.Double value,
                                                                   java.lang.String unit)

      Formats the input value for the physical size in X into a length of the given unit.
      Parameters:
        `value` - the value of the physical size in X
        `unit` - the unit of the physical size in X. If `null`, default to microns.
      Returns:
        the physical size formatted as a `Length`

    - #### getPhysicalSizeX

          public static ome.units.quantity.Length getPhysicalSizeX(java.lang.Double value,
                                                                   ome.units.unit.Unit<ome.units.quantity.Length> unit)

      Formats the input value for the physical size in X into a length of the given unit.
      Parameters:
        `value` - the value of the physical size in X
        `unit` - the unit of the physical size in X
      Returns:
        the physical size formatted as a `Length`

    - #### getPhysicalSizeY

          public static ome.units.quantity.Length getPhysicalSizeY(java.lang.Double value)

      Formats the input value for the physical size in Y into a length in microns
      Parameters:
        `value` - the value of the physical size in Y in microns
      Returns:
        the physical size formatted as a `Length`

    - #### getPhysicalSizeY

          public static ome.units.quantity.Length getPhysicalSizeY(java.lang.Double value,
                                                                   java.lang.String unit)

      Formats the input value for the physical size in Y into a length of the given unit.
      Parameters:
        `value` - the value of the physical size in Y
        `unit` - the unit of the physical size in Y. If `null`, default to microns.
      Returns:
        the physical size formatted as a `Length`

    - #### getPhysicalSizeY

          public static ome.units.quantity.Length getPhysicalSizeY(java.lang.Double value,
                                                                   ome.units.unit.Unit<ome.units.quantity.Length> unit)

      Formats the input value for the physical size in Y into a length of the given unit.
      Parameters:
        `value` - the value of the physical size in Y
        `unit` - the unit of the physical size in Y
      Returns:
        the physical size formatted as a `Length`

    - #### getPhysicalSizeZ

          public static ome.units.quantity.Length getPhysicalSizeZ(java.lang.Double value)

      Formats the input value for the physical size in Z into a length in microns.
      Parameters:
        `value` - the value of the physical size in Z in microns
      Returns:
        the physical size formatted as a `Length`

    - #### getPhysicalSizeZ

          public static ome.units.quantity.Length getPhysicalSizeZ(java.lang.Double value,
                                                                   java.lang.String unit)

      Formats the input value for the physical size in Z into a length of the given unit.
      Parameters:
        `value` - the value of the physical size in Z
        `unit` - the unit of the physical size in Z. If `null`, default to microns.
      Returns:
        the physical size formatted as a `Length`

    - #### getPhysicalSizeZ

          public static ome.units.quantity.Length getPhysicalSizeZ(java.lang.Double value,
                                                                   ome.units.unit.Unit<ome.units.quantity.Length> unit)

      Formats the input value for the physical size in Z into a length of the given unit.
      Parameters:
        `value` - the value of the physical size in Z
        `unit` - the unit of the physical size in Z
      Returns:
        the physical size formatted as a `Length`

    - #### getEmissionWavelength

          public static ome.units.quantity.Length getEmissionWavelength(java.lang.Double value)

    - #### getExcitationWavelength

          public static ome.units.quantity.Length getExcitationWavelength(java.lang.Double value)

    - #### getWavelength

          public static ome.units.quantity.Length getWavelength(java.lang.Double value)

    - #### getMaxFieldCount

          public static ome.xml.model.primitives.PositiveInteger getMaxFieldCount(java.lang.Integer value)

    - #### getCutIn

          public static ome.units.quantity.Length getCutIn(java.lang.Double value)

    - #### getCutOut

          public static ome.units.quantity.Length getCutOut(java.lang.Double value)

    - #### getFontSize

          public static ome.units.quantity.Length getFontSize(java.lang.Integer value)

    - #### createAngle

          public static ome.units.quantity.Angle createAngle(java.lang.Double value,
                                                             ome.units.unit.Unit<ome.units.quantity.Angle> valueUnit)

    - #### createAngle

          public static ome.units.quantity.Angle createAngle(java.lang.Integer value,
                                                             ome.units.unit.Unit<ome.units.quantity.Angle> valueUnit)

    - #### createAngle

          public static <T extends ome.xml.model.primitives.PrimitiveNumber> ome.units.quantity.Angle createAngle(T value,
                                                                                                                  ome.units.unit.Unit<ome.units.quantity.Angle> valueUnit)

    - #### createElectricPotential

          public static ome.units.quantity.ElectricPotential createElectricPotential(java.lang.Double value,
                                                                                     ome.units.unit.Unit<ome.units.quantity.ElectricPotential> valueUnit)

    - #### createElectricPotential

          public static ome.units.quantity.ElectricPotential createElectricPotential(java.lang.Integer value,
                                                                                     ome.units.unit.Unit<ome.units.quantity.ElectricPotential> valueUnit)

    - #### createElectricPotential

          public static <T extends ome.xml.model.primitives.PrimitiveNumber> ome.units.quantity.ElectricPotential createElectricPotential(T value,
                                                                                                                                          ome.units.unit.Unit<ome.units.quantity.ElectricPotential> valueUnit)

    - #### createFrequency

          public static ome.units.quantity.Frequency createFrequency(java.lang.Double value,
                                                                     ome.units.unit.Unit<ome.units.quantity.Frequency> valueUnit)

    - #### createFrequency

          public static ome.units.quantity.Frequency createFrequency(java.lang.Integer value,
                                                                     ome.units.unit.Unit<ome.units.quantity.Frequency> valueUnit)

    - #### createFrequency

          public static <T extends ome.xml.model.primitives.PrimitiveNumber> ome.units.quantity.Frequency createFrequency(T value,
                                                                                                                          ome.units.unit.Unit<ome.units.quantity.Frequency> valueUnit)

    - #### createPower

          public static ome.units.quantity.Power createPower(java.lang.Double value,
                                                             ome.units.unit.Unit<ome.units.quantity.Power> valueUnit)

    - #### createPower

          public static ome.units.quantity.Power createPower(java.lang.Integer value,
                                                             ome.units.unit.Unit<ome.units.quantity.Power> valueUnit)

    - #### createPower

          public static <T extends ome.xml.model.primitives.PrimitiveNumber> ome.units.quantity.Power createPower(T value,
                                                                                                                  ome.units.unit.Unit<ome.units.quantity.Power> valueUnit)

    - #### createLength

          public static ome.units.quantity.Length createLength(java.lang.Double value,
                                                               ome.units.unit.Unit<ome.units.quantity.Length> valueUnit)

    - #### createLength

          public static ome.units.quantity.Length createLength(java.lang.Integer value,
                                                               ome.units.unit.Unit<ome.units.quantity.Length> valueUnit)

    - #### createLength

          public static <T extends ome.xml.model.primitives.PrimitiveNumber> ome.units.quantity.Length createLength(T value,
                                                                                                                    ome.units.unit.Unit<ome.units.quantity.Length> valueUnit)

    - #### createPressure

          public static ome.units.quantity.Pressure createPressure(java.lang.Double value,
                                                                   ome.units.unit.Unit<ome.units.quantity.Pressure> valueUnit)

    - #### createPressure

          public static ome.units.quantity.Pressure createPressure(java.lang.Integer value,
                                                                   ome.units.unit.Unit<ome.units.quantity.Pressure> valueUnit)

    - #### createPressure

          public static <T extends ome.xml.model.primitives.PrimitiveNumber> ome.units.quantity.Pressure createPressure(T value,
                                                                                                                        ome.units.unit.Unit<ome.units.quantity.Pressure> valueUnit)

    - #### createTemperature

          public static ome.units.quantity.Temperature createTemperature(java.lang.Double value,
                                                                         ome.units.unit.Unit<ome.units.quantity.Temperature> valueUnit)

    - #### createTemperature

          public static ome.units.quantity.Temperature createTemperature(java.lang.Integer value,
                                                                         ome.units.unit.Unit<ome.units.quantity.Temperature> valueUnit)

    - #### createTemperature

          public static <T extends ome.xml.model.primitives.PrimitiveNumber> ome.units.quantity.Temperature createTemperature(T value,
                                                                                                                              ome.units.unit.Unit<ome.units.quantity.Temperature> valueUnit)

    - #### createTime

          public static ome.units.quantity.Time createTime(java.lang.Double value,
                                                           ome.units.unit.Unit<ome.units.quantity.Time> valueUnit)

    - #### createTime

          public static ome.units.quantity.Time createTime(java.lang.Integer value,
                                                           ome.units.unit.Unit<ome.units.quantity.Time> valueUnit)

    - #### createTime

          public static <T extends ome.xml.model.primitives.PrimitiveNumber> ome.units.quantity.Time createTime(T value,
                                                                                                                ome.units.unit.Unit<ome.units.quantity.Time> valueUnit)

    - #### parseLength

          public static ome.units.quantity.Length parseLength(java.lang.String s)

      Parse a length composed of a value and an optional unit
      Parameters:
        `s` - a string composed of a positive value and an optional length unit
      Returns:
        a `Length` object or `null` if the string cannot be parsed

    - #### parseLength

          public static ome.units.quantity.Length parseLength(java.lang.String s,
                                                              java.lang.String defaultUnit)

      Parse a length composed of a value and an optional unit
      Parameters:
        `s` - a string composed of a positive value and an optional length unit
        `defaultUnit` - a default unit to use if not present in the string
      Returns:
        a `Length` object or `null` if the string cannot be parsed

    - #### getRequiredDirectories

          public static int getRequiredDirectories(java.lang.String[] files)

      Returns the maximum number of directories below the common parent of a list of file paths
      Parameters:
        `files` - a string array containing a list of file paths
      Returns:
        the maximum number of directories under the common parent

    - #### canUsePrecompressedTiles

          public static boolean canUsePrecompressedTiles(IFormatReader reader,
                                                         IFormatWriter writer,
                                                         int series,
                                                         int resolution)
                                                  throws FormatException,
                                                         java.io.IOException

      Compare the given reader and writer at the specified series and resolution to see if pre-compressed tiles can be transferred directly from the reader to the writer.
      Throws:
        `FormatException`
        `java.io.IOException`

Copyright © 2026 Open Microscopy Environment