loci.formats.gui

## Class Index16ColorModel

- java.lang.Object
- - java.awt.image.ColorModel
  - - loci.formats.gui.Index16ColorModel

- All Implemented Interfaces:
    java.awt.Transparency

      public class Index16ColorModel
      extends java.awt.image.ColorModel

  ColorModel that handles 16 bits per channel lookup tables.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private short[]` | `alphaShort` Lookup tables.
    `private short[]` | `blueShort` Lookup tables.
    `private short[]` | `greenShort` Lookup tables.
    `private short[]` | `redShort` Lookup tables.

    - ### Fields inherited from class java.awt.image.ColorModel

      `pixel_bits, transferType`

    - ### Fields inherited from interface java.awt.Transparency

      `BITMASK, OPAQUE, TRANSLUCENT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Index16ColorModel(int bits, int size, short[][] table, boolean littleEndian)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.awt.image.WritableRaster` | `createCompatibleWritableRaster(int w, int h)`
    `int` | `getAlpha(int pixel)`
    `short[]` | `getAlphas()` Return the array of alpha color components.
    `int` | `getBlue(int pixel)`
    `short[]` | `getBlues()` Return the array of blue color components.
    `java.lang.Object` | `getDataElements(int rgb, java.lang.Object pixel)`
    `int` | `getGreen(int pixel)`
    `short[]` | `getGreens()` Return the array of green color components.
    `int` | `getRed(int pixel)`
    `short[]` | `getReds()` Return the array of red color components.
    `boolean` | `isCompatibleRaster(java.awt.image.Raster raster)`

    - ### Methods inherited from class java.awt.image.ColorModel

      `coerceData, createCompatibleSampleModel, equals, finalize, getAlpha, getAlphaRaster, getBlue, getColorSpace, getComponents, getComponents, getComponentSize, getComponentSize, getDataElement, getDataElement, getDataElements, getDataElements, getGreen, getNormalizedComponents, getNormalizedComponents, getNumColorComponents, getNumComponents, getPixelSize, getRed, getRGB, getRGB, getRGBdefault, getTransferType, getTransparency, getUnnormalizedComponents, hasAlpha, hashCode, isAlphaPremultiplied, isCompatibleSampleModel, toString`

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

      `clone, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### redShort

          private short[] redShort

      Lookup tables.

    - #### greenShort

          private short[] greenShort

      Lookup tables.

    - #### blueShort

          private short[] blueShort

      Lookup tables.

    - #### alphaShort

          private short[] alphaShort

      Lookup tables.

  - ### Constructor Detail

    - #### Index16ColorModel

          public Index16ColorModel(int bits,
                                   int size,
                                   short[][] table,
                                   boolean littleEndian)
                            throws java.io.IOException

      Throws:
        `java.io.IOException`

  - ### Method Detail

    - #### getReds

          public short[] getReds()

      Return the array of red color components.

    - #### getGreens

          public short[] getGreens()

      Return the array of green color components.

    - #### getBlues

          public short[] getBlues()

      Return the array of blue color components.

    - #### getAlphas

          public short[] getAlphas()

      Return the array of alpha color components.

    - #### getDataElements

          public java.lang.Object getDataElements(int rgb,
                                                  java.lang.Object pixel)

      Overrides:
        `getDataElements` in class `java.awt.image.ColorModel`

    - #### isCompatibleRaster

          public boolean isCompatibleRaster(java.awt.image.Raster raster)

      Overrides:
        `isCompatibleRaster` in class `java.awt.image.ColorModel`

    - #### createCompatibleWritableRaster

          public java.awt.image.WritableRaster createCompatibleWritableRaster(int w,
                                                                              int h)

      Overrides:
        `createCompatibleWritableRaster` in class `java.awt.image.ColorModel`

    - #### getAlpha

          public int getAlpha(int pixel)

      Specified by:
        `getAlpha` in class `java.awt.image.ColorModel`

    - #### getBlue

          public int getBlue(int pixel)

      Specified by:
        `getBlue` in class `java.awt.image.ColorModel`

    - #### getGreen

          public int getGreen(int pixel)

      Specified by:
        `getGreen` in class `java.awt.image.ColorModel`

    - #### getRed

          public int getRed(int pixel)

      Specified by:
        `getRed` in class `java.awt.image.ColorModel`

Copyright © 2026 Open Microscopy Environment