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 |
canDetectBigTiff, checkParams, COMPRESSION_J2K, COMPRESSION_J2K_LOSSY, COMPRESSION_JPEG, COMPRESSION_LZW, COMPRESSION_UNCOMPRESSED, COMPRESSION_ZLIB, in, isBigTiff, tiffSaver, tileSizeX, tileSizeY
cm, compression, compressionTypes, fps, initialized, interleaved, metadataRetrieve, options, out, resolution, resolutionData, sequential, series, validBits
COMPRESSION_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, setCanDetectBigTiff, setTileSizeX, setTileSizeY, setupTiffSaver
changeOutputFile, 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, setWriteSequentially
checkSuffix, checkSuffix, getFormat, getMetadataOptions, getNativeDataType, getSuffixes, getSupportedMetadataLevels, isThisType, setMetadataOptions
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFormat, getNativeDataType, getSuffixes, isThisType
getMetadataOptions, getSupportedMetadataLevels, setMetadataOptions
private 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.Closeable
close
in interface java.lang.AutoCloseable
close
in class TiffWriter
java.io.IOException
public void saveBytes(int no, byte[] buf, int x, int y, int w, int h) throws FormatException, java.io.IOException
IFormatWriter
saveBytes
in interface IFormatWriter
saveBytes
in class TiffWriter
no
- the plane index within the series.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
TiffWriter
saveBytes
in class TiffWriter
FormatException
java.io.IOException
IFormatWriter.saveBytes(int, byte[], int, int, int, int)
public void setId(java.lang.String id) throws FormatException, java.io.IOException
FormatWriter
RandomAccessOutputStream
for the output
file and initializes the metadata for all the series using
FormatWriter.setSeries(int)
.setId
in interface IFormatHandler
setId
in class TiffWriter
id
- a String
specifying the path to the fileFormatException
java.io.IOException
public 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.DependencyException
loci.common.services.ServiceException
private java.lang.String insertWarningComment(java.lang.String xml)
private java.lang.String getOMEXML(java.lang.String file) throws FormatException, java.io.IOException
FormatException
java.io.IOException
private 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
FormatException
java.io.IOException
loci.common.services.DependencyException
loci.common.services.ServiceException
private void saveComment(java.lang.String file, java.lang.String xml) throws java.io.IOException
java.io.IOException
private void populateTiffData(OMEXMLMetadata omeMeta, int[] zct, int ifd, int series, int plane)
private void populateImage(OMEXMLMetadata omeMeta, int series)
private int planeCount()
Copyright © 2022 Open Microscopy Environment