public class DicomWindowPixelInterpolator extends DicomPixelInterpolator
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_WINDOW_CENTER |
static int |
DEFAULT_WINDOW_WIDTH |
static PropertyList |
myProps |
Constructor and Description |
---|
DicomWindowPixelInterpolator()
Create a default windowed interpolator, centered at intensity 2047 with
width 2*2047.
|
DicomWindowPixelInterpolator(int center,
int width)
Constructs a new interpolator given a center intensity and width
|
Modifier and Type | Method and Description |
---|---|
void |
addWindowPreset(java.lang.String preset,
int center,
int width)
Adds a window preset to this interpolator
|
PropertyList |
getAllPropertyInfo()
Returns a list giving static information about all properties exported by
this object.
|
Property |
getProperty(java.lang.String name)
Returns a property associated with a specified path name.
|
java.lang.String |
getWindow() |
int |
getWindowCenter() |
java.lang.String[] |
getWindowNames() |
StringRange |
getWindowRange() |
int |
getWindowWidth() |
int |
interpGrayscale(double in,
int ymin,
int ymax)
Interpolates a new grayscale value
|
void |
interpGrayscaleToRGB(double gray,
int ymin,
int ymax,
int[] out)
Interpolates a grayscale value to RGB
|
void |
interpRGB(double[] in,
int ymin,
int ymax,
int[] out)
Interpolates a new rgb value
|
int |
interpRGBToGrayscale(double[] rgb,
int ymin,
int ymax)
Interpolates an RGB value to grayscale
|
int |
numWindows() |
void |
setWindow(java.lang.String preset)
Sets the currently active preset window
|
void |
setWindowCenter(int center)
Sets the center of the window.
|
void |
setWindowWidth(int width)
Sets the width of the window.
|
clone, getPropertyHost, getPropertyInfo, getSubClasses, hasProperty, isWritable, scan, setPropertyHost, setPropertyInfo, write
public static PropertyList myProps
public static final int DEFAULT_WINDOW_CENTER
public static final int DEFAULT_WINDOW_WIDTH
public DicomWindowPixelInterpolator()
public DicomWindowPixelInterpolator(int center, int width)
center
- centre intensitywidth
- intensity widthpublic Property getProperty(java.lang.String name)
HasProperties
.
' characters. A sub-property
exists if the value of a property is itself an object which exports
properties. It is only possible to obtain a sub-property handle if each of
its ancestor properties exports their values by reference.getProperty
in interface HasProperties
getProperty
in class DicomPixelInterpolator
name
- name of the desired property or sub-propertypublic PropertyList getAllPropertyInfo()
HasProperties
getAllPropertyInfo
in interface HasProperties
getAllPropertyInfo
in class DicomPixelInterpolator
public java.lang.String getWindow()
public java.lang.String[] getWindowNames()
public int numWindows()
public void addWindowPreset(java.lang.String preset, int center, int width)
preset
- name of the preset windowcenter
- center intensity of windowwidth
- width of windowpublic void setWindow(java.lang.String preset)
preset
- name of presetpublic StringRange getWindowRange()
public void setWindowCenter(int center)
public int getWindowCenter()
public void setWindowWidth(int width)
public int getWindowWidth()
public int interpGrayscale(double in, int ymin, int ymax)
DicomPixelInterpolator
interpGrayscale
in class DicomPixelInterpolator
in
- input grayscaleymin
- minimum outputymax
- maximum outputpublic void interpRGB(double[] in, int ymin, int ymax, int[] out)
DicomPixelInterpolator
interpRGB
in class DicomPixelInterpolator
in
- input rgbymin
- minimum output valueymax
- maximum output valueout
- output rgbpublic void interpGrayscaleToRGB(double gray, int ymin, int ymax, int[] out)
DicomPixelInterpolator
interpGrayscaleToRGB
in class DicomPixelInterpolator
gray
- input grayscaleymin
- minimum output valueymax
- maximum output valueout
- output rgbpublic int interpRGBToGrayscale(double[] rgb, int ymin, int ymax)
DicomPixelInterpolator
interpRGBToGrayscale
in class DicomPixelInterpolator
rgb
- input rgbymin
- minimum output valueymax
- maximum output value