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 |
interp(DicomPixelBuffer in,
int idx,
DicomPixelBuffer out,
int odx)
Interpolates between two pixel buffers whose class determines their value
representation type
|
int |
interpByteByte(byte[] in,
int idx,
byte[] out,
int odx)
Interpolates from grayscale (byte) to grayscale (byte) values
|
int |
interpByteRGB(byte[] in,
int idx,
byte[] out,
int odx)
Interpolates from grayscale (byte) to RGB (byte) values
|
int |
interpByteShort(byte[] in,
int idx,
short[] out,
int odx)
Interpolates from grayscale (byte) to grayscale (short) values
|
int |
interpRGBByte(byte[] in,
int idx,
byte[] out,
int odx)
Interpolates from RGB (byte) to grayscale (byte) values
|
int |
interpRGBRGB(byte[] in,
int idx,
byte[] out,
int odx)
Interpolates from RGB (byte) to RGB (byte) values
|
int |
interpRGBShort(byte[] in,
int idx,
short[] out,
int odx)
Interpolates from RGB (byte) to grayscale (short) values
|
int |
interpShortByte(short[] in,
int idx,
byte[] out,
int odx)
Interpolates from grayscale (short) to grayscale (byte) values
|
int |
interpShortRGB(short[] in,
int idx,
byte[] out,
int odx)
Interpolates from grayscale (short) to RGB (byte) values
|
int |
interpShortShort(short[] in,
int idx,
short[] out,
int odx)
Interpolates from grayscale (short) to grayscale (short) values
|
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)
center
- public int getWindowCenter()
public void setWindowWidth(int width)
width
- public int getWindowWidth()
public int interpByteRGB(byte[] in, int idx, byte[] out, int odx)
DicomPixelInterpolator
interpByteRGB
in class DicomPixelInterpolator
in
- input pixel valuesidx
- starting input indexout
- output buffer to fillodx
- starting output indexpublic int interpByteByte(byte[] in, int idx, byte[] out, int odx)
DicomPixelInterpolator
interpByteByte
in class DicomPixelInterpolator
in
- input pixel valuesidx
- starting input indexout
- output buffer to fillodx
- starting output indexpublic int interpByteShort(byte[] in, int idx, short[] out, int odx)
DicomPixelInterpolator
interpByteShort
in class DicomPixelInterpolator
in
- input pixel valuesidx
- starting input indexout
- output buffer to fillodx
- starting output indexpublic int interpRGBRGB(byte[] in, int idx, byte[] out, int odx)
DicomPixelInterpolator
interpRGBRGB
in class DicomPixelInterpolator
in
- input pixel valuesidx
- starting input indexout
- output buffer to fillodx
- starting output indexpublic int interpRGBByte(byte[] in, int idx, byte[] out, int odx)
DicomPixelInterpolator
interpRGBByte
in class DicomPixelInterpolator
in
- input pixel valuesidx
- starting input indexout
- output buffer to fillodx
- starting output indexpublic int interpRGBShort(byte[] in, int idx, short[] out, int odx)
DicomPixelInterpolator
interpRGBShort
in class DicomPixelInterpolator
in
- input pixel valuesidx
- starting input indexout
- output buffer to fillodx
- starting output indexpublic int interpShortRGB(short[] in, int idx, byte[] out, int odx)
DicomPixelInterpolator
interpShortRGB
in class DicomPixelInterpolator
in
- input pixel valuesidx
- starting input indexout
- output buffer to fillodx
- starting output indexpublic int interpShortByte(short[] in, int idx, byte[] out, int odx)
DicomPixelInterpolator
interpShortByte
in class DicomPixelInterpolator
in
- input pixel valuesidx
- starting input indexout
- output buffer to fillodx
- starting output indexpublic int interpShortShort(short[] in, int idx, short[] out, int odx)
DicomPixelInterpolator
interpShortShort
in class DicomPixelInterpolator
in
- input pixel valuesidx
- starting input indexout
- output buffer to fillodx
- starting output indexpublic int interp(DicomPixelBuffer in, int idx, DicomPixelBuffer out, int odx)
DicomPixelInterpolator
interp
in class DicomPixelInterpolator
in
- input pixel valuesidx
- starting input indexout
- output buffer to fillodx
- starting output index