loci.formats.gui

## Class SignedColorModel

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

- All Implemented Interfaces:
    java.awt.Transparency

      public class SignedColorModel
      extends java.awt.image.ColorModel

  ColorModel that handles 8, 16 and 32 bits per channel signed data.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private java.awt.image.ComponentColorModel` | `helper`
    `private int` | `max`
    `private int` | `nChannels`
    `private int` | `pixelBits`

    - ### 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
    `SignedColorModel(int pixelBits, int dataType, int nChannels)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.awt.image.WritableRaster` | `createCompatibleWritableRaster(int w, int h)`
    `int` | `getAlpha(int pixel)`
    `int` | `getAlpha(java.lang.Object data)`
    `int` | `getBlue(int pixel)`
    `int` | `getBlue(java.lang.Object data)`
    `java.lang.Object` | `getDataElements(int rgb, java.lang.Object pixel)`
    `int` | `getGreen(int pixel)`
    `int` | `getGreen(java.lang.Object data)`
    `int` | `getRed(int pixel)`
    `int` | `getRed(java.lang.Object data)`
    `boolean` | `isCompatibleRaster(java.awt.image.Raster raster)`
    `private static int[]` | `makeBitArray(int nChannels, int nBits)`
    `private int` | `rescale(int value)`
    `private int` | `rescale(int value, int max)`

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

      `coerceData, createCompatibleSampleModel, equals, finalize, getAlphaRaster, getColorSpace, getComponents, getComponents, getComponentSize, getComponentSize, getDataElement, getDataElement, getDataElements, getDataElements, getNormalizedComponents, getNormalizedComponents, getNumColorComponents, getNumComponents, getPixelSize, 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

    - #### pixelBits

          private int pixelBits

    - #### nChannels

          private int nChannels

    - #### helper

          private java.awt.image.ComponentColorModel helper

    - #### max

          private int max

  - ### Constructor Detail

    - #### SignedColorModel

          public SignedColorModel(int pixelBits,
                                  int dataType,
                                  int nChannels)
                           throws java.io.IOException

      Throws:
        `java.io.IOException`

  - ### Method Detail

    - #### 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`

    - #### getAlpha

          public int getAlpha(java.lang.Object data)

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

    - #### getRed

          public int getRed(java.lang.Object data)

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

    - #### getGreen

          public int getGreen(java.lang.Object data)

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

    - #### getBlue

          public int getBlue(java.lang.Object data)

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

    - #### rescale

          private int rescale(int value,
                              int max)

    - #### rescale

          private int rescale(int value)

    - #### makeBitArray

          private static int[] makeBitArray(int nChannels,
                                            int nBits)

Copyright © 2026 Open Microscopy Environment