/** This method wraps the protected method <code>abortRequested</code> * to allow the abortions be monitored by <code>J2KRenderedImage</code>. */ public boolean getAbortRequest() { return abortRequested(); }
/** Creates an <code>IIOMetadataNode</code> from this file type box. * The format of this node is defined in the XML dtd and xsd * for the JP2 image file. */ public IIOMetadataNode getNativeNode() { return getNativeNodeForSimpleBox(); }
/** Wrapper for the protected method <code>processImageProgress</code> * So it can be access from the classes which are not in * <code>ImageReader</code> hierarchy. */ public void processImageProgressWrapper(float percentageDone) { processImageProgress(percentageDone); }
/** Constructs a <code>PlatteBox</code> from an * <code>IndexColorModel</code>. */ public PaletteBox(IndexColorModel icm) { this(computeLength(icm), getCompSize(icm), getLUT(icm)); }
public int getWidth(int imageIndex) throws IOException { checkIndex(imageIndex); readHeader(); return width; }
/** * Returns the total number of tiles in the image. This default * implementation assumes no tiling, so 1 is always returned. * * @return The total number of tiles in the image. * */ public int getNumTiles() { return getNumXTiles() * getNumYTiles(); }
/** * Returns the overall height of the current tile in pixels. * * @return The total image height in pixels. */ public int getTileHeight() { int height = tileHeight; int maxY = getImgULY() + getImgHeight(); int y = co.y * tileHeight + tileYOffset; if (y + tileHeight >= maxY) height = maxY - y; return height; }
public ImageReader createReaderInstance(Object extension) throws IIOException { return new J2KImageReader(this); } }
/** Constructs a <code>Box</code> instance from the provided <code> * ImageInputStream</code> at the specified position. * * @param iis The <code>ImageInputStream</code> contains the box. * @param pos The position from where to read the box. * @throws IOException If any IOException is thrown in the called read * methods. */ public Box(ImageInputStream iis, int pos) throws IOException { read(iis, pos); }
public J2KRenderedImage(ImageInputStream iis, J2KImageReadParamJava param, J2KImageReader reader) throws IOException { this(new J2KReadState(iis, param, reader)); }
public static synchronized J2KMetadataFormat getInstance() { if (instance == null) instance = new J2KMetadataFormat(); return instance; }
/** Wrapper for the protected method <code>processImageProgress</code> * So it can be access from the classes which are not in * <code>ImageWriter</code> hierachy. */ public void processImageProgressWrapper(float percentageDone) { processImageProgress(percentageDone); }
/** * Constructs a <code>J2KImageWriteParamJava</code> object with default * values for all parameters. */ public J2KImageWriteParamJava() { super(); setSuperProperties(); }
/** Returns the box content in byte array. */ public byte[] getContent() { if (data == null) compose(); return data; }
/** Creates an <code>IIOMetadataNode</code> from this data entry URL * box. The format of this node is defined in the XML dtd and xsd * for the JP2 image file. */ public IIOMetadataNode getNativeNode() { return getNativeNodeForSimpleBox(); }
/** Constructs a <code>Box</code> instance from the provided <code> * ImageInputStream</code> at the specified position. * * @param iis The <code>ImageInputStream</code> contains the box. * @param pos The position from where to read the box. * @throws IOException If any IOException is thrown in the called read * methods. */ public Box(ImageInputStream iis, int pos) throws IOException { read(iis, pos); }