|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjjil.core.PipelineStage
jjil.algorithm.GrayReduce
public class GrayReduce
Pipeline stage reduces an image's size by rectangular averaging. The reduction factor must evenly divide the image size. No smoothing is done.
Constructor Summary | |
---|---|
GrayReduce(int cReduceWidth,
int cReduceHeight)
Creates a new instance of GrayReduce. |
Method Summary | |
---|---|
int |
getHeightReduction()
Returns the height reduction factor. |
int |
getWidthReduction()
Returns the width reduction factor. |
void |
push(Image image)
Reduces a gray image by a factor horizontally and vertically through averaging. |
void |
setReductionFactor(int cReduceWidth,
int cReduceHeight)
Sets a new width, height reduction factor. |
java.lang.String |
toString()
Return a string describing the reduction 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 GrayReduce(int cReduceWidth, int cReduceHeight) throws Error
cReduceWidth
- amount to reduce the width bycReduceHeight
- amount to reduce the height by
Error
- if the reduce width or height is less than or equal to zero.Method Detail |
---|
public void push(Image image) throws Error
push
in class PipelineStage
image
- the input image.
Error
- if the input image is not gray, or
the reduction factor does not evenly divide the image size.public int getHeightReduction()
public int getWidthReduction()
public void setReductionFactor(int cReduceWidth, int cReduceHeight) throws Error
cReduceWidth
- the amount by which to reduce the image width.cReduceHeight
- the amount by which to reduce the image height.
Error
- if either cReduceWidth or cReduceHeight
is less than or equal to 0.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 |