Class J2KImageReader

  • All Implemented Interfaces:
    MsgLogger

    public class J2KImageReader
    extends ImageReader
    implements MsgLogger
    This class is the Java Image IO plugin reader for JPEG 2000 JP2 image file format. It has the capability to load the compressed bilevel images, color-indexed byte images, or multi-band images in byte/ushort/short/int data type. It may subsample the image, select bands, clip the image, and shift the decoded image origin if the proper decoding parameter are set in the provided J2KImageReadParam.
    • Constructor Detail

      • J2KImageReader

        public J2KImageReader​(ImageReaderSpi originator)
        Constructs J2KImageReader from the provided ImageReaderSpi.
    • Method Detail

      • computeRegionsWrapper

        public static void computeRegionsWrapper​(ImageReadParam param,
                                                 boolean allowZeroDestOffset,
                                                 int srcWidth,
                                                 int srcHeight,
                                                 BufferedImage image,
                                                 Rectangle srcRegion,
                                                 Rectangle destRegion)
        Wrapper for the protected method computeRegions. So it can be access from the classes which are not in ImageReader hierarchy.
      • checkReadParamBandSettingsWrapper

        public static void checkReadParamBandSettingsWrapper​(ImageReadParam param,
                                                             int numSrcBands,
                                                             int numDstBands)
        Wrapper for the protected method checkReadParamBandSettings. So it can be access from the classes which are not in ImageReader hierarchy.
      • processImageUpdateWrapper

        public void processImageUpdateWrapper​(BufferedImage theImage,
                                              int minX,
                                              int minY,
                                              int width,
                                              int height,
                                              int periodX,
                                              int periodY,
                                              int[] bands)
        Wrapper for the protected method processImageUpdate So it can be access from the classes which are not in ImageReader hierarchy.
      • processImageProgressWrapper

        public void processImageProgressWrapper​(float percentageDone)
        Wrapper for the protected method processImageProgress So it can be access from the classes which are not in ImageReader hierarchy.
      • setInput

        public void setInput​(Object input,
                             boolean seekForwardOnly,
                             boolean ignoreMetadata)
        Overrides the method defined in the superclass.
        Overrides:
        setInput in class ImageReader
      • readHeader

        public void readHeader()
      • getAbortRequest

        public boolean getAbortRequest()
        This method wraps the protected method abortRequested to allow the abortions be monitored by J2KReadState.
      • flush

        public void flush()
        Description copied from interface: MsgLogger
        Writes any buffered data from the println() method to the device.
        Specified by:
        flush in interface MsgLogger
      • println

        public void println​(String str,
                            int flind,
                            int ind)
        Description copied from interface: MsgLogger
        Prints the string 'str' to the output device, appending a line return. The message is reformatted as appropriate to the particular diplaying device, where 'flind' and 'ind' are used as hints for performing that operation. However, any newlines appearing in 'str' are respected. The output device may not display the string until flush() is called. Some implementations may automatically flush when this method is called. This method just prints the string, the string does not make part of a "message" in the sense that no severity is associated to it.
        Specified by:
        println in interface MsgLogger
        Parameters:
        str - The string to print
        flind - Indentation of the first line
        ind - Indentation of any other lines.
      • printmsg

        public void printmsg​(int sev,
                             String msg)
        Description copied from interface: MsgLogger
        Prints the message 'msg' to the output device, appending a newline, with severity 'sev'. Some implementations where the appended newline is irrelevant may not append the newline. Depending on the implementation the severity of the message may be added to it. The message is reformatted as appropriate for the output devic, but any newline characters are respected.
        Specified by:
        printmsg in interface MsgLogger
        Parameters:
        sev - The message severity (LOG, INFO, etc.)
        msg - The message to display