Class ComponentMappingBox
- java.lang.Object
-
- com.github.jaiimageio.jpeg2000.impl.Box
-
- com.github.jaiimageio.jpeg2000.impl.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.github.jaiimageio.jpeg2000.impl.Box
data, extraLength, length
-
-
Constructor Summary
Constructors Constructor Description ComponentMappingBox(byte[] data)Constructs aComponentMappingBoxfrom the provided content byte array.ComponentMappingBox(short[] comp, byte[] t, byte[] m)Constructs aComponentMappingBoxfrom the provided component mapping.ComponentMappingBox(Node node)Constructs aComponentMappingBoxbased on the providedorg.w3c.dom.Node.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcompose()Composes the content byte array from the data elements.short[]getComponent()byte[]getComponentAssociation()byte[]getComponentType()IIOMetadataNodegetNativeNode()Creates anIIOMetadataNodefrom this component mapping box.protected voidparse(byte[] data)Parse the component mapping from the provided content data array.-
Methods inherited from class com.github.jaiimageio.jpeg2000.impl.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 aComponentMappingBoxfrom the provided content byte array.
-
ComponentMappingBox
public ComponentMappingBox(short[] comp, byte[] t, byte[] m)
Constructs aComponentMappingBoxfrom the provided component mapping.
-
ComponentMappingBox
public ComponentMappingBox(Node node) throws IIOInvalidTreeException
Constructs aComponentMappingBoxbased 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 anIIOMetadataNodefrom this component mapping box. The format of this node is defined in the XML dtd and xsd for the JP2 image file.- Overrides:
getNativeNodein classBox
-
getComponent
public short[] getComponent()
-
getComponentType
public byte[] getComponentType()
-
getComponentAssociation
public byte[] getComponentAssociation()
-
-