public class ChannelDefinitionBox extends Box
Modifier and Type | Field and Description |
---|---|
private short[] |
associations |
private short[] |
channels |
private short |
num
The cached data elements.
|
private short[] |
types |
data, extraLength, length, type
Constructor and Description |
---|
ChannelDefinitionBox(byte[] data)
Constructs a
ChannelDefinitionBox based on the provided
content in byte array. |
ChannelDefinitionBox(ColorModel colorModel)
Constructs a
ChannelDefinitionBox based on the provided
ColorModel . |
ChannelDefinitionBox(Node node)
Constructs a
ChannelDefinitionBox based on the provided
org.w3c.dom.Node . |
ChannelDefinitionBox(short[] channel,
short[] types,
short[] associations)
Constructs a
ChannelDefinitionBox based on the provided
channel definitions. |
Modifier and Type | Method and Description |
---|---|
protected void |
compose()
Composes the content byte array from the data elements.
|
private static int |
computeLength(ColorModel colorModel)
Computes the length of this box from the provided
ColorModel . |
static void |
fillBasedOnBands(int numComps,
boolean isPremultiplied,
short[] c,
short[] t,
short[] a)
Fills the channel definitions into the arrays based on the number
of components and isPremultiplied.
|
short[] |
getAssociation()
Returns the association which associates a color channel to a color
component in the color space of the image.
|
short[] |
getChannel()
Returns the defined channels.
|
IIOMetadataNode |
getNativeNode()
Creates an
IIOMetadataNode from this channel definition
box. |
short[] |
getTypes()
Returns the channel types.
|
protected void |
parse(byte[] data)
Parse the channel definitions from the content data 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, write
private short num
private short[] channels
private short[] types
private short[] associations
public ChannelDefinitionBox(ColorModel colorModel)
ChannelDefinitionBox
based on the provided
ColorModel
.public ChannelDefinitionBox(byte[] data)
ChannelDefinitionBox
based on the provided
content in byte array.public ChannelDefinitionBox(short[] channel, short[] types, short[] associations)
ChannelDefinitionBox
based on the provided
channel definitions.public ChannelDefinitionBox(Node node) throws IIOInvalidTreeException
ChannelDefinitionBox
based on the provided
org.w3c.dom.Node
.IIOInvalidTreeException
private static int computeLength(ColorModel colorModel)
ColorModel
.public static void fillBasedOnBands(int numComps, boolean isPremultiplied, short[] c, short[] t, short[] a)
protected void parse(byte[] data)
public short[] getChannel()
public short[] getTypes()
public short[] getAssociation()
public IIOMetadataNode getNativeNode()
IIOMetadataNode
from this channel definition
box. The format of this node is defined in the XML dtd and xsd
for the JP2 image file.getNativeNode
in class Box
Copyright © 2015 Open Microscopy Environment