Class IDEStructureParameter

  • All Implemented Interfaces:
    Streamable

    public class IDEStructureParameter
    extends java.lang.Object
    implements Streamable
    This class represents the IOCA IDE Structure parameter (X'9B').
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private byte[] bitsPerIDE
      the array with the number of bits/IDE for each component
      static byte COLOR_MODEL_CMYK
      The CMYK color model used by the IDE Structure parameter
      static byte COLOR_MODEL_RGB
      The RGB color model used by the IDE Structure parameter
      static byte COLOR_MODEL_YCBCR
      The YCbCr color model used by the IDE Structure parameter
      static byte COLOR_MODEL_YCRCB
      The YCrCb color model used by the IDE Structure parameter
      private byte colorModel
      the image color model
      private boolean subtractive
      additive/subtractive setting for ASFLAG
    • Constructor Summary

      Constructors 
      Constructor Description
      IDEStructureParameter()
      Creates a new IDE Structure parameter.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void setBitsPerComponent​(int[] bitsPerComponent)
      Sets the array for the bits/IDE, one entry per component.
      void setColorModel​(byte color)
      Sets the image IDE color model.
      void setDefaultCMYKColorModel()
      Establishes the parameter values for the normal CMYK 32bit color model.
      void setDefaultRGBColorModel()
      Establishes the parameter values for the normal RGB 24bit color model.
      void setSubtractive​(boolean subtractive)
      Set either additive or subtractive mode (used for ASFLAG).
      void setUniformBitsPerComponent​(int numComponents, int bitsPerComponent)
      Sets uniform bits per component.
      void writeToStream​(java.io.OutputStream os)
      DataStream objects must implement the writeToStream() method to write its data to the given OutputStream
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • COLOR_MODEL_RGB

        public static final byte COLOR_MODEL_RGB
        The RGB color model used by the IDE Structure parameter
        See Also:
        Constant Field Values
      • COLOR_MODEL_YCRCB

        public static final byte COLOR_MODEL_YCRCB
        The YCrCb color model used by the IDE Structure parameter
        See Also:
        Constant Field Values
      • COLOR_MODEL_CMYK

        public static final byte COLOR_MODEL_CMYK
        The CMYK color model used by the IDE Structure parameter
        See Also:
        Constant Field Values
      • COLOR_MODEL_YCBCR

        public static final byte COLOR_MODEL_YCBCR
        The YCbCr color model used by the IDE Structure parameter
        See Also:
        Constant Field Values
      • subtractive

        private boolean subtractive
        additive/subtractive setting for ASFLAG
      • colorModel

        private byte colorModel
        the image color model
      • bitsPerIDE

        private byte[] bitsPerIDE
        the array with the number of bits/IDE for each component
    • Constructor Detail

      • IDEStructureParameter

        public IDEStructureParameter()
        Creates a new IDE Structure parameter. The values are initialized for a bi-level image using the RGB color model.
    • Method Detail

      • setColorModel

        public void setColorModel​(byte color)
        Sets the image IDE color model.
        Parameters:
        color - the IDE color model.
      • setDefaultRGBColorModel

        public void setDefaultRGBColorModel()
        Establishes the parameter values for the normal RGB 24bit color model.
      • setDefaultCMYKColorModel

        public void setDefaultCMYKColorModel()
        Establishes the parameter values for the normal CMYK 32bit color model.
      • setUniformBitsPerComponent

        public void setUniformBitsPerComponent​(int numComponents,
                                               int bitsPerComponent)
        Sets uniform bits per component.
        Parameters:
        numComponents - the number of components
        bitsPerComponent - number of bits per component
      • setBitsPerComponent

        public void setBitsPerComponent​(int[] bitsPerComponent)
        Sets the array for the bits/IDE, one entry per component.
        Parameters:
        bitsPerComponent - the
      • setSubtractive

        public void setSubtractive​(boolean subtractive)
        Set either additive or subtractive mode (used for ASFLAG).
        Parameters:
        subtractive - true for subtractive mode, false for additive mode
      • writeToStream

        public void writeToStream​(java.io.OutputStream os)
                           throws java.io.IOException
        DataStream objects must implement the writeToStream() method to write its data to the given OutputStream
        Specified by:
        writeToStream in interface Streamable
        Parameters:
        os - the outputsteam stream
        Throws:
        java.io.IOException - an I/O exception of some sort has occurred.