public class OMETiffWriter extends TiffWriter
| Modifier and Type | Field and Description |
|---|---|
static String |
COMPANION_KEY |
private Map<String,Integer> |
ifdCounts |
private String[][] |
imageLocations |
private OMEXMLMetadata |
omeMeta |
private OMEXMLService |
service |
private Map<String,String> |
uuids |
private static String |
WARNING_COMMENT |
checkParams, COMPRESSION_J2K, COMPRESSION_J2K_LOSSY, COMPRESSION_JPEG, COMPRESSION_LZW, COMPRESSION_UNCOMPRESSED, in, isBigTiff, tiffSaver, tileSizeX, tileSizeYcm, compression, compressionTypes, fps, initialized, interleaved, metadataRetrieve, options, out, sequential, series, validBitsCOMPRESSION_SUFFIXES, currentId, format, LOGGER, metadataOptions, suffixes| Constructor and Description |
|---|
OMETiffWriter() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
private String |
getBinaryOnlyOMEXML(String file,
String companion,
String companionUUID) |
String |
getCompanion() |
private String |
getOMEXML(String file) |
private String |
getUUID(String filename)
Gets the UUID corresponding to the given filename.
|
private String |
insertWarningComment(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(String file,
String xml) |
void |
setId(String id)
Initializes a writer from the input file name.
|
private void |
setupServiceAndMetadata() |
canDoStacks, createInputStream, createTiffSaver, getPixelTypes, getPlaneCount, getPlaneCount, getTileSizeX, getTileSizeY, prepareToWriteImage, saveBytes, setBigTiff, setTileSizeX, setTileSizeY, setupTiffSaverchangeOutputFile, checkParams, createOutputStream, getColorModel, getCompression, getCompressionTypes, getFramesPerSecond, getMetadataRetrieve, getPixelTypes, getSamplesPerPixel, getSamplesPerPixel, getSeries, isFullPlane, isInterleaved, isSupportedType, saveBytes, saveBytes, savePlane, savePlane, savePlane, seekToPlaneOffset, setCodecOptions, setColorModel, setCompression, setFramesPerSecond, setInterleaved, setMetadataRetrieve, 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 String WARNING_COMMENT
public static final String COMPANION_KEY
private String[][] imageLocations
private OMEXMLMetadata omeMeta
private OMEXMLService service
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class TiffWriterIOExceptionpublic void saveBytes(int no,
byte[] buf,
int x,
int y,
int w,
int h)
throws FormatException,
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.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,
IOException
TiffWritersaveBytes in class TiffWriterFormatExceptionIOExceptionIFormatWriter.saveBytes(int, byte[], int, int, int, int)public void setId(String id) throws FormatException, 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 fileFormatExceptionIOExceptionpublic String getCompanion()
private void setupServiceAndMetadata()
throws loci.common.services.DependencyException,
loci.common.services.ServiceException
loci.common.services.DependencyExceptionloci.common.services.ServiceExceptionprivate String getOMEXML(String file) throws FormatException, IOException
FormatExceptionIOExceptionprivate String getBinaryOnlyOMEXML(String file, String companion, String companionUUID) throws FormatException, IOException, loci.common.services.DependencyException, loci.common.services.ServiceException
FormatExceptionIOExceptionloci.common.services.DependencyExceptionloci.common.services.ServiceExceptionprivate void saveComment(String file, String xml) throws IOException
IOExceptionprivate void populateTiffData(OMEXMLMetadata omeMeta, int[] zct, int ifd, int series, int plane)
private void populateImage(OMEXMLMetadata omeMeta, int series)
private int planeCount()
Copyright © 2017 Open Microscopy Environment