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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
WindowLevel
public WindowLevel(ImageDisplay imageCanvas)
- The WindowLevel constructor.
- Parameters:
imageCanvas - the canvas in which the image is drawn.
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.