ICY Version 1.0.1.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes

icy.image.colormodel.IcyColorModel Class Reference

Inheritance diagram for icy.image.colormodel.IcyColorModel:
icy.math.ScalerListener icy.image.colorspace.IcyColorSpaceListener icy.common.IcyChangedListener icy.image.colormodel.ByteColorModel icy.image.colormodel.DoubleColorModel icy.image.colormodel.FloatColorModel icy.image.colormodel.IntColorModel icy.image.colormodel.ShortColorModel icy.image.colormodel.UByteColorModel icy.image.colormodel.UIntColorModel icy.image.colormodel.UShortColorModel

List of all members.

Public Member Functions

 IcyColorModel (int numComponents, int dataType, boolean signed, int bits[])
SampleModel createCompatibleSampleModel (int w, int h)
WritableRaster createCompatibleWritableRaster (int w, int h)
void copyColormap (ColorModel source)
void copyBounds (IcyColorModel source)
void setColormap (int component, IcyColorMap map)
IcyColorMap getColormap (int component)
int getAlpha (int pixel)
int getBlue (int pixel)
int getGreen (int pixel)
int getRed (int pixel)
abstract int getRGB (Object inData)
abstract int getRGB (Object pixel, LUT lut)
int getBlue (Object pixel)
int getGreen (Object pixel)
int getRed (Object pixel)
int getAlpha (Object pixel)
int[] getComponents (int pixel, int[] components, int offset)
abstract int[] getComponents (Object pixel, int[] components, int offset)
abstract float[] getNormalizedComponents (Object pixel, float[] normComponents, int normOffset)
float[] getNormalizedComponents (int[] components, int offset, float[] normComponents, int normOffset)
int[] getUnnormalizedComponents (float[] normComponents, int normOffset, int[] components, int offset)
int getDataElement (int[] components, int offset)
int getDataElement (float[] normComponents, int normOffset)
abstract Object getDataElements (int[] components, int offset, Object obj)
Object getDataElements (int rgb, Object pixel)
abstract Object getDataElements (float[] normComponents, int normOffset, Object obj)
ColorModel coerceData (WritableRaster raster, boolean isAlphaPremultiplied)
boolean equals (Object obj)
boolean isCompatible (IcyColorModel cm)
boolean isCompatibleRaster (Raster raster)
boolean isCompatibleSampleModel (SampleModel sm)
IcyColorSpace getIcyColorSpace ()
Scaler[] getNormalScalers ()
Scaler[] getColormapScalers ()
int getNumComponents ()
int getDataType ()
double[] getDefaultComponentBounds ()
double getComponentMinValue (int component)
double getComponentMaxValue (int component)
double[] getComponentBounds (int component)
double getComponentUserMinValue (int component)
double getComponentUserMaxValue (int component)
double[] getComponentUserBounds (int component)
void setComponentMinValue (int component, double min)
void setComponentMaxValue (int component, double max)
void setComponentBounds (int component, double[] bounds)
void setComponentBounds (int component, double min, double max)
void setComponentUserMinValue (int component, double min)
void setComponentUserMaxValue (int component, double max)
void setComponentUserBounds (int component, double[] bounds)
void setComponentUserBounds (int component, double min, double max)
void setComponentsBounds (double[][] bounds)
void setComponentsUserBounds (double[][] bounds)
boolean isFloatDataType ()
boolean isSignedDataType ()
String toString ()
void addListener (IcyColorModelListener listener)
void removeListener (IcyColorModelListener listener)
void fireEvent (IcyColorModelEvent e)
void onChanged (EventHierarchicalChecker compare)
void scalerChanged (ScalerEvent e)
void colorSpaceChanged (IcyColorSpaceEvent e)
void beginUpdate ()
void endUpdate ()
boolean isUpdating ()

Static Public Member Functions

static double[] getDefaultBounds (int dataType, boolean signed)
static IcyColorModel createInstance (int numComponents, int dataType, boolean signed)
static IcyColorModel createInstance (IcyColorModel colorModel, boolean copyColormap, boolean copyBounds)
static IcyColorModel createInstance ()

Protected Member Functions

double colormapScale (int component, double value)

Protected Attributes

final Scaler[] normalScalers
final Scaler[] colormapScalers
final boolean signedDataType
final int numComponents
final IcyColorSpace colorSpace

Detailed Description

Author:
stephane

Constructor & Destructor Documentation

icy.image.colormodel.IcyColorModel.IcyColorModel ( int  numComponents,
int  dataType,
boolean  signed,
int  bits[] 
)
Parameters:
bits

Member Function Documentation

void icy.image.colormodel.IcyColorModel.addListener ( IcyColorModelListener  listener)

Add a listener

Parameters:
listener
double icy.image.colormodel.IcyColorModel.colormapScale ( int  component,
double  value 
) [protected]

Scale input value for colormap indexing

void icy.image.colormodel.IcyColorModel.copyBounds ( IcyColorModel  source)

Copy bounds from specified colorModel

void icy.image.colormodel.IcyColorModel.copyColormap ( ColorModel  source)

Set the toRGB colormaps from a compatible colorModel

static IcyColorModel icy.image.colormodel.IcyColorModel.createInstance ( int  numComponents,
int  dataType,
boolean  signed 
) [static]

Creates a new ColorModel with the given color component and image data type

Parameters:
numComponentsnumber of component
dataTypethe type of image data (one of the icy.type.TypeUtil.TYPE_* constants)
Returns:
a IcyColorModel object
static IcyColorModel icy.image.colormodel.IcyColorModel.createInstance ( ) [static]

Create default ColorModel : 4 components, unsigned byte data type

static IcyColorModel icy.image.colormodel.IcyColorModel.createInstance ( IcyColorModel  colorModel,
boolean  copyColormap,
boolean  copyBounds 
) [static]

Creates a new ColorModel from a given icyColorModel

Parameters:
colorModelicyColorModel
copyColormapflag to indicate if we want to copy colormaps from the given icyColorModel
copyBoundsflag to indicate if we want to copy bounds from the given icyColorModel
Returns:
a IcyColorModel object
boolean icy.image.colormodel.IcyColorModel.equals ( Object  obj)

Tests if the specified Object is an instance of ColorModel and if it equals this ColorModel.

Parameters:
objthe Object to test for equality
Returns:
true if the specified Object is an instance of ColorModel and equals this ColorModel; false otherwise.
void icy.image.colormodel.IcyColorModel.fireEvent ( IcyColorModelEvent  e)

fire event

Parameters:
e
int icy.image.colormodel.IcyColorModel.getAlpha ( int  pixel)
See also:
java.awt.image.ColorModel.getAlpha(int)
int icy.image.colormodel.IcyColorModel.getBlue ( int  pixel)
See also:
java.awt.image.ColorModel.getBlue(int)
IcyColorMap icy.image.colormodel.IcyColorModel.getColormap ( int  component)

Return the toRGB colormap of specified RGB component

Scaler [] icy.image.colormodel.IcyColorModel.getColormapScalers ( )
Returns:
the colormapScalers
double [] icy.image.colormodel.IcyColorModel.getComponentBounds ( int  component)

Get component bounds (min and max values)

double icy.image.colormodel.IcyColorModel.getComponentMaxValue ( int  component)

Get component maximum value

double icy.image.colormodel.IcyColorModel.getComponentMinValue ( int  component)

Get component minimum value

int [] icy.image.colormodel.IcyColorModel.getComponents ( int  pixel,
int[]  components,
int  offset 
)
See also:
java.awt.image.ColorModel.getComponents(int, int[], int)
abstract int [] icy.image.colormodel.IcyColorModel.getComponents ( Object  pixel,
int[]  components,
int  offset 
) [pure virtual]
double [] icy.image.colormodel.IcyColorModel.getComponentUserBounds ( int  component)

Get component user bounds (min and max values)

double icy.image.colormodel.IcyColorModel.getComponentUserMaxValue ( int  component)

Get user component user maximum value

double icy.image.colormodel.IcyColorModel.getComponentUserMinValue ( int  component)

Get component user minimum value

int icy.image.colormodel.IcyColorModel.getDataElement ( int[]  components,
int  offset 
)
See also:
java.awt.image.ColorModel.getDataElement(int[], int)
int icy.image.colormodel.IcyColorModel.getDataElement ( float[]  normComponents,
int  normOffset 
)
See also:
java.awt.image.ColorModel.getDataElement(float[], int)
abstract Object icy.image.colormodel.IcyColorModel.getDataElements ( int[]  components,
int  offset,
Object  obj 
) [pure virtual]
Object icy.image.colormodel.IcyColorModel.getDataElements ( int  rgb,
Object  pixel 
)
See also:
java.awt.image.ColorModel.getDataElements(int, Object)
abstract Object icy.image.colormodel.IcyColorModel.getDataElements ( float[]  normComponents,
int  normOffset,
Object  obj 
) [pure virtual]
int icy.image.colormodel.IcyColorModel.getDataType ( )

Return data type (same as getTransferType)

Returns:
data type
static double [] icy.image.colormodel.IcyColorModel.getDefaultBounds ( int  dataType,
boolean  signed 
) [static]

Get the default bounds for the specified dataType

double [] icy.image.colormodel.IcyColorModel.getDefaultComponentBounds ( )

return default component bounds for this colormodel

int icy.image.colormodel.IcyColorModel.getGreen ( int  pixel)
See also:
java.awt.image.ColorModel.getGreen(int)
IcyColorSpace icy.image.colormodel.IcyColorModel.getIcyColorSpace ( )
Returns:
the IcyColorSpace
abstract float [] icy.image.colormodel.IcyColorModel.getNormalizedComponents ( Object  pixel,
float[]  normComponents,
int  normOffset 
) [pure virtual]
float [] icy.image.colormodel.IcyColorModel.getNormalizedComponents ( int[]  components,
int  offset,
float[]  normComponents,
int  normOffset 
)
See also:
java.awt.image.ColorModel.getNormalizedComponents(int[], int, float[], int)
Scaler [] icy.image.colormodel.IcyColorModel.getNormalScalers ( )
Returns:
the normalScalers
int icy.image.colormodel.IcyColorModel.getNumComponents ( )

Returns the number of components in this ColorModel.
Note that alpha is embedded so we always have NumColorComponent = NumComponent

Returns:
the number of components in this ColorModel
int icy.image.colormodel.IcyColorModel.getRed ( int  pixel)
See also:
java.awt.image.ColorModel.getRed(int)
int [] icy.image.colormodel.IcyColorModel.getUnnormalizedComponents ( float[]  normComponents,
int  normOffset,
int[]  components,
int  offset 
)
See also:
java.awt.image.ColorModel.getUnnormalizedComponents(float[], int, int[], int)
boolean icy.image.colormodel.IcyColorModel.isFloatDataType ( )

Return true if colorModel is float typed

boolean icy.image.colormodel.IcyColorModel.isSignedDataType ( )

Return true if colorModel type is signed

void icy.image.colormodel.IcyColorModel.onChanged ( EventHierarchicalChecker  compare)

process on colormodel change

Implements icy.common.IcyChangedListener.

void icy.image.colormodel.IcyColorModel.removeListener ( IcyColorModelListener  listener)

Remove a listener

Parameters:
listener
void icy.image.colormodel.IcyColorModel.setColormap ( int  component,
IcyColorMap  map 
)

Set the toRGB colormap of specified component

void icy.image.colormodel.IcyColorModel.setComponentBounds ( int  component,
double  min,
double  max 
)

Set component bounds (min and max values)

void icy.image.colormodel.IcyColorModel.setComponentBounds ( int  component,
double[]  bounds 
)

Set component bounds (min and max values)

void icy.image.colormodel.IcyColorModel.setComponentMaxValue ( int  component,
double  max 
)

Set component maximum value

void icy.image.colormodel.IcyColorModel.setComponentMinValue ( int  component,
double  min 
)

Set component minimum value

void icy.image.colormodel.IcyColorModel.setComponentsBounds ( double  bounds[][])

Set components bounds (min and max values)

void icy.image.colormodel.IcyColorModel.setComponentsUserBounds ( double  bounds[][])

Set components user bounds (min and max values)

void icy.image.colormodel.IcyColorModel.setComponentUserBounds ( int  component,
double  min,
double  max 
)

Set component user bounds (min and max values)

void icy.image.colormodel.IcyColorModel.setComponentUserBounds ( int  component,
double[]  bounds 
)

Set component user bounds (min and max values)

void icy.image.colormodel.IcyColorModel.setComponentUserMaxValue ( int  component,
double  max 
)

Set component user maximum value

void icy.image.colormodel.IcyColorModel.setComponentUserMinValue ( int  component,
double  min 
)

Set component user minimum value

String icy.image.colormodel.IcyColorModel.toString ( )

Returns the String representation of the contents of this ColorModelobject.

Returns:
a String representing the contents of this ColorModel object.

Member Data Documentation

scalers for colorMap

scalers for normalization

overridden variables

used signed data type (only for non float type)


The documentation for this class was generated from the following file:
 All Classes Functions Variables