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 Nov 1999
- Author:
- Lawrence Rodrigues
Method Summary |
java.awt.image.ByteLookupTable |
createByteLookupTable(int win,
int lev)
Creates a lookup table for the specified window width and level. |
int |
getLUTSize()
|
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 |
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()
setWindow
public void setWindow(int win)
- Sets the window width.
- Parameters:
win
- width of the window.
setLevel
public void setLevel(int lev)
- Sets the level.
- Parameters:
lev
- the level.
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.