public class RawImageWriter extends ImageWriter
The encoding process may clip, subsample or select bands using the
parameters specified in the ImageWriteParam
.
Thus, when read this raw image the proper image data type
should be provided.
RawImageWriteParam
Modifier and Type | Field and Description |
---|---|
private int |
bandStride
The strides for pixel, band, and scanline.
|
private Rectangle |
destinationRegion |
private int |
imageIndex
The image index in this stream.
|
private RenderedImage |
input
The source raster if write raster.
|
private Raster |
inputRaster
The input source raster.
|
private int |
lineStride
The strides for pixel, band, and scanline.
|
private boolean |
noSubband |
private boolean |
noTransform
Coordinate transform or sub selection is needed before encoding.
|
private int |
numBands
The number of components in the image
|
private boolean |
optimal
Whether can write optimally.
|
private int |
pxlStride
The strides for pixel, band, and scanline.
|
private SampleModel |
sampleModel |
private int |
scaleX
The source -> destination transformation
|
private int |
scaleY
The source -> destination transformation
|
private int[] |
sourceBands
The source bands to be encoded.
|
private ImageOutputStream |
stream
The output stream to write into
|
private int |
tileHeight
The tile height for encoding
|
private int |
tileWidth
The tile width for encoding
|
private int |
tileXOffset
The tile grid offset for encoding
|
private int |
tileYOffset
The tile grid offset for encoding
|
private boolean |
writeRaster
Indicates a
raster rather than a RenderedImage
to be encoded. |
private int |
xOffset
The source -> destination transformation
|
private int |
yOffset
The source -> destination transformation
|
availableLocales, locale, originatingProvider, output, progressListeners, warningListeners, warningLocales
Constructor and Description |
---|
RawImageWriter(ImageWriterSpi originator)
Constructs
RawImageWriter based on the provided
ImageWriterSpi . |
Modifier and Type | Method and Description |
---|---|
boolean |
canWriteRasters() |
IIOMetadata |
convertImageMetadata(IIOMetadata metadata,
ImageTypeSpecifier type,
ImageWriteParam param) |
IIOMetadata |
convertStreamMetadata(IIOMetadata inData,
ImageWriteParam param) |
IIOMetadata |
getDefaultImageMetadata(ImageTypeSpecifier imageType,
ImageWriteParam param) |
IIOMetadata |
getDefaultStreamMetadata(ImageWriteParam param) |
ImageWriteParam |
getDefaultWriteParam() |
int |
getHeight() |
private int |
getMaxTileX() |
private int |
getMaxTileY() |
private int |
getMinTileX() |
private int |
getMinTileY() |
private Raster |
getTile(int tileX,
int tileY) |
int |
getWidth() |
private int |
mapToSourceX(int x) |
private int |
mapToSourceY(int y) |
void |
reset() |
void |
setOutput(Object output) |
private static int |
ToTile(int pos,
int tileOffset,
int tileSize) |
void |
write(IIOMetadata streamMetadata,
IIOImage image,
ImageWriteParam param) |
private void |
writeRaster(Raster raster) |
abort, 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
private ImageOutputStream stream
private int imageIndex
private int tileWidth
private int tileHeight
private int tileXOffset
private int tileYOffset
private int scaleX
private int scaleY
private int xOffset
private int yOffset
private int[] sourceBands
private int numBands
private RenderedImage input
private Raster inputRaster
private Rectangle destinationRegion
private SampleModel sampleModel
private boolean noTransform
private boolean noSubband
private boolean writeRaster
raster
rather than a RenderedImage
to be encoded.private boolean optimal
private int pxlStride
private int lineStride
private int bandStride
public RawImageWriter(ImageWriterSpi originator)
RawImageWriter
based on the provided
ImageWriterSpi
.public void setOutput(Object output)
setOutput
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 metadata, ImageTypeSpecifier type, ImageWriteParam param)
convertImageMetadata
in interface ImageTranscoder
convertImageMetadata
in class ImageWriter
public boolean canWriteRasters()
canWriteRasters
in class ImageWriter
public ImageWriteParam getDefaultWriteParam()
getDefaultWriteParam
in class ImageWriter
public void write(IIOMetadata streamMetadata, IIOImage image, ImageWriteParam param) throws IOException
write
in class ImageWriter
IOException
public int getWidth()
public int getHeight()
private void writeRaster(Raster raster) throws IOException
IOException
private Raster getTile(int tileX, int tileY)
private int mapToSourceX(int x)
private int mapToSourceY(int y)
private int getMinTileX()
private int getMaxTileX()
private int getMinTileY()
private int getMaxTileY()
private static int ToTile(int pos, int tileOffset, int tileSize)
public void reset()
reset
in class ImageWriter
Copyright © 2015 Open Microscopy Environment