loci.formats.gui

## Class SignedShortBuffer

- java.lang.Object
- - java.awt.image.DataBuffer
  - - loci.formats.gui.SignedShortBuffer

-     public class SignedShortBuffer
      extends java.awt.image.DataBuffer

  DataBuffer that stores signed shorts. SignedShortBuffer serves the same purpose as java.awt.image.DataBufferShort; the only difference is that SignedShortBuffer's getType() method returns DataBuffer.TYPE_USHORT. This is a workaround for the fact that java.awt.image.BufferedImage does not support DataBuffers with type DataBuffer.TYPE_SHORT.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private java.awt.image.DataBufferShort` | `helper`

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

      `banks, dataType, offset, offsets, size, TYPE_BYTE, TYPE_DOUBLE, TYPE_FLOAT, TYPE_INT, TYPE_SHORT, TYPE_UNDEFINED, TYPE_USHORT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SignedShortBuffer(int size)`
    `SignedShortBuffer(int size, int numbanks)`
    `SignedShortBuffer(short[][] data, int size)`
    `SignedShortBuffer(short[][] data, int size, int[] offsets)`
    `SignedShortBuffer(short[] data, int size)`
    `SignedShortBuffer(short[] data, int size, int offset)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `short[]` | `getData()`
    `short[]` | `getData(int bank)`
    `int` | `getElem(int bank, int i)`
    `void` | `setElem(int bank, int i, int val)`

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

      `getDataType, getDataTypeSize, getElem, getElemDouble, getElemDouble, getElemFloat, getElemFloat, getNumBanks, getOffset, getOffsets, getSize, setElem, setElemDouble, setElemDouble, setElemFloat, setElemFloat`

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

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

- - ### Field Detail

    - #### helper

          private java.awt.image.DataBufferShort helper

  - ### Constructor Detail

    - #### SignedShortBuffer

          public SignedShortBuffer(int size)

    - #### SignedShortBuffer

          public SignedShortBuffer(int size,
                                   int numbanks)

    - #### SignedShortBuffer

          public SignedShortBuffer(short[] data,
                                   int size)

    - #### SignedShortBuffer

          public SignedShortBuffer(short[] data,
                                   int size,
                                   int offset)

    - #### SignedShortBuffer

          public SignedShortBuffer(short[][] data,
                                   int size)

    - #### SignedShortBuffer

          public SignedShortBuffer(short[][] data,
                                   int size,
                                   int[] offsets)

  - ### Method Detail

    - #### getData

          public short[] getData()

    - #### getData

          public short[] getData(int bank)

    - #### getElem

          public int getElem(int bank,
                             int i)

      Specified by:
        `getElem` in class `java.awt.image.DataBuffer`

    - #### setElem

          public void setElem(int bank,
                              int i,
                              int val)

      Specified by:
        `setElem` in class `java.awt.image.DataBuffer`

Copyright © 2026 Open Microscopy Environment