|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjjil.core.PipelineStage
jjil.algorithm.GrayShrink
public class GrayShrink
Shrinks an input Gray8Image to a given new size. The shrinking is done with proper averaging so each output pixel is the average of the corresponding rectangular region in the input.
Constructor Summary | |
---|---|
GrayShrink(int cWidth,
int cHeight)
Creates a new instance of GrayRectStretch. |
Method Summary | |
---|---|
int |
getHeight()
Gets current target height |
int |
getWidth()
Gets current target width |
void |
push(Image image)
Process an input Gray8Image, producing a new shrunk output image. |
void |
setHeight(int cHeight)
Changes target height |
void |
setWidth(int cWidth)
Changes target width |
java.lang.String |
toString()
Return a string describing the shrinking 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 GrayShrink(int cWidth, int cHeight) throws Error
cWidth
- new image widthcHeight
- new image height
Error
- if either is less than or equal to zero.Method Detail |
---|
public int getHeight()
public int getWidth()
public void push(Image image) throws Error
push
in class PipelineStage
image
- The input Gray8Image.
Error
- if input is not a Gray8Image, or the input image size is smaller (either
horizontally or vertically) than the desired size.public void setHeight(int cHeight) throws Error
cHeight
- the new target height.
Error
- if height is not positivepublic void setWidth(int cWidth) throws Error
cWidth
- the new target width.
Error
- if height is not positivepublic 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 |