Package fr.esrf.tangoatk.widget.image
Class IImageFormat
java.lang.Object
fr.esrf.tangoatk.widget.image.IImageFormat
- Direct Known Subclasses:
Mono16ImageFormat,Mono8ImageFormat,RGB24ImageFormat
An abstract class for image format (Used by the RawImageViewer).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidCompute the fitting bounds (Monochrome only)intabstract intabstract StringgetName()abstract intgetRGB(boolean negative, int[] colormap16, int x, int y) Returns the pixel at the specifed posabstract doublegetValue(int x, int y) Gets the pixel value as double (Used for table and profile display).abstract StringgetValueStr(int x, int y) Gets the pixel value as string (Used for pixel info display).abstract intgetWidth()voidinitDefault(JGradientViewer gradTool) Init static variable.abstract booleanbooleanisNull()abstract voidsetData(byte[] rawData) Sets and decode the data.booleansetFitting(boolean bestFit, double min, double max) Set manual fitting parameters
-
Constructor Details
-
IImageFormat
public IImageFormat()
-
-
Method Details
-
setData
Sets and decode the data.- Parameters:
rawData- Pointer to image data- Throws:
IOException- In case of failure
-
initDefault
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 fittingmin- 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
- 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 coordinatey- vertical coordinate- Returns:
- Pixel value as double
-
getValueStr
Gets the pixel value as string (Used for pixel info display).- Parameters:
x- horizontal coordinatey- 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 coordinatey- vertical coordinatenegative- Negative flagcolormap16- 16Bit colormap (Monochrome only)- Returns:
- the pixel at the specifed pos
-