|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjjil.core.PipelineStage
jjil.algorithm.RgbSelect2Gray
public class RgbSelect2Gray
Transforms a RgbImage into a Gray8Image by selecting one of the three bands. The pixel value chosen is adjusted from the range 0->255 to the range -128->127.
Usage:
RgbImage imageRgb = ...;
RgbSelect2Gray rgb = new RgbSelect2Gray(RgbSelect2Gray.RED);
rgb.push(imageRgb);
| Nested Class Summary | |
|---|---|
static class |
RgbSelect2Gray.ColorClass
Used to represent the three colors red, green, or blue. |
| Field Summary | |
|---|---|
static RgbSelect2Gray.ColorClass |
BLUE
The class represents the color blue. |
static RgbSelect2Gray.ColorClass |
GREEN
The class represents the color green. |
static RgbSelect2Gray.ColorClass |
RED
The class represents the color red. |
| Constructor Summary | |
|---|---|
RgbSelect2Gray(RgbSelect2Gray.ColorClass color)
Creates a new instance of RgbSelect2Gray. |
|
| Method Summary | |
|---|---|
RgbSelect2Gray.ColorClass |
getColor()
Returns the current color selected. |
void |
push(Image image)
Convert a color image to gray by selecting one of the color bands: red, green, or blue. |
void |
setColor(RgbSelect2Gray.ColorClass color)
Changes the color selected. |
java.lang.String |
toString()
Return a string describing the RGB select operation. |
| Methods inherited from class jjil.core.PipelineStage |
|---|
getFront, isEmpty |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final RgbSelect2Gray.ColorClass RED
public static final RgbSelect2Gray.ColorClass GREEN
public static final RgbSelect2Gray.ColorClass BLUE
| Constructor Detail |
|---|
public RgbSelect2Gray(RgbSelect2Gray.ColorClass color)
throws Error
color - the color selected from the color image to create the gray image.
Error - if color is not RED, GREEN, or BLUE.| Method Detail |
|---|
public RgbSelect2Gray.ColorClass getColor()
public void push(Image image)
throws Error
push in class PipelineStageimage - the input image
Error - if the input image is not a color
image.
public void setColor(RgbSelect2Gray.ColorClass color)
throws Error
color - the new color selected
Error - if the input color is not ColorClass.RED, GREEN, or BLUE.public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||