/**
   * Creates an <code>IIOMetadataNode</code> from this channel definition box. The format of this
   * node is defined in the XML dtd and xsd for the JP2 image file.
   */
  public IIOMetadataNode getNativeNode() {
    IIOMetadataNode node = new IIOMetadataNode(BoxUtilities.getName(getType()));
    setDefaultAttributes(node);

    IIOMetadataNode child = new IIOMetadataNode("NumberOfDefinition");
    child.setUserObject(new Short(num));
    child.setNodeValue("" + num);
    node.appendChild(child);

    child = new IIOMetadataNode("Definitions");
    node.appendChild(child);

    for (int i = 0; i < num; i++) {
      IIOMetadataNode child1 = new IIOMetadataNode("ChannelNumber");
      child1.setUserObject(new Short(channels[i]));
      child1.setNodeValue("" + channels[i]);
      child.appendChild(child1);

      child1 = new IIOMetadataNode("ChannelType");
      child1.setUserObject(new Integer(types[i]));
      child1.setNodeValue("" + types[i]);
      child.appendChild(child1);

      child1 = new IIOMetadataNode("Association");
      child1.setUserObject(new Short(associations[i]));
      child1.setNodeValue("" + associations[i]);
      child.appendChild(child1);
    }

    return node;
  }
Exemple #2
0
 /*     */ IIOMetadataNode getNativeNode() {
   /* 132 */ IIOMetadataNode localIIOMetadataNode = new IIOMetadataNode("unknown");
   /* 133 */ localIIOMetadataNode.setAttribute("MarkerTag", Integer.toString(this.tag));
   /* 134 */ localIIOMetadataNode.setUserObject(this.data);
   /*     */
   /* 136 */ return localIIOMetadataNode;
   /*     */ }
Exemple #3
0
 IIOMetadataNode getNativeNode() {
   IIOMetadataNode node = new IIOMetadataNode("app2ICC");
   if (profile != null) {
     node.setUserObject(ICC_Profile.getInstance(profile));
   }
   return node;
 }
 IIOMetadataNode getNativeNode() {
   IIOMetadataNode node = new IIOMetadataNode("dqtable");
   node.setAttribute("elementPrecision", Integer.toString(elementPrecision));
   node.setAttribute("qtableId", Integer.toString(tableID));
   node.setUserObject(new JPEGQTable(data));
   return node;
 }