public class RGBPixelBuffer extends java.lang.Object implements DicomPixelBuffer
DicomPixelBuffer.PixelType
Constructor and Description |
---|
RGBPixelBuffer(byte[] pixels) |
RGBPixelBuffer(int size) |
RGBPixelBuffer(int[] pixels) |
Modifier and Type | Method and Description |
---|---|
byte[] |
getBuffer() |
int |
getMaxIntensity() |
int |
getMinIntensity() |
int |
getNumPixels() |
byte[] |
getPixel(int n) |
int |
getPixels(int x,
int dx,
int nx,
DicomPixelBuffer.PixelType type,
java.nio.ByteBuffer pixels,
DicomPixelInterpolator interp)
Populates a buffer of pixel values from those stored in this buffer,
using a supplied interpolator.
|
int |
getPixels(int x,
int dx,
int nx,
DicomPixelBuffer pixels,
int offset,
DicomPixelInterpolator interp)
Populates a new pixel buffer from pixel values stored in this buffer,
using a supplied interpolator.
|
int |
getPixelsByte(int x,
int dx,
int nx,
byte[] pixels,
int offset,
DicomPixelInterpolator interp)
Populates an array of grayscale pixel values from pixel values stored in this buffer,
using a supplied interpolator.
|
int |
getPixelsRGB(int x,
int dx,
int nx,
byte[] pixels,
int offset,
DicomPixelInterpolator interp)
Populates an array of RGB pixel values from pixel values stored in this buffer,
using a supplied interpolator.
|
int |
getPixelsShort(int x,
int dx,
int nx,
short[] pixels,
int offset,
DicomPixelInterpolator interp)
Populates an array of grayscale pixel values from pixel values stored in this buffer,
using a supplied interpolator.
|
DicomPixelBuffer.PixelType |
getPixelType() |
int |
setPixels(int x,
int dx,
int nx,
DicomPixelBuffer pixels,
int offset,
DicomPixelInterpolator interp)
Populates this pixel buffer using a supplied pixel buffer and interpolator.
|
int |
setPixelsByte(int x,
int dx,
int nx,
byte[] pixels,
int offset,
DicomPixelInterpolator interp)
Populates this pixel buffer using an array of grayscale pixel values and a supplied interpolator.
|
int |
setPixelsRGB(int x,
int dx,
int nx,
byte[] pixels,
int offset,
DicomPixelInterpolator interp)
Populates this pixel buffer using an array of RGB pixel values and a supplied interpolator.
|
int |
setPixelsShort(int x,
int dx,
int nx,
short[] pixels,
int offset,
DicomPixelInterpolator interp)
Populates this pixel buffer using an array of grayscale pixel values and a supplied interpolator.
|
public RGBPixelBuffer(int size)
public RGBPixelBuffer(byte[] pixels)
public RGBPixelBuffer(int[] pixels)
public DicomPixelBuffer.PixelType getPixelType()
getPixelType
in interface DicomPixelBuffer
public int getNumPixels()
getNumPixels
in interface DicomPixelBuffer
public byte[] getPixel(int n)
getPixel
in interface DicomPixelBuffer
n
- the pixel indexn
th pixelpublic int getPixels(int x, int dx, int nx, DicomPixelBuffer.PixelType type, java.nio.ByteBuffer pixels, DicomPixelInterpolator interp)
DicomPixelBuffer
getPixels
in interface DicomPixelBuffer
x
- starting pixel index in this bufferdx
- pixel step in this buffernx
- number of pixels to interpolate fromtype
- type of pixels to outputpixels
- output arrayinterp
- interpolator for converting pixels for output displaypublic int getPixelsRGB(int x, int dx, int nx, byte[] pixels, int offset, DicomPixelInterpolator interp)
DicomPixelBuffer
getPixelsRGB
in interface DicomPixelBuffer
x
- starting pixel index in this bufferdx
- pixel step in this buffernx
- number of pixels to interpolate frompixels
- output array of RGB valuesoffset
- offset in output array to fillinterp
- interpolator for converting pixels for output displaypublic int getPixelsByte(int x, int dx, int nx, byte[] pixels, int offset, DicomPixelInterpolator interp)
DicomPixelBuffer
getPixelsByte
in interface DicomPixelBuffer
x
- starting pixel index in this bufferdx
- pixel step in this buffernx
- number of pixels to interpolate frompixels
- output array of grayscale valuesoffset
- offset in output array to fillinterp
- interpolator for converting pixels for output displaypublic int getPixelsShort(int x, int dx, int nx, short[] pixels, int offset, DicomPixelInterpolator interp)
DicomPixelBuffer
getPixelsShort
in interface DicomPixelBuffer
x
- starting pixel index in this bufferdx
- pixel step in this buffernx
- number of pixels to interpolate frompixels
- output array of grayscale valuesoffset
- offset in output array to fillinterp
- interpolator for converting pixels for output displaypublic int getPixels(int x, int dx, int nx, DicomPixelBuffer pixels, int offset, DicomPixelInterpolator interp)
DicomPixelBuffer
getPixels
in interface DicomPixelBuffer
x
- starting pixel index in this bufferdx
- pixel step in this buffernx
- number of pixels to interpolate frompixels
- output buffer (buffer class determines type)offset
- offset in output array to fillinterp
- interpolator for converting pixels for output displaypublic int setPixelsRGB(int x, int dx, int nx, byte[] pixels, int offset, DicomPixelInterpolator interp)
DicomPixelBuffer
setPixelsRGB
in interface DicomPixelBuffer
x
- starting pixel index in this bufferdx
- pixel step in this buffernx
- number of pixels to interpolate topixels
- input array of RGB valuesoffset
- offset in input arrayinterp
- interpolator for converting pixels to the appropriate formatpublic int setPixelsByte(int x, int dx, int nx, byte[] pixels, int offset, DicomPixelInterpolator interp)
DicomPixelBuffer
setPixelsByte
in interface DicomPixelBuffer
x
- starting pixel index in this bufferdx
- pixel step in this buffernx
- number of pixels to interpolate topixels
- input array of grayscale valuesoffset
- offset in input arrayinterp
- interpolator for converting pixels to the appropriate formatpublic int setPixelsShort(int x, int dx, int nx, short[] pixels, int offset, DicomPixelInterpolator interp)
DicomPixelBuffer
setPixelsShort
in interface DicomPixelBuffer
x
- starting pixel index in this bufferdx
- pixel step in this buffernx
- number of pixels to interpolate topixels
- input array of grayscale valuesoffset
- offset in input arrayinterp
- interpolator for converting pixels to the appropriate formatpublic int setPixels(int x, int dx, int nx, DicomPixelBuffer pixels, int offset, DicomPixelInterpolator interp)
DicomPixelBuffer
setPixels
in interface DicomPixelBuffer
x
- starting pixel index in this bufferdx
- pixel step in this buffernx
- number of pixels to interpolate topixels
- input buffer (class determines type)offset
- offset in input bufferinterp
- interpolator for converting pixels to the appropriate formatpublic int getMaxIntensity()
getMaxIntensity
in interface DicomPixelBuffer
public int getMinIntensity()
getMinIntensity
in interface DicomPixelBuffer
public byte[] getBuffer()
getBuffer
in interface DicomPixelBuffer