jjil.algorithm
Class Gray2Rgb

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

public class Gray2Rgb
extends PipelineStage

Gray2Rgb converts an 8-bit gray image to RGB by replicating the gray values into R, G, and B. The signed byte values in the gray image are changed into unsigned byte values in the ARGB word.

Author:
webb

Constructor Summary
Gray2Rgb()
          Creates a new instance of Gray2Rgb
 
Method Summary
 void push(Image image)
          Converts an 8-bit gray image into an RGB image by replicating R, G, and B values.
 
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

Gray2Rgb

public Gray2Rgb()
Creates a new instance of Gray2Rgb

Method Detail

push

public void push(Image image)
          throws Error
Converts an 8-bit gray image into an RGB image by replicating R, G, and B values. Also changes the data range of the bytes from -128->127 to 0->255.

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