Class IImageFormat

java.lang.Object
fr.esrf.tangoatk.widget.image.IImageFormat
Direct Known Subclasses:
Mono16ImageFormat, Mono8ImageFormat, RGB24ImageFormat

public abstract class IImageFormat extends Object
An abstract class for image format (Used by the RawImageViewer).
  • Constructor Details

    • IImageFormat

      public IImageFormat()
  • Method Details

    • setData

      public abstract void setData(byte[] rawData) throws IOException
      Sets and decode the data.
      Parameters:
      rawData - Pointer to image data
      Throws:
      IOException - In case of failure
    • initDefault

      public void initDefault(JGradientViewer gradTool)
      Init static variable.
      Parameters:
      gradTool - Gradient viewer
    • isNull

      public boolean isNull()
      Returns:
      true if the image has a null size, false otherwise
    • setFitting

      public boolean setFitting(boolean bestFit, double min, double max)
      Set manual fitting parameters
      Parameters:
      bestFit - Enable automatic fitting
      min - minumun fitting value (0..100%)
      max - maximum fitting value (0..100%)
      Returns:
      true if input parameters are correct
    • getWidth

      public abstract int getWidth()
      Returns:
      the width of the image depending on the format.
    • getHeight

      public int getHeight()
      Returns:
      the height of the image depending on the format.
    • isColorFormat

      public abstract boolean isColorFormat()
      Returns:
      true if this format is a color format, false otherwise.
    • getName

      public abstract String getName()
      Returns:
      the format name.
    • getValue

      public abstract double getValue(int x, int y)
      Gets the pixel value as double (Used for table and profile display).
      Parameters:
      x - horizontal coordinate
      y - vertical coordinate
      Returns:
      Pixel value as double
    • getValueStr

      public abstract String getValueStr(int x, int y)
      Gets the pixel value as string (Used for pixel info display).
      Parameters:
      x - horizontal coordinate
      y - vertical coordinate
      Returns:
      Pixel value as String
    • getHistogramWidth

      public abstract int getHistogramWidth()
      Returns:
      the histogram width. (The number of possible value for a pixel)
    • computeFitting

      public abstract void computeFitting()
      Compute the fitting bounds (Monochrome only)
    • getRGB

      public abstract int getRGB(boolean negative, int[] colormap16, int x, int y)
      Returns the pixel at the specifed pos
      Parameters:
      x - horizontal coordinate
      y - vertical coordinate
      negative - Negative flag
      colormap16 - 16Bit colormap (Monochrome only)
      Returns:
      the pixel at the specifed pos