public interface IFormatWriter extends IFormatHandler
Modifier and Type | Method and Description |
---|---|
boolean |
canDoStacks()
Reports whether the writer can save multiple images to a single file.
|
void |
changeOutputFile(String id)
Switch the output file for the current dataset.
|
ColorModel |
getColorModel()
Gets the color model.
|
String |
getCompression()
Gets the current compression type.
|
String[] |
getCompressionTypes()
Gets the available compression types.
|
int |
getFramesPerSecond()
Gets the frames per second to use when writing.
|
MetadataRetrieve |
getMetadataRetrieve()
Retrieves the current metadata retrieval object for this writer.
|
int[] |
getPixelTypes()
Gets the supported pixel types.
|
int[] |
getPixelTypes(String codec)
Gets the supported pixel types for the given codec.
|
int |
getSeries()
Returns the current series.
|
int |
getTileSizeX()
Retrieves the current tile width
Defaults to full image width if not supported
|
int |
getTileSizeY()
Retrieves the current tile height
Defaults to full image height if not supported
|
boolean |
isInterleaved()
Gets whether or not the channels in an image are interleaved.
|
boolean |
isSupportedType(int type)
Checks if the given pixel type is supported.
|
void |
saveBytes(int no,
byte[] buf)
Saves the given image to the current 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.
|
void |
saveBytes(int no,
byte[] buf,
loci.common.Region tile)
Saves the given image tile to the current series in the current file.
|
void |
savePlane(int no,
Object plane)
Saves the given image plane to the current series in the current file.
|
void |
savePlane(int no,
Object plane,
int x,
int y,
int w,
int h)
Saves the given image plane to the current series in the current file.
|
void |
savePlane(int no,
Object plane,
loci.common.Region tile)
Saves the given image plane to the current series in the current file.
|
void |
setCodecOptions(CodecOptions options)
Sets the codec options.
|
void |
setColorModel(ColorModel cm)
Sets the color model.
|
void |
setCompression(String compress)
Sets the current compression type.
|
void |
setFramesPerSecond(int rate)
Sets the frames per second to use when writing.
|
void |
setInterleaved(boolean interleaved)
Sets whether or not the channels in an image are interleaved.
|
void |
setMetadataRetrieve(MetadataRetrieve r)
Sets the metadata retrieval object from
which to retrieve standardized metadata.
|
void |
setSeries(int series)
Sets the current series.
|
int |
setTileSizeX(int tileSize)
Will attempt to set the tile width to the desired value and return the actual value which will be used
|
int |
setTileSizeY(int tileSize)
Will attempt to set the tile height to the desired value and return the actual value which will be used
|
void |
setValidBitsPerPixel(int bits)
Sets the number of valid bits per pixel.
|
void |
setWriteSequentially(boolean sequential)
Sets whether or not we know that planes will be written sequentially.
|
getFormat, getNativeDataType, getSuffixes, isThisType, setId
getMetadataOptions, getSupportedMetadataLevels, setMetadataOptions
void saveBytes(int no, byte[] buf) throws FormatException, IOException
no
- the image index within the current file, starting from 0.buf
- the byte array that represents the image.FormatException
- if one of the parameters is invalid.IOException
- if there was a problem writing to the file.void saveBytes(int no, byte[] buf, int x, int y, int w, int h) throws FormatException, IOException
no
- 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.void saveBytes(int no, byte[] buf, loci.common.Region tile) throws FormatException, IOException
no
- the image index within the current file, starting from 0.buf
- the byte array that represents the image tile.tile
- the Region representing the image tile to be read.FormatException
- if one of the parameters is invalid.IOException
- if there was a problem writing to the file.void savePlane(int no, Object plane) throws FormatException, IOException
no
- the image index within the current file, starting from 0.plane
- the image plane.FormatException
- if one of the parameters is invalid.IOException
- if there was a problem writing to the file.void savePlane(int no, Object plane, int x, int y, int w, int h) throws FormatException, IOException
no
- the image index within the current file, starting from 0.plane
- the image plane.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.void savePlane(int no, Object plane, loci.common.Region tile) throws FormatException, IOException
no
- the image index within the current file, starting from 0.plane
- the image plane.tile
- the Region representing the image tile to be read.FormatException
- if one of the parameters is invalid.IOException
- if there was a problem writing to the file.void setSeries(int series) throws FormatException
series
- the series index, starting from 0.FormatException
- if the specified series is invalid.int getSeries()
void setInterleaved(boolean interleaved)
void setValidBitsPerPixel(int bits)
boolean isInterleaved()
boolean canDoStacks()
void setMetadataRetrieve(MetadataRetrieve r)
MetadataRetrieve getMetadataRetrieve()
null
metadata retrieval object.void setColorModel(ColorModel cm)
ColorModel getColorModel()
void setFramesPerSecond(int rate)
int getFramesPerSecond()
String[] getCompressionTypes()
int[] getPixelTypes()
int[] getPixelTypes(String codec)
boolean isSupportedType(int type)
void setCompression(String compress) throws FormatException
FormatException
void setCodecOptions(CodecOptions options)
options
- The options to set.String getCompression()
void changeOutputFile(String id) throws FormatException, IOException
FormatException
IOException
void setWriteSequentially(boolean sequential)
int getTileSizeX() throws FormatException
FormatException
- Image metadata including Pixels Size X must be set prior to calling getTileSizeX()int setTileSizeX(int tileSize) throws FormatException
tileSize
- The tile width you wish to useFormatException
- Tile size must be greater than 0 and less than the image widthint getTileSizeY() throws FormatException
FormatException
- Image metadata including Pixels Size Y must be set prior to calling getTileSizeY()int setTileSizeY(int tileSize) throws FormatException
tileSize
- The tile height you wish to useFormatException
- Tile size must be greater than 0 and less than the image heightCopyright © 2017 Open Microscopy Environment