public class J2KImageWriter extends ImageWriter
RenderedImage
s with an IndexColorModel
(for
example, bi-level or color indexed images). (2) Losslessly or lossy encode
RenderedImage
with a byte, short, ushort or integer types with
band number upto 16384. (3) Encode an image with alpha channel.
(4) Write the provided metadata into the code stream. It also can encode
a raster wrapped in the provided IIOImage
.
The encoding process may re-tile image, clip, subsample, and select bands
using the parameters specified in the ImageWriteParam
.J2KImageWriteParam
Modifier and Type | Field and Description |
---|---|
private ImageOutputStream |
stream
The output stream to write into
|
static String |
WRITE_ABORTED
When the writing is aborted,
RenderedImageSrc throws a
RuntimeException . |
availableLocales, locale, originatingProvider, output, progressListeners, warningListeners, warningLocales
Constructor and Description |
---|
J2KImageWriter(ImageWriterSpi originator)
Constructs
J2KImageWriter based on the provided
ImageWriterSpi . |
Modifier and Type | Method and Description |
---|---|
void |
abort() |
boolean |
canWriteRasters() |
private void |
checkSampleModel(SampleModel sm) |
IIOMetadata |
convertImageMetadata(IIOMetadata inData,
ImageTypeSpecifier imageType,
ImageWriteParam param) |
IIOMetadata |
convertStreamMetadata(IIOMetadata inData,
ImageWriteParam param) |
boolean |
getAbortRequest()
This method wraps the protected method
abortRequested
to allow the abortions be monitored by J2KRenderedImage . |
IIOMetadata |
getDefaultImageMetadata(ImageTypeSpecifier imageType,
ImageWriteParam param) |
IIOMetadata |
getDefaultStreamMetadata(ImageWriteParam param) |
ImageWriteParam |
getDefaultWriteParam() |
void |
processImageProgressWrapper(float percentageDone)
Wrapper for the protected method
processImageProgress
So it can be access from the classes which are not in
ImageWriter hierachy. |
void |
reset() |
void |
setOutput(Object output) |
void |
write(IIOMetadata streamMetadata,
IIOImage image,
ImageWriteParam param) |
abortRequested, addIIOWriteProgressListener, addIIOWriteWarningListener, canInsertEmpty, canInsertImage, canRemoveImage, canReplaceImageMetadata, canReplacePixels, canReplaceStreamMetadata, canWriteEmpty, canWriteSequence, clearAbortRequest, dispose, endInsertEmpty, endReplacePixels, endWriteEmpty, endWriteSequence, getAvailableLocales, getLocale, getNumThumbnailsSupported, getOriginatingProvider, getOutput, getPreferredThumbnailSizes, prepareInsertEmpty, prepareReplacePixels, prepareWriteEmpty, prepareWriteSequence, processImageComplete, processImageProgress, processImageStarted, processThumbnailComplete, processThumbnailProgress, processThumbnailStarted, processWarningOccurred, processWarningOccurred, processWriteAborted, removeAllIIOWriteProgressListeners, removeAllIIOWriteWarningListeners, removeIIOWriteProgressListener, removeIIOWriteWarningListener, removeImage, replaceImageMetadata, replacePixels, replacePixels, replaceStreamMetadata, setLocale, write, write, writeInsert, writeToSequence
public static String WRITE_ABORTED
RenderedImageSrc
throws a
RuntimeException
.private ImageOutputStream stream
public J2KImageWriter(ImageWriterSpi originator)
J2KImageWriter
based on the provided
ImageWriterSpi
.public void processImageProgressWrapper(float percentageDone)
processImageProgress
So it can be access from the classes which are not in
ImageWriter
hierachy.public void setOutput(Object output)
setOutput
in class ImageWriter
public ImageWriteParam getDefaultWriteParam()
getDefaultWriteParam
in class ImageWriter
public IIOMetadata getDefaultStreamMetadata(ImageWriteParam param)
getDefaultStreamMetadata
in class ImageWriter
public IIOMetadata getDefaultImageMetadata(ImageTypeSpecifier imageType, ImageWriteParam param)
getDefaultImageMetadata
in class ImageWriter
public IIOMetadata convertStreamMetadata(IIOMetadata inData, ImageWriteParam param)
convertStreamMetadata
in interface ImageTranscoder
convertStreamMetadata
in class ImageWriter
public IIOMetadata convertImageMetadata(IIOMetadata inData, ImageTypeSpecifier imageType, ImageWriteParam param)
convertImageMetadata
in interface ImageTranscoder
convertImageMetadata
in class ImageWriter
public boolean canWriteRasters()
canWriteRasters
in class ImageWriter
public void write(IIOMetadata streamMetadata, IIOImage image, ImageWriteParam param) throws IOException
write
in class ImageWriter
IOException
public void abort()
abort
in class ImageWriter
public void reset()
reset
in class ImageWriter
public boolean getAbortRequest()
abortRequested
to allow the abortions be monitored by J2KRenderedImage
.private void checkSampleModel(SampleModel sm)
Copyright © 2017 Open Microscopy Environment