public abstract class IcyColorModel extends java.awt.image.ColorModel implements ScalerListener, IcyColorSpaceListener, ChangeListener
Modifier and Type | Method and Description |
---|---|
void |
addListener(IcyColorModelListener listener)
Add a listener
|
void |
beginUpdate() |
java.awt.image.ColorModel |
coerceData(java.awt.image.WritableRaster raster,
boolean isAlphaPremultiplied) |
void |
colorSpaceChanged(IcyColorSpaceEvent e) |
void |
copyBounds(IcyColorModel source)
Deprecated.
Use
setBounds(IcyColorModel) instead. |
void |
copyColormap(java.awt.image.ColorModel source)
Deprecated.
Use
setColorMaps(ColorModel) instead. |
java.awt.image.SampleModel |
createCompatibleSampleModel(int w,
int h) |
static java.awt.image.BandedSampleModel |
createCompatibleSampleModel(int transferType,
int w,
int h,
int numComponent) |
java.awt.image.WritableRaster |
createCompatibleWritableRaster(int w,
int h) |
static IcyColorModel |
createInstance()
Create default ColorModel : 4 components, unsigned byte data type
|
static IcyColorModel |
createInstance(IcyColorModel colorModel,
boolean copyColormap,
boolean copyBounds)
Creates a new ColorModel from a given icyColorModel
|
static IcyColorModel |
createInstance(int numComponents,
DataType dataType)
Creates a new ColorModel with the given color component and image data type
|
static IcyColorModel |
createInstance(int numComponents,
int dataType,
boolean signed)
Deprecated.
use
createInstance(int, DataType) instead |
java.awt.image.WritableRaster |
createWritableRaster(java.lang.Object[] data,
int w,
int h)
Create a writable raster from specified data and size.
|
static java.awt.image.WritableRaster |
createWritableRaster(java.lang.Object data,
int w,
int h)
Create a writable raster from specified data and size.
|
void |
endUpdate() |
boolean |
equals(java.lang.Object obj)
Tests if the specified
Object is an instance of ColorModel and if
it equals this ColorModel . |
void |
fireEvent(IcyColorModelEvent e)
fire event
|
int |
getAlpha(int pixel) |
int |
getAlpha(java.lang.Object pixel) |
int |
getBlue(int pixel) |
int |
getBlue(java.lang.Object pixel) |
IcyColorMap |
getColormap(int component)
Deprecated.
Use
getColorMap(int) instead (different case). |
IcyColorMap |
getColorMap(int component)
Return the toRGB colormap of specified RGB component
|
Scaler[] |
getColormapScalers() |
double[] |
getComponentAbsBounds(int component)
Get component absolute bounds (min and max values)
|
double |
getComponentAbsMaxValue(int component)
Get component absolute maximum value
|
double |
getComponentAbsMinValue(int component)
Get component absolute minimum value
|
int[] |
getComponents(int pixel,
int[] components,
int offset) |
abstract int[] |
getComponents(java.lang.Object pixel,
int[] components,
int offset) |
double[] |
getComponentUserBounds(int component)
Get component user bounds (min and max values)
|
double |
getComponentUserMaxValue(int component)
Get user component user maximum value
|
double |
getComponentUserMinValue(int component)
Get component user minimum value
|
int |
getDataElement(float[] normComponents,
int normOffset) |
int |
getDataElement(int[] components,
int offset) |
abstract java.lang.Object |
getDataElements(float[] normComponents,
int normOffset,
java.lang.Object obj) |
abstract java.lang.Object |
getDataElements(int[] components,
int offset,
java.lang.Object obj) |
java.lang.Object |
getDataElements(int rgb,
java.lang.Object pixel) |
DataType |
getDataType_()
Return data type for this colormodel
|
int |
getDataType()
Deprecated.
use
getDataType_() instead |
double[] |
getDefaultComponentBounds()
return default component bounds for this colormodel
|
int |
getGreen(int pixel) |
int |
getGreen(java.lang.Object pixel) |
IcyColorSpace |
getIcyColorSpace() |
float[] |
getNormalizedComponents(int[] components,
int offset,
float[] normComponents,
int normOffset) |
abstract float[] |
getNormalizedComponents(java.lang.Object pixel,
float[] normComponents,
int normOffset) |
Scaler[] |
getNormalScalers() |
int |
getNumComponents()
Returns the number of components in this
ColorModel . |
int |
getRed(int pixel) |
int |
getRed(java.lang.Object pixel) |
abstract int |
getRGB(java.lang.Object inData) |
abstract int |
getRGB(java.lang.Object pixel,
LUT lut) |
int[] |
getUnnormalizedComponents(float[] normComponents,
int normOffset,
int[] components,
int offset) |
boolean |
hasLinearColormaps()
Return true if color maps associated to this
IcyColorModel are all linear map. |
boolean |
isCompatible(IcyColorModel cm) |
boolean |
isCompatibleRaster(java.awt.image.Raster raster) |
boolean |
isCompatibleSampleModel(java.awt.image.SampleModel sm) |
boolean |
isFloatDataType()
Return true if colorModel is float data type
|
boolean |
isSignedDataType()
Return true if colorModel data type is signed
|
boolean |
isUpdating() |
void |
onChanged(CollapsibleEvent compare)
process on colormodel change
|
void |
removeListener(IcyColorModelListener listener)
Remove a listener
|
void |
scalerChanged(ScalerEvent e) |
void |
setBounds(IcyColorModel source)
Set bounds from specified
IcyColorModel |
void |
setColormap(int component,
IcyColorMap map)
Deprecated.
Use
setColorMap(int, IcyColorMap, boolean) instead. |
void |
setColorMap(int component,
IcyColorMap map,
boolean setAlpha)
Set the toRGB colormap of specified component (actually copy the content).
|
void |
setColormaps(java.awt.image.ColorModel source)
Deprecated.
Use
setColorMaps(ColorModel) instead (different case). |
void |
setColorMaps(java.awt.image.ColorModel source)
Set the toRGB colormaps from a compatible colorModel.
|
void |
setColorSpace(IcyColorSpace colorSpace)
Change the colorspace of the color model.
|
void |
setComponentAbsBounds(int component,
double[] bounds)
Set component absolute bounds (min and max values)
|
void |
setComponentAbsBounds(int component,
double min,
double max)
Set component absolute bounds (min and max values)
|
void |
setComponentAbsMaxValue(int component,
double max)
Set component absolute maximum value
|
void |
setComponentAbsMinValue(int component,
double min)
Set component absolute minimum value
|
void |
setComponentsAbsBounds(double[][] bounds)
Set components absolute bounds (min and max values)
|
void |
setComponentsUserBounds(double[][] bounds)
Set components user bounds (min and max values)
|
void |
setComponentUserBounds(int component,
double[] bounds)
Set component user bounds (min and max values)
|
void |
setComponentUserBounds(int component,
double min,
double max)
Set component user bounds (min and max values)
|
void |
setComponentUserMaxValue(int component,
double max)
Set component user maximum value
|
void |
setComponentUserMinValue(int component,
double min)
Set component user minimum value
|
java.lang.String |
toString()
Returns the
String representation of the contents of this ColorModel object. |
public static IcyColorModel createInstance(int numComponents, DataType dataType)
numComponents
- number of componentdataType
- the type of image data (see DataType
)@Deprecated public static IcyColorModel createInstance(int numComponents, int dataType, boolean signed)
createInstance(int, DataType)
insteadpublic static IcyColorModel createInstance(IcyColorModel colorModel, boolean copyColormap, boolean copyBounds)
colorModel
- icyColorModelcopyColormap
- flag to indicate if we want to copy colormaps from the given icyColorModelcopyBounds
- flag to indicate if we want to copy bounds from the given icyColorModelpublic static IcyColorModel createInstance()
public static java.awt.image.BandedSampleModel createCompatibleSampleModel(int transferType, int w, int h, int numComponent)
public static java.awt.image.WritableRaster createWritableRaster(java.lang.Object data, int w, int h)
public java.awt.image.SampleModel createCompatibleSampleModel(int w, int h)
createCompatibleSampleModel
in class java.awt.image.ColorModel
public java.awt.image.WritableRaster createCompatibleWritableRaster(int w, int h)
createCompatibleWritableRaster
in class java.awt.image.ColorModel
public java.awt.image.WritableRaster createWritableRaster(java.lang.Object[] data, int w, int h)
public void setBounds(IcyColorModel source)
IcyColorModel
@Deprecated public void copyBounds(IcyColorModel source)
setBounds(IcyColorModel)
instead.public IcyColorMap getColorMap(int component)
@Deprecated public IcyColorMap getColormap(int component)
getColorMap(int)
instead (different case).public void setColorMaps(java.awt.image.ColorModel source)
source
- source ColorModel to copy colormap from@Deprecated public void setColormaps(java.awt.image.ColorModel source)
setColorMaps(ColorModel)
instead (different case).@Deprecated public void copyColormap(java.awt.image.ColorModel source)
setColorMaps(ColorModel)
instead.public void setColorMap(int component, IcyColorMap map, boolean setAlpha)
component
- component we want to set the colormapmap
- source colormap to copysetAlpha
- also set the alpha information@Deprecated public void setColormap(int component, IcyColorMap map)
setColorMap(int, IcyColorMap, boolean)
instead.public int getAlpha(int pixel)
getAlpha
in class java.awt.image.ColorModel
ColorModel.getAlpha(int)
public int getBlue(int pixel)
getBlue
in class java.awt.image.ColorModel
ColorModel.getBlue(int)
public int getGreen(int pixel)
getGreen
in class java.awt.image.ColorModel
ColorModel.getGreen(int)
public int getRed(int pixel)
getRed
in class java.awt.image.ColorModel
ColorModel.getRed(int)
public abstract int getRGB(java.lang.Object inData)
getRGB
in class java.awt.image.ColorModel
public int getBlue(java.lang.Object pixel)
getBlue
in class java.awt.image.ColorModel
public int getGreen(java.lang.Object pixel)
getGreen
in class java.awt.image.ColorModel
public int getRed(java.lang.Object pixel)
getRed
in class java.awt.image.ColorModel
public int getAlpha(java.lang.Object pixel)
getAlpha
in class java.awt.image.ColorModel
public int[] getComponents(int pixel, int[] components, int offset)
getComponents
in class java.awt.image.ColorModel
ColorModel.getComponents(int, int[], int)
public abstract int[] getComponents(java.lang.Object pixel, int[] components, int offset)
getComponents
in class java.awt.image.ColorModel
ColorModel.getComponents(Object, int[], int)
public abstract float[] getNormalizedComponents(java.lang.Object pixel, float[] normComponents, int normOffset)
getNormalizedComponents
in class java.awt.image.ColorModel
ColorModel.getNormalizedComponents(Object, float[], int)
public float[] getNormalizedComponents(int[] components, int offset, float[] normComponents, int normOffset)
getNormalizedComponents
in class java.awt.image.ColorModel
ColorModel.getNormalizedComponents(int[], int, float[], int)
public int[] getUnnormalizedComponents(float[] normComponents, int normOffset, int[] components, int offset)
getUnnormalizedComponents
in class java.awt.image.ColorModel
ColorModel.getUnnormalizedComponents(float[], int, int[], int)
public int getDataElement(int[] components, int offset)
getDataElement
in class java.awt.image.ColorModel
ColorModel.getDataElement(int[], int)
public int getDataElement(float[] normComponents, int normOffset)
getDataElement
in class java.awt.image.ColorModel
ColorModel.getDataElement(float[], int)
public abstract java.lang.Object getDataElements(int[] components, int offset, java.lang.Object obj)
getDataElements
in class java.awt.image.ColorModel
ColorModel.getDataElements(int[], int, Object)
public java.lang.Object getDataElements(int rgb, java.lang.Object pixel)
getDataElements
in class java.awt.image.ColorModel
ColorModel.getDataElements(int, Object)
public abstract java.lang.Object getDataElements(float[] normComponents, int normOffset, java.lang.Object obj)
getDataElements
in class java.awt.image.ColorModel
ColorModel.getDataElements(float[], int, Object)
public java.awt.image.ColorModel coerceData(java.awt.image.WritableRaster raster, boolean isAlphaPremultiplied)
coerceData
in class java.awt.image.ColorModel
public boolean equals(java.lang.Object obj)
Object
is an instance of ColorModel
and if
it equals this ColorModel
.equals
in class java.awt.image.ColorModel
obj
- the Object
to test for equalitytrue
if the specified Object
is an instance of ColorModel
and
equals this ColorModel
; false
otherwise.public boolean isCompatible(IcyColorModel cm)
public boolean isCompatibleRaster(java.awt.image.Raster raster)
isCompatibleRaster
in class java.awt.image.ColorModel
public boolean isCompatibleSampleModel(java.awt.image.SampleModel sm)
isCompatibleSampleModel
in class java.awt.image.ColorModel
public IcyColorSpace getIcyColorSpace()
public void setColorSpace(IcyColorSpace colorSpace)
public Scaler[] getNormalScalers()
public Scaler[] getColormapScalers()
public int getNumComponents()
ColorModel
.getNumComponents
in class java.awt.image.ColorModel
ColorModel
@Deprecated public int getDataType()
getDataType_()
insteadpublic DataType getDataType_()
DataType
public double[] getDefaultComponentBounds()
public double getComponentAbsMinValue(int component)
public double getComponentAbsMaxValue(int component)
public double[] getComponentAbsBounds(int component)
public double getComponentUserMinValue(int component)
public double getComponentUserMaxValue(int component)
public double[] getComponentUserBounds(int component)
public void setComponentAbsMinValue(int component, double min)
public void setComponentAbsMaxValue(int component, double max)
public void setComponentAbsBounds(int component, double[] bounds)
public void setComponentAbsBounds(int component, double min, double max)
public void setComponentUserMinValue(int component, double min)
public void setComponentUserMaxValue(int component, double max)
public void setComponentUserBounds(int component, double[] bounds)
public void setComponentUserBounds(int component, double min, double max)
public void setComponentsAbsBounds(double[][] bounds)
public void setComponentsUserBounds(double[][] bounds)
public boolean isFloatDataType()
public boolean isSignedDataType()
public boolean hasLinearColormaps()
IcyColorModel
are all linear map.IcyColorMap.isLinear()
public java.lang.String toString()
String
representation of the contents of this ColorModel
object.toString
in class java.awt.image.ColorModel
String
representing the contents of this ColorModel
object.public void addListener(IcyColorModelListener listener)
listener
- public void removeListener(IcyColorModelListener listener)
listener
- public void fireEvent(IcyColorModelEvent e)
e
- public void onChanged(CollapsibleEvent compare)
onChanged
in interface ChangeListener
public void scalerChanged(ScalerEvent e)
scalerChanged
in interface ScalerListener
public void colorSpaceChanged(IcyColorSpaceEvent e)
colorSpaceChanged
in interface IcyColorSpaceListener
public void beginUpdate()
public void endUpdate()
public boolean isUpdating()