org.dcm4che2.iod.module.lut
Class WindowLevelLut

java.lang.Object
  extended by org.dcm4che2.iod.module.lut.WindowLevelLut
All Implemented Interfaces:
ILut

public class WindowLevelLut
extends java.lang.Object
implements ILut

Implements a window level LUT. See C.11.2.1.2 for information on the bias values and lookup conditions. In general, there is a bias of -0.5 so that an integer value can be used to specify the "center" of a range of odd length (that is, of an even number of consecutive integers, such as 256 - the width is 255, while the center of 0..255 127.5 - this bias makes this "center" 128 to allow it to be specified as an integer.


Constructor Summary
WindowLevelLut(float center, float width, java.lang.String description)
          Create a window level mapping, on the standard 0->255 output bytes
WindowLevelLut(float center, float width, java.lang.String description, int ymin, int ymax)
          Create a window level mapping
 
Method Summary
 float getCenter()
           
 java.lang.String getDescription()
           
 float getWidth()
           
 int getYmax()
           
 int getYmin()
           
 float lookup(float value)
          Perform a window level lookup
 int lookup(int value)
          Perform a window level lookup
 void setCenter(float center)
           
 void setDescription(java.lang.String description)
           
 void setWidth(float width)
           
 void setYmax(int ymax)
           
 void setYmin(int ymin)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WindowLevelLut

public WindowLevelLut(float center,
                      float width,
                      java.lang.String description)
Create a window level mapping, on the standard 0->255 output bytes


WindowLevelLut

public WindowLevelLut(float center,
                      float width,
                      java.lang.String description,
                      int ymin,
                      int ymax)
Create a window level mapping

Method Detail

lookup

public float lookup(float value)
Perform a window level lookup

Specified by:
lookup in interface ILut
Returns:
looked up value.

getCenter

public float getCenter()

setCenter

public void setCenter(float center)

getDescription

public java.lang.String getDescription()

setDescription

public void setDescription(java.lang.String description)

getWidth

public float getWidth()

setWidth

public void setWidth(float width)

getYmax

public int getYmax()

setYmax

public void setYmax(int ymax)

getYmin

public int getYmin()

setYmin

public void setYmin(int ymin)

lookup

public int lookup(int value)
Perform a window level lookup

Specified by:
lookup in interface ILut
Parameters:
value - to convert to float, use the float lookup
Returns:
the int cast response from the float lookup.


Copyright © 2011 dcm4che. All Rights Reserved.