Class ComponentMappingBox
- java.lang.Object
-
- com.sun.media.imageioimpl.plugins.jpeg2000.Box
-
- com.sun.media.imageioimpl.plugins.jpeg2000.ComponentMappingBox
-
public class ComponentMappingBox extends Box
This class is defined to represent a Color Specification Box of JPEG JP2 file format. A Channel Definition Box has a length, and a fixed type of "cmap". This box exists if and only is a PaletteBox exists. Its content defines the type LUT output components and their mapping to the color component.
-
-
Field Summary
-
Fields inherited from class com.sun.media.imageioimpl.plugins.jpeg2000.Box
data, extraLength, length
-
-
Constructor Summary
Constructors Constructor Description ComponentMappingBox(byte[] data)
Constructs aComponentMappingBox
from the provided content byte array.ComponentMappingBox(short[] comp, byte[] t, byte[] m)
Constructs aComponentMappingBox
from the provided component mapping.ComponentMappingBox(Node node)
Constructs aComponentMappingBox
based on the providedorg.w3c.dom.Node
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
compose()
Composes the content byte array from the data elements.short[]
getComponent()
byte[]
getComponentAssociation()
byte[]
getComponentType()
IIOMetadataNode
getNativeNode()
Creates anIIOMetadataNode
from this component mapping box.protected void
parse(byte[] data)
Parse the component mapping from the provided content data array.-
Methods inherited from class com.sun.media.imageioimpl.plugins.jpeg2000.Box
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
-
-
-
-
Constructor Detail
-
ComponentMappingBox
public ComponentMappingBox(byte[] data)
Constructs aComponentMappingBox
from the provided content byte array.
-
ComponentMappingBox
public ComponentMappingBox(short[] comp, byte[] t, byte[] m)
Constructs aComponentMappingBox
from the provided component mapping.
-
ComponentMappingBox
public ComponentMappingBox(Node node) throws IIOInvalidTreeException
Constructs aComponentMappingBox
based on the providedorg.w3c.dom.Node
.- Throws:
IIOInvalidTreeException
-
-
Method Detail
-
parse
protected void parse(byte[] data)
Parse the component mapping from the provided content data array.
-
getNativeNode
public IIOMetadataNode getNativeNode()
Creates anIIOMetadataNode
from this component mapping box. The format of this node is defined in the XML dtd and xsd for the JP2 image file.- Overrides:
getNativeNode
in classBox
-
getComponent
public short[] getComponent()
-
getComponentType
public byte[] getComponentType()
-
getComponentAssociation
public byte[] getComponentAssociation()
-
-