Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.vistech.imageviewer
Class WindowLevel

    java.lang.Object
      |
      +--com.vistech.imageviewer.WindowLevel

public class WindowLevel
extends java.lang.Object

Implements the Window/Level feature.

Version:
  1.0 4 Dec 2001
Author:
  Lawrence Rodrigues

Field Summary
`protected ImageDisplay` | `imageCanvas`
`protected int` | `level`
`protected int` | `LUT_SIZE`
`protected int` | `lutSize`
`protected int` | `MAX_SCREEN_VALUE`
`protected int` | `maxValue`
`protected int` | `MIN_SCREEN_VALUE`
`protected int` | `minValue`
`protected int` | `window`
`protected java.awt.image.BufferedImage` | `wlImage`

Constructor Summary
`WindowLevel(ImageDisplay imageCanvas)` The WindowLevel constructor.

Method Summary
`java.awt.image.ByteLookupTable` | `createByteLookupTable(int win, int lev)` Creates a lookup table for the specified window width and level.
`int` | `getLevel()`
`int` | `getLUTSize()`
`int` | `getWindow()`
`void` | `setLevel(int lev)` Sets the level.
`void` | `setLUTSize(int size)` Sets the size of the lookup table.
`void` | `setWindow(int win)` Sets the window width.
`void` | `setWindowLevel(int win, int lev)` Sets the window width and level.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### minValue

    protected int minValue

### maxValue

    protected int maxValue

### MIN_SCREEN_VALUE

    protected int MIN_SCREEN_VALUE

### MAX_SCREEN_VALUE

    protected int MAX_SCREEN_VALUE

### LUT_SIZE

    protected int LUT_SIZE

### lutSize

    protected int lutSize

### wlImage

    protected java.awt.image.BufferedImage wlImage

### window

    protected int window

### level

    protected int level

### imageCanvas

    protected ImageDisplay imageCanvas

Constructor Detail

### WindowLevel

    public WindowLevel(ImageDisplay imageCanvas)

  The WindowLevel constructor.
  Parameters:
    `imageCanvas` - the canvas in which the image is drawn.

Method Detail

### setLUTSize

    public void setLUTSize(int size)

  Sets the size of the lookup table.
  Parameters:
    `size` - the lookup table size.

### getLUTSize

    public int getLUTSize()

  Returns:
    the the LUT size;

### setWindow

    public void setWindow(int win)

  Sets the window width.
  Parameters:
    `win` - width of the window.

### getWindow

    public int getWindow()

  Returns:
    the window value;

### setLevel

    public void setLevel(int lev)

  Sets the level.
  Parameters:
    `lev` - the level.

### getLevel

    public int getLevel()

  Returns:
    the level value;

### setWindowLevel

    public void setWindowLevel(int win,
                               int lev)

  Sets the window width and level. This methods calls the createByteLookupTable()to create a lookup table for the window and level values specified in the input. Using this lookup table, creates a LookupOp object which is used for applying the lookup table to the image displayed on the canvas.This method then displays the resulting image on the canvas.
  Parameters:
    `win` - width of the window.
    `lev` - the level.
  See Also:
    `createByteLookupTable()`

### createByteLookupTable

    public java.awt.image.ByteLookupTable createByteLookupTable(int win,
                                                                int lev)

  Creates a lookup table for the specified window width and level.
  Parameters:
    `win` - width of the window.
    `lev` - the level.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD