loci.formats.out

## Class CellH5Writer

- java.lang.Object
- - loci.formats.FormatHandler
  - - loci.formats.FormatWriter
    - - loci.formats.out.CellH5Writer

- All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, ICompressedTileWriter, IFormatHandler, IFormatWriter, IMetadataConfigurable, IPyramidHandler

      public class CellH5Writer
      extends FormatWriter

  CellH5Writer is the file format writer for CellH5 format.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private long` | `bpp`
    `private JHDFService` | `jhdf`
    `private java.lang.String` | `outputPath`

    - ### Fields inherited from class loci.formats.FormatWriter

      `cm, compression, compressionTypes, fps, initialized, interleaved, metadataRetrieve, options, out, resolution, resolutionData, sequential, series, validBits`

    - ### Fields inherited from class loci.formats.FormatHandler

      `COMPRESSION_SUFFIXES, currentId, format, LOGGER, metadataOptions, suffixes`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CellH5Writer()`
    `CellH5Writer(java.lang.String format, java.lang.String[] exts)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `canDoStacks()` Reports whether the writer can save multiple images to a single file.
    `void` | `close()`
    `int[]` | `getPixelTypes(java.lang.String codec)` Gets the supported pixel types for the given codec.
    `int` | `getPlaneCount()` Retrieve the total number of planes in the current series.
    `void` | `saveBytes(int no, byte[] buf)` Saves the given image to the specified (possibly already open) file.
    `void` | `saveBytes(int no, byte[] buf, int x, int y, int w, int h)` Saves the given image tile to the current series in the current file.
    `void` | `setId(java.lang.String id)` Initializes a writer from the input file name.

    - ### Methods inherited from class loci.formats.FormatWriter

      `changeOutputFile, checkParams, createOutputStream, getCodecOptions, getColorModel, getCompression, getCompressionTypes, getFramesPerSecond, getMetadataRetrieve, getPixelTypes, getPlaneCount, getResolution, getResolutionCount, getResolutions, getSamplesPerPixel, getSamplesPerPixel, getSeries, getSizeX, getSizeY, getTileSizeX, getTileSizeY, hasResolutions, isFullPlane, isInterleaved, isSupportedType, saveBytes, savePlane, savePlane, savePlane, seekToPlaneOffset, setCodecOptions, setColorModel, setCompression, setFramesPerSecond, setInterleaved, setMetadataRetrieve, setResolution, setResolutions, setSeries, setTileSizeX, setTileSizeY, setValidBitsPerPixel, setWriteSequentially`

    - ### Methods inherited from class loci.formats.FormatHandler

      `checkSuffix, checkSuffix, getFormat, getMetadataOptions, getNativeDataType, getSuffixes, getSupportedMetadataLevels, isThisType, setMetadataOptions`

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

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

    - ### Methods inherited from interface loci.formats.IFormatHandler

      `getFormat, getNativeDataType, getSuffixes, isThisType`

    - ### Methods inherited from interface loci.formats.IMetadataConfigurable

      `getMetadataOptions, getSupportedMetadataLevels, setMetadataOptions`

    - ### Methods inherited from interface loci.formats.ICompressedTileWriter

      `getCodec, saveCompressedBytes`

- - ### Field Detail

    - #### jhdf

          private transient JHDFService jhdf

    - #### bpp

          private long bpp

    - #### outputPath

          private java.lang.String outputPath

  - ### Constructor Detail

    - #### CellH5Writer

          public CellH5Writer()

    - #### CellH5Writer

          public CellH5Writer(java.lang.String format,
                              java.lang.String[] exts)

  - ### Method Detail

    - #### setId

          public void setId(java.lang.String id)
                     throws FormatException,
                            java.io.IOException

      Description copied from class: `FormatWriter`
      Initializes a writer from the input file name. Initializes a `RandomAccessOutputStream` for the output file and initializes the metadata for all the series using `FormatWriter.setSeries(int)`.
      Specified by:
        `setId` in interface `IFormatHandler`
      Overrides:
        `setId` in class `FormatWriter`
      Parameters:
        `id` - a `String` specifying the path to the file
      Throws:
        `FormatException`
        `java.io.IOException`

    - #### saveBytes

          public void saveBytes(int no,
                                byte[] buf)
                         throws java.io.IOException,
                                FormatException

      Saves the given image to the specified (possibly already open) file.
      Specified by:
        `saveBytes` in interface `IFormatWriter`
      Overrides:
        `saveBytes` in class `FormatWriter`
      Parameters:
        `no` - the plane index within the series.
        `buf` - the byte array that represents the image.
      Throws:
        `java.io.IOException` - if there was a problem writing to the file.
        `FormatException` - if one of the parameters is invalid.

    - #### close

          public void close()
                     throws java.io.IOException

      Specified by:
        `close` in interface `java.io.Closeable`
      Specified by:
        `close` in interface `java.lang.AutoCloseable`
      Overrides:
        `close` in class `FormatWriter`
      Throws:
        `java.io.IOException`

    - #### getPlaneCount

          public int getPlaneCount()

      Description copied from class: `FormatWriter`
      Retrieve the total number of planes in the current series.
      Overrides:
        `getPlaneCount` in class `FormatWriter`

    - #### saveBytes

          public void saveBytes(int no,
                                byte[] buf,
                                int x,
                                int y,
                                int w,
                                int h)
                         throws FormatException,
                                java.io.IOException

      Description copied from interface: `IFormatWriter`
      Saves the given image tile to the current series in the current file.
      Parameters:
        `no` - the plane index within the series.
        `buf` - the byte array that represents the image tile.
        `x` - the X coordinate of the upper-left corner of the image tile.
        `y` - the Y coordinate of the upper-left corner of the image tile.
        `w` - the width (in pixels) of the image tile.
        `h` - the height (in pixels) of the image tile.
      Throws:
        `FormatException` - if one of the parameters is invalid.
        `java.io.IOException` - if there was a problem writing to the file.
      See Also:
        `IFormatWriter.saveBytes(int, byte[], int, int, int, int)`

    - #### canDoStacks

          public boolean canDoStacks()

      Description copied from interface: `IFormatWriter`
      Reports whether the writer can save multiple images to a single file.
      Specified by:
        `canDoStacks` in interface `IFormatWriter`
      Overrides:
        `canDoStacks` in class `FormatWriter`

    - #### getPixelTypes

          public int[] getPixelTypes(java.lang.String codec)

      Description copied from interface: `IFormatWriter`
      Gets the supported pixel types for the given codec.
      Specified by:
        `getPixelTypes` in interface `IFormatWriter`
      Overrides:
        `getPixelTypes` in class `FormatWriter`

Copyright © 2026 Open Microscopy Environment