public class PaletteBox extends Box
| Modifier and Type | Field and Description |
|---|---|
private byte[] |
bitDepth |
private byte[][] |
lut |
private int |
numComps |
private int |
numEntries
The value of the data elements.
|
data, extraLength, length, type| Constructor and Description |
|---|
PaletteBox(byte[] data)
Constructs a
PlatteBox from the provided byte array. |
PaletteBox(IndexColorModel icm)
Constructs a
PlatteBox from an
IndexColorModel. |
PaletteBox(int length,
byte[] comp,
byte[][] lut)
Constructs a
PlatteBox from the provided length, bit
depths of the color components and the LUT. |
PaletteBox(Node node)
Constructs a
PlatteBox from an
org.w3c.dom.Node. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
compose()
Composes the content byte array from the data elements.
|
private static int |
computeLength(IndexColorModel icm)
Compute the length of this box.
|
byte[] |
getBitDepths()
Return the bit depths for all the color components.
|
private static byte[] |
getCompSize(IndexColorModel icm)
Gets the size of the components or the bit depth for all the color
coomponents.
|
byte[][] |
getLUT()
Return the LUT.
|
private static byte[][] |
getLUT(IndexColorModel icm)
Gets the LUT from the
IndexColorModel as an two-dimensional
byte array. |
IIOMetadataNode |
getNativeNode()
creates an
IIOMetadataNode from this palette box. |
int |
getNumComp()
Return the number of color components.
|
int |
getNumEntries()
Return the number of palette entries.
|
protected void |
parse(byte[] data)
Parses the data elements from the byte array.
|
copyInt, createBox, getAttribute, getBoxClass, getByteArrayElementValue, getByteElementValue, getContent, getExtraLength, getIntArrayElementValue, getIntElementValue, getLength, getName, getNativeNodeForSimpleBox, getShortElementValue, getStringElementValue, getType, getTypeByName, getTypeInt, getTypeString, parseByteArray, parseIntArray, read, setContent, setDefaultAttributes, setExtraLength, setLength, writeprivate int numEntries
private int numComps
private byte[] bitDepth
private byte[][] lut
public PaletteBox(IndexColorModel icm)
PlatteBox from an
IndexColorModel.public PaletteBox(Node node) throws IIOInvalidTreeException
PlatteBox from an
org.w3c.dom.Node.IIOInvalidTreeExceptionpublic PaletteBox(int length,
byte[] comp,
byte[][] lut)
PlatteBox from the provided length, bit
depths of the color components and the LUT.public PaletteBox(byte[] data)
PlatteBox from the provided byte array.private static int computeLength(IndexColorModel icm)
private static byte[] getCompSize(IndexColorModel icm)
private static byte[][] getLUT(IndexColorModel icm)
IndexColorModel as an two-dimensional
byte array.public int getNumEntries()
public int getNumComp()
public byte[] getBitDepths()
public byte[][] getLUT()
public IIOMetadataNode getNativeNode()
IIOMetadataNode from this palette box.
The format of this node is defined in the XML dtd and xsd
for the JP2 image file.getNativeNode in class Boxprotected void parse(byte[] data)
BoxCopyright © 2016 Open Microscopy Environment