net.grelf.grip
Class Pseudocolour

java.lang.Object
  extended by net.grelf.grip.Pseudocolour

public class Pseudocolour
extends java.lang.Object

Class for applying a pseudocolour look-up table (LUT) to an image. This should be used on monochrome images but interesting effects may be obtainable on some coloured images. The LUT uses 3 channels (RGB) to produce colour.


Constructor Summary
Pseudocolour(Image image)
          Create a 3-channel (RGB) LUT (look-up table) with the number of levels in the given image.
 
Method Summary
 void apply(java.awt.image.BufferedImage bim)
          Apply the LUT to the given image.
 void apply(Image image)
          Apply the LUT to the given image.
 void contour(int interval)
          Set black at regular intervals in the LUT.
 int[][] getLUT()
          Get a reference to the look-up table, indexed as [look-up value][channel].
 void invert()
          Invert the colours in the LUT.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pseudocolour

public Pseudocolour(Image image)
Create a 3-channel (RGB) LUT (look-up table) with the number of levels in the given image.

Method Detail

getLUT

public int[][] getLUT()
Get a reference to the look-up table, indexed as [look-up value][channel].


apply

public void apply(java.awt.image.BufferedImage bim)
Apply the LUT to the given image. The image should be monochrome but interesting effects may be obtainable with other images.


apply

public void apply(Image image)
Apply the LUT to the given image. The image should be monochrome but interesting effects may be obtainable with other images.


contour

public void contour(int interval)
Set black at regular intervals in the LUT.


invert

public void invert()
Invert the colours in the LUT.