public class RGBPixelBuffer extends DicomPixelBufferBase
DicomPixelBuffer.PixelType| Constructor and Description |
|---|
RGBPixelBuffer(byte[] pixels) |
RGBPixelBuffer(byte[] pixels,
int offset,
int length)
Creates a new buffer from a portion of an existing byte array
|
RGBPixelBuffer(int size) |
RGBPixelBuffer(int[] pixels) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getBuffer() |
int |
getNumChannels()
Number of "color" channels in the buffer
|
int |
getNumPixels() |
int |
getPixels(int x,
int dx,
int nx,
DicomPixelBuffer.PixelType type,
DicomPixelInterpolator interp,
java.nio.ByteBuffer pixels)
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.PixelType type,
DicomPixelInterpolator interp,
int[] pixels,
int offset)
Populates a buffer of pixel values from those stored in this buffer,
using a supplied interpolator.
|
DicomPixelBuffer.PixelType |
getPixelType() |
int |
getValue(int idx)
Return the internal pixel value at idx.
|
getMaxIntensity, getMinIntensity, getRescaledValue, getRescaleIntercept, getRescaleSlope, isSigned, setRescalepublic RGBPixelBuffer(int size)
public RGBPixelBuffer(byte[] pixels)
public RGBPixelBuffer(byte[] pixels,
int offset,
int length)
pixels - buffer of pixels to copy fromoffset - offset in buffer to start copylength - total length of bytes (i.e. must be multiple of 3 for rgb)public RGBPixelBuffer(int[] pixels)
public DicomPixelBuffer.PixelType getPixelType()
getPixelType in interface DicomPixelBuffergetPixelType in class DicomPixelBufferBasepublic int getNumPixels()
public int getValue(int idx)
DicomPixelBufferBasegetValue in interface DicomPixelBuffergetValue in class DicomPixelBufferBaseidx - value indexpublic byte[] getBuffer()
public int getPixels(int x,
int dx,
int nx,
DicomPixelBuffer.PixelType type,
DicomPixelInterpolator interp,
java.nio.ByteBuffer pixels)
DicomPixelBuffergetPixels in interface DicomPixelBuffergetPixels in class DicomPixelBufferBasex - starting pixel index in this bufferdx - pixel step in this buffernx - number of pixels to interpolate fromtype - type of pixels to outputinterp - interpolator for converting pixels for output displaypixels - output bufferpublic int getPixels(int x,
int dx,
int nx,
DicomPixelBuffer.PixelType type,
DicomPixelInterpolator interp,
int[] pixels,
int offset)
DicomPixelBuffergetPixels in interface DicomPixelBuffergetPixels in class DicomPixelBufferBasex - starting pixel index in this bufferdx - pixel step in this buffernx - number of pixels to interpolate fromtype - type of pixels to outputinterp - interpolator for converting pixels for output displaypixels - output arrayoffset - offset in output arraypublic int getNumChannels()
DicomPixelBuffer