|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectome.io.nio.PixelData
public class PixelData
Represents a block of pixel data.
PixelBuffer
Field Summary | |
---|---|
static int |
BIT
Identifies the type used to store pixel values. |
static int |
BYTE
Identifies the type used to store pixel values. |
protected int |
bytesPerPixel
The number of bytes per pixel. |
protected ByteBuffer |
data
The pixels data backing buffer. |
static int |
DOUBLE
Identifies the type used to store pixel values. |
static int |
FLOAT
Identifies the type used to store pixel values. |
static int |
INT
Identifies the type used to store pixel values. |
protected boolean |
isFloat
If the data is floating point. |
protected boolean |
isSigned
If the data is signed. |
protected int |
javaType
The pixels type as it would be represented in Java. |
static int |
LONG
Identifies the type used to store pixel values. |
protected double |
maximum
The maximum pixel value for the pixels type of the pixel data. |
protected double |
minimum
The minimum pixel value for the pixels type of the pixel data. |
protected ome.model.enums.PixelsType |
pixelsType
Type of the pixel data. |
static int |
SHORT
Identifies the type used to store pixel values. |
Constructor Summary | |
---|---|
PixelData(ome.model.enums.PixelsType pixelsType,
ByteBuffer data)
Default constructor. |
Method Summary | |
---|---|
int |
bytesPerPixel()
Returns the number of byte per pixel for the pixel data. |
ByteBuffer |
getData()
Returns the backing buffer for the pixel data. |
double |
getMaximum()
Returns the minimum pixel value this pixel data supports. |
double |
getMinimum()
Returns the minimum pixel value this pixel data supports. |
ByteOrder |
getOrder()
Returns the byte order of the backing buffer. |
double |
getPixelValue(int offset)
Returns the pixel intensity value of the pixel at a given offset within the backing buffer. |
double |
getPixelValueDirect(int offset)
Returns the pixel intensity value of the pixel at a given offset within the backing buffer. |
boolean |
in(String[] strings)
Returns whether or not the pixel data type is is one of the elements in an array. |
boolean |
isFloat()
Returns whether or not the data is floating point. |
boolean |
isSigned()
Returns whether or not the data is signed. |
int |
javaType()
Returns the Java type that has the same byte width of the pixel data. |
void |
setOrder(ByteOrder order)
Set the byte order of the backing buffer. |
void |
setPixelValue(int offset,
double value)
Sets the pixel intensity value of the pixel at a given offset within the backing buffer. |
void |
setPixelValueDirect(int offset,
double value)
Sets the pixel intensity value of the pixel at a given offset within the backing buffer. |
int |
size()
Returns the pixel count of this block of pixel data. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int BYTE
public static final int SHORT
public static final int INT
public static final int LONG
public static final int FLOAT
public static final int DOUBLE
public static final int BIT
protected ome.model.enums.PixelsType pixelsType
protected ByteBuffer data
protected boolean isSigned
protected boolean isFloat
protected int javaType
protected int bytesPerPixel
protected double minimum
protected double maximum
Constructor Detail |
---|
public PixelData(ome.model.enums.PixelsType pixelsType, ByteBuffer data)
pixelsType
- The pixels type.data
- The raw pixel data.Method Detail |
---|
public boolean in(String[] strings)
strings
- The strings for which you want to check against.
public int bytesPerPixel()
public int javaType()
public boolean isSigned()
public boolean isFloat()
public double getMinimum()
public double getMaximum()
public void setPixelValue(int offset, double value)
offset
- The relative offset (taking into account the number of
bytes per pixel) within the backing buffer.value
- Pixel value to set.public void setPixelValueDirect(int offset, double value)
offset
- The absolute offset within the backing buffer.value
- Pixel value to set.public double getPixelValue(int offset)
offset
- The relative offset (taking into account the number of
bytes per pixel) within the backing buffer.
public double getPixelValueDirect(int offset)
offset
- The absolute offset within the backing buffer.
public ByteBuffer getData()
public ByteOrder getOrder()
public void setOrder(ByteOrder order)
order
- The byte order.public int size()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Version: Beta-4.1.1-r5927-b91
Copyright © 2009 The University of Dundee. All Rights Reserved.