cz.cuni.jagrlib.iface
Interface ColormapStore

All Superinterfaces:
Property
All Known Implementing Classes:
Colormaps, SampleColormap

public interface ColormapStore
extends Property

Abstract colormap storage. Colormap is "<0,size()-1> -> { Gr[A] | RGB[A] }" mapping. Store can hold a sequence of M colormaps at time.

Since:
0.04
See Also:
ColormapStore.java

Field Summary
 
Fields inherited from interface cz.cuni.jagrlib.iface.Property
LOGGING, STATISTICS, TEXT_DESCRIPTION
 
Method Summary
 int[][] getColormap(int i)
          Retrieves the i-th colormap.
 double[][] getColormapDouble(int i)
          Retrieves the i-th colormap.
 void init()
          Store re-initialization (keeps current colormap mode).
 void init(int _mode, int _bands)
          Store (re-)initialization.
 double[][] setColormap(int i, double[][] cmap)
          Assigns the i-th colormap.
 int[][] setColormap(int i, int[][] cmap)
          Assigns the i-th colormap.
 int setSize(int newSize)
          Assigns the new store size (potentially discards some colormaps).
 int size()
          Returns the store size (colormaps are indexed from 0 to size()-1).
 
Methods inherited from interface cz.cuni.jagrlib.iface.Property
commit, get, set
 

Method Detail

init

void init(int _mode,
          int _bands)
Store (re-)initialization.

Parameters:
_mode - Colormap item value type (RasterGraphics.MODE_* constant).
_bands - Number of bands (for RasterGraphics.MODE_BAND).
See Also:
RasterGraphics, init()

init

void init()
Store re-initialization (keeps current colormap mode).

See Also:
init(int,int)

size

int size()
Returns the store size (colormaps are indexed from 0 to size()-1).

Returns:
Store size.
See Also:
setSize(int)

setSize

int setSize(int newSize)
Assigns the new store size (potentially discards some colormaps).

Parameters:
newSize - The new store size.
Returns:
The old store size.
See Also:
size()

getColormapDouble

double[][] getColormapDouble(int i)
Retrieves the i-th colormap.

Parameters:
i - Colormap index (from 0 to size()-1).
Returns:
Array holding the colormap data.
See Also:
getColormap(int)

getColormap

int[][] getColormap(int i)
Retrieves the i-th colormap.

Parameters:
i - Colormap index (from 0 to size()-1).
Returns:
Array holding the colormap data.
See Also:
getColormapDouble(int)

setColormap

int[][] setColormap(int i,
                    int[][] cmap)
Assigns the i-th colormap.

Parameters:
i - Colormap index.
cmap - The new colormap data (or null).
Returns:
Array holding the old colormap data (or null).
See Also:
setColormap(int,double[][])

setColormap

double[][] setColormap(int i,
                       double[][] cmap)
Assigns the i-th colormap.

Parameters:
i - Colormap index.
cmap - The new colormap data (or null).
Returns:
Array holding the old colormap data (or null).
See Also:
setColormap(int,int[][])