![]() | [using it] | Interface Manipulation Package v4.0 (2008-06-25) | ![]() | ©copyright | ![]() |
java.lang.Objectimp.ima.util.RgbFilter
public class RgbFilter
Encapsulates a RGB color image filter.
Constructor Summary | |
---|---|
RgbFilter(boolean channel,
boolean neighbor,
int borderSize,
int borderValue)
Creates a RgbFilter. |
Method Summary | |
---|---|
void |
filterChannel(char channel,
int[] src,
int[] dst,
int width,
int height)
Defines the filter operation on each red-green-blue channel level. |
void |
filterRGB(int[] src,
int[] dst,
int width,
int height)
Defines the filter operation at the RGB pixels buffer level. |
int |
getChannel(int ij,
int src)
Defines the filter operation at the red-green-blue pixel level. |
int |
getChannel(int ij,
int width,
int[] src)
Defines the filter operation at the red-green-blue pixel neighborhood level. |
int |
getRGB(int ij,
int width,
int[] red,
int[] green,
int[] blue)
Defines the filter operation at the RGB pixel neighborhood level. |
int |
getRGB(int ij,
int red,
int green,
int blue)
Defines the filter operation at the RGB pixel level. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RgbFilter(boolean channel, boolean neighbor, int borderSize, int borderValue)
channel
- [optional, default is false] If true filter each red-green-blue channel, else filter the RGB pixel.neighbor
- [optional, default is borderSize != 0] If true, defines the filter operation at the RGB pixel neighborhood level.
If false defines the filter operation at the punctual RGB pixel.borderSize
- [optional, default is 0] Border size: width/height in pixel on the image border where the filter must not be computed.borderValue
- [optional, default is 0] Border RGB value: value to be set on border where the filter is not computed.Method Detail |
---|
public void filterChannel(char channel, int[] src, int[] dst, int width, int height)
channel
- 'r' for red, 'g' for green, 'b' for bluesrc
- Input buffer, may be null if e.g. the filter generates an image.dst
- Output buffer, may be null if the filter has no output by computes global values in the image.width
- Image width.height
- Image height.public void filterRGB(int[] src, int[] dst, int width, int height)
src
- Input buffer, may be null if e.g. the filter generates an image.dst
- Output buffer, may be null if the filter has no output but computes global values in the image.width
- Image width.height
- Image height.public int getChannel(int ij, int src)
ij
- Buffer index with pixels[i,j] = pixels[ij = i + j * width]src
- Red/Green/Blue channel value.public int getChannel(int ij, int width, int[] src)
ij
- Buffer index with pixels[i,j] = pixels[ij = i + j * width]width
- Buffer width.src
- Red/Green/Blue channel buffer.public int getRGB(int ij, int width, int[] red, int[] green, int[] blue)
ij
- Buffer index with pixels[i,j] = pixels[ij = i + j * width]width
- Buffer width.red
- Red channel buffer.green
- Green channel buffer.blue
- Blue channel buffer.public int getRGB(int ij, int red, int green, int blue)
ij
- Buffer index with pixels[i,j] = pixels[ij = i + j * width]red
- Red channel value.green
- Green channel value.blue
- Blue channel value.