JIGL
v1.6

jigl.image.ops.levelOps
Class ByteSize

java.lang.Object
  |
  +--jigl.image.SimpleOperator
        |
        +--jigl.image.ops.levelOps.ByteSize
All Implemented Interfaces:
Operator

public class ByteSize
extends SimpleOperator

Performs a ByteSize operation on an image. image is changed in all the methods of this class. Supports GrayImage, RealGrayImage, ColorImage and RealColorImage.

ByteSize operation is to scale the range of each plane of an image to [0..255].


Constructor Summary
ByteSize()
          Constructor.
 
Method Summary
protected  Image apply(ColorImage image)
          ByteSizes the range of image.
protected  Image apply(GrayImage image)
          ByteSizes the range of image.
protected  Image apply(RealColorImage image)
          ByteSizes the range of image.
protected  Image apply(RealGrayImage image)
          ByteSizes the range of image.
static void main(String[] argv)
          For commandline operation.
 
Methods inherited from class jigl.image.SimpleOperator
apply, apply, apply, apply, apply, apply, apply, apply, apply, apply
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteSize

public ByteSize()
Constructor.

Method Detail

apply

protected Image apply(GrayImage image)
ByteSizes the range of image.

Overrides:
apply in class SimpleOperator
Parameters:
image - GrayImage to byte-size.
Returns:
image.

apply

protected Image apply(RealGrayImage image)
ByteSizes the range of image.

Overrides:
apply in class SimpleOperator
Parameters:
image - RealGrayImage to byte-size
Returns:
image

apply

protected Image apply(ColorImage image)
ByteSizes the range of image. The range used for all planes is the global maximum, minimum of the image.

Overrides:
apply in class SimpleOperator
Parameters:
image - ColorImage to byte-size.
Returns:
image.

apply

protected Image apply(RealColorImage image)
ByteSizes the range of image. The range used for all planes is the global max, min of the image.

Overrides:
apply in class SimpleOperator
Parameters:
image - RealColorImage to byte-size.
Returns:
image.

main

public static void main(String[] argv)
For commandline operation. You should provide two argument: the image file name, and the result image file name.


JIGL
v1.6

Submit a bug or feature
Revised in May 2002 by Weiming Liu