|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjjil.core.PipelineStage
jjil.algorithm.RgbCrop
public class RgbCrop
Pipeline stage crops a gray image to a given rectangular cropping window.
Constructor Summary | |
---|---|
RgbCrop(int x,
int y,
int width,
int height)
Creates a new instance of RgbCrop. |
Method Summary | |
---|---|
int |
getHeight()
Gets the cropping window height |
int |
getLeft()
Gets the cropping window left edge |
int |
getTop()
Gets the cropping window top |
int |
getWidth()
Gets the cropping window width |
void |
push(Image image)
Crops the input RGB image to the cropping window that was specified in the constructor. |
void |
setWindow(int x,
int y,
int width,
int height)
Change the cropping window. |
java.lang.String |
toString()
Return a string describing the cropping 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 |
Constructor Detail |
---|
public RgbCrop(int x, int y, int width, int height) throws Error
x
- left edge of cropping windowy
- top edge of cropping windowwidth
- width of cropping windowheight
- height of cropping window
Error
- if the top left corner of the
window is negative, or the window area is non-positive.Method Detail |
---|
public void push(Image image) throws Error
push
in class PipelineStage
image
- the input image.
Error
- if the cropping window
extends outside the input image, or the input image
is not an RgbImage.public int getHeight()
public int getLeft()
public int getTop()
public int getWidth()
public void setWindow(int x, int y, int width, int height) throws Error
x
- left edge of cropping windowy
- top edge of cropping windowwidth
- width of cropping windowheight
- height of cropping window
Error
- if the top left corner of the
window is negative, or the window area is non-positive.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 |