public class OMETiffWriter extends TiffWriter
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
COMPANION_KEY |
private java.util.Map<java.lang.String,java.lang.Integer> |
ifdCounts |
private java.lang.String[][] |
imageLocations |
private OMEXMLMetadata |
omeMeta |
private OMEXMLService |
service |
private java.util.Map<java.lang.String,java.lang.String> |
uuids |
private static java.lang.String |
WARNING_COMMENT |
checkParams, COMPRESSION_J2K, COMPRESSION_J2K_LOSSY, COMPRESSION_JPEG, COMPRESSION_LZW, COMPRESSION_UNCOMPRESSED, COMPRESSION_ZLIB, in, isBigTiff, tiffSaver, tileSizeX, tileSizeYcm, compression, compressionTypes, fps, initialized, interleaved, metadataRetrieve, options, out, resolution, resolutionData, sequential, series, validBitsCOMPRESSION_SUFFIXES, currentId, format, LOGGER, metadataOptions, suffixes| Constructor and Description |
|---|
OMETiffWriter() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
private java.lang.String |
getBinaryOnlyOMEXML(java.lang.String file,
java.lang.String companion,
java.lang.String companionUUID) |
java.lang.String |
getCompanion() |
private java.lang.String |
getOMEXML(java.lang.String file) |
private java.lang.String |
getUUID(java.lang.String filename)
Gets the UUID corresponding to the given filename.
|
private java.lang.String |
insertWarningComment(java.lang.String xml) |
private int |
planeCount() |
private void |
populateImage(OMEXMLMetadata omeMeta,
int series) |
private void |
populateTiffData(OMEXMLMetadata omeMeta,
int[] zct,
int ifd,
int series,
int plane) |
void |
saveBytes(int no,
byte[] buf,
IFD ifd,
int x,
int y,
int w,
int h)
Saves the given image to the specified series in the current file.
|
void |
saveBytes(int no,
byte[] buf,
int x,
int y,
int w,
int h)
Saves the given image tile to the current series in the current file.
|
private void |
saveComment(java.lang.String file,
java.lang.String xml) |
void |
setId(java.lang.String id)
Initializes a writer from the input file name.
|
private void |
setupServiceAndMetadata() |
canDoStacks, createInputStream, createTiffSaver, getPixelTypes, getPlaneCount, getTileSizeX, getTileSizeY, prepareToWriteImage, saveBytes, setBigTiff, setTileSizeX, setTileSizeY, setupTiffSaverchangeOutputFile, checkParams, createOutputStream, getColorModel, getCompression, getCompressionTypes, getFramesPerSecond, getMetadataRetrieve, getPixelTypes, getPlaneCount, getResolution, getResolutionCount, getResolutions, getSamplesPerPixel, getSamplesPerPixel, getSeries, getSizeX, getSizeY, hasResolutions, isFullPlane, isInterleaved, isSupportedType, saveBytes, saveBytes, savePlane, savePlane, savePlane, seekToPlaneOffset, setCodecOptions, setColorModel, setCompression, setFramesPerSecond, setInterleaved, setMetadataRetrieve, setResolution, setResolutions, setSeries, setValidBitsPerPixel, setWriteSequentiallycheckSuffix, checkSuffix, getFormat, getMetadataOptions, getNativeDataType, getSuffixes, getSupportedMetadataLevels, isThisType, setMetadataOptionsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFormat, getNativeDataType, getSuffixes, isThisTypegetMetadataOptions, getSupportedMetadataLevels, setMetadataOptionsprivate static final java.lang.String WARNING_COMMENT
public static final java.lang.String COMPANION_KEY
private java.lang.String[][] imageLocations
private OMEXMLMetadata omeMeta
private OMEXMLService service
private java.util.Map<java.lang.String,java.lang.Integer> ifdCounts
private java.util.Map<java.lang.String,java.lang.String> uuids
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class TiffWriterjava.io.IOExceptionpublic void saveBytes(int no,
byte[] buf,
int x,
int y,
int w,
int h)
throws FormatException,
java.io.IOException
IFormatWritersaveBytes in interface IFormatWritersaveBytes in class TiffWriterno - the image index within the current file, starting from 0.buf - the byte array that represents the image tile.x - the X coordinate of the upper-left corner of the image tile.y - the Y coordinate of the upper-left corner of the image tile.w - the width (in pixels) of the image tile.h - the height (in pixels) of the image tile.FormatException - if one of the parameters is invalid.java.io.IOException - if there was a problem writing to the file.IFormatWriter.saveBytes(int, byte[], int, int, int, int)public void saveBytes(int no,
byte[] buf,
IFD ifd,
int x,
int y,
int w,
int h)
throws FormatException,
java.io.IOException
TiffWritersaveBytes in class TiffWriterFormatExceptionjava.io.IOExceptionIFormatWriter.saveBytes(int, byte[], int, int, int, int)public void setId(java.lang.String id)
throws FormatException,
java.io.IOException
FormatWriterRandomAccessOutputStream for the output
file and initializes the metadata for all the series using
FormatWriter.setSeries(int).setId in interface IFormatHandlersetId in class TiffWriterid - a String specifying the path to the fileFormatExceptionjava.io.IOExceptionpublic java.lang.String getCompanion()
private java.lang.String getUUID(java.lang.String filename)
private void setupServiceAndMetadata()
throws loci.common.services.DependencyException,
loci.common.services.ServiceException
loci.common.services.DependencyExceptionloci.common.services.ServiceExceptionprivate java.lang.String insertWarningComment(java.lang.String xml)
private java.lang.String getOMEXML(java.lang.String file)
throws FormatException,
java.io.IOException
FormatExceptionjava.io.IOExceptionprivate java.lang.String getBinaryOnlyOMEXML(java.lang.String file,
java.lang.String companion,
java.lang.String companionUUID)
throws FormatException,
java.io.IOException,
loci.common.services.DependencyException,
loci.common.services.ServiceException
FormatExceptionjava.io.IOExceptionloci.common.services.DependencyExceptionloci.common.services.ServiceExceptionprivate void saveComment(java.lang.String file,
java.lang.String xml)
throws java.io.IOException
java.io.IOExceptionprivate void populateTiffData(OMEXMLMetadata omeMeta, int[] zct, int ifd, int series, int plane)
private void populateImage(OMEXMLMetadata omeMeta, int series)
private int planeCount()
Copyright © 2019 Open Microscopy Environment