jjil.algorithm
Class Gray8Rect

java.lang.Object
  extended by jjil.core.PipelineStage
      extended by jjil.algorithm.Gray8Rect

public class Gray8Rect
extends PipelineStage

Pipeline stage assigns a constant value to a rectangle in an input Gray8Image to produce an output Gray8Image.

Author:
webb

Constructor Summary
Gray8Rect(int cX, int cY, int nWidth, int nHeight, byte bValue)
          Creates a new instance of Gray8Rect.
 
Method Summary
 void push(Image image)
          Assigns a constant rectangle to the input Gray8Image, replacing values in the image.
 void setWindow(int cX, int cY, int nWidth, int nHeight)
           
 
Methods inherited from class jjil.core.PipelineStage
getFront, isEmpty
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Gray8Rect

public Gray8Rect(int cX,
                 int cY,
                 int nWidth,
                 int nHeight,
                 byte bValue)
          throws Error
Creates a new instance of Gray8Rect.

Parameters:
cX - The horizontal offset of the rectangle.
cY - the vertical offset of the rectangle.
nWidth - the width of the rectangle.
nHeight - the height of the rectangle.
bValue - the value to be assigned to the rectangle.
Throws:
Error - if the height or width of the rectange is negative or zero.
Method Detail

push

public void push(Image image)
          throws Error
Assigns a constant rectangle to the input Gray8Image, replacing values in the image.

Specified by:
push in class PipelineStage
Parameters:
image - the input image (output replaces input).
Throws:
Error - if the input is not a Gray8Image.

setWindow

public void setWindow(int cX,
                      int cY,
                      int nWidth,
                      int nHeight)
               throws Error
Parameters:
cX - Top-left horizontal coordinate of the rectangle.
cY - top-left vertical coordinate of the rectangle.
nWidth - Width of the rectangle.
nHeight - Height of the rectangle.
Throws:
Error - if the width or height is negative or zero.