Package de.pco.common

Class ImageData


public class ImageData
extends AbstractImageData
Class represents the image as unsigned short[] and its metadata .
Author:
PCO
  • Constructor Details

    • ImageData

      public ImageData​(UShortArray image, int width, int height)
      Constructor from the wrapped array of values, without the metadata.
      Parameters:
      image -
      width -
      height -
    • ImageData

      public ImageData​(UShortArray image, AbstractMetadata metadata)
      Constructor from the wrapped array of values and from the metadata which contains also the width and the height.
      Parameters:
      image -
      metadata -
    • ImageData

      public ImageData​(int[] image, int width, int height)
      Constructor from the array of the real unsigned values. Wrapps the ints into UShortArray by checking the maximal value which unsigned short can hold.
      Parameters:
      image -
      width -
      height -
  • Method Details

    • isCompressed

      public boolean isCompressed()
      Returns always false because ImageData are based on UShortArray and not on UByteArray.
      Specified by:
      isCompressed in class AbstractImageData
      Returns:
    • setData

      public void setData​(int[] data)
      Sets the image data. Checks the parameter whether all the data values fit in an unsigned short.
      Specified by:
      setData in class AbstractImageData
      Parameters:
      data -
    • getDataElementMaxValue

      public final int getDataElementMaxValue()
      Returns the maximal value that can be stored in the returned data array: 65535 which is the maximum of unsigned short.
      Specified by:
      getDataElementMaxValue in class AbstractImageData
      Returns: