ome-files
0.5.0
|
Interface for all biological file format writers. More...
#include <ome/files/FormatWriter.h>
Public Types | |
typedef uint16_t | frame_rate_type |
Frame rate type. | |
Public Member Functions | |
virtual | ~FormatWriter () |
Destructor. | |
virtual void | setLookupTable (dimension_size_type plane, const VariantPixelBuffer &buf)=0 |
Set the color lookup table associated with the current series. More... | |
virtual void | saveBytes (dimension_size_type plane, VariantPixelBuffer &buf)=0 |
Save an image plane. More... | |
virtual void | saveBytes (dimension_size_type plane, VariantPixelBuffer &buf, dimension_size_type x, dimension_size_type y, dimension_size_type w, dimension_size_type h)=0 |
Save an image plane. More... | |
virtual void | setSeries (dimension_size_type series) const =0 |
Set the active series. More... | |
virtual dimension_size_type | getSeries () const =0 |
Get the active series. More... | |
virtual void | setPlane (dimension_size_type plane) const =0 |
Set the active plane. More... | |
virtual dimension_size_type | getPlane () const =0 |
Get the active plane. More... | |
virtual bool | canDoStacks () const =0 |
Get whether or not the writer can save multiple images in a single file. More... | |
virtual void | setMetadataRetrieve (std::shared_ptr<::ome::xml::meta::MetadataRetrieve > &retrieve)=0 |
Set the default metadata store for this writer. More... | |
virtual const std::shared_ptr<::ome::xml::meta::MetadataRetrieve > & | getMetadataRetrieve () const =0 |
Get the current metadata store for this writer. More... | |
virtual std::shared_ptr<::ome::xml::meta::MetadataRetrieve > & | getMetadataRetrieve ()=0 |
Get the current metadata store for this writer. More... | |
virtual void | setFramesPerSecond (frame_rate_type rate)=0 |
Set the frame rate to use when writing. More... | |
virtual frame_rate_type | getFramesPerSecond () const =0 |
Get the frame rate to use when writing. More... | |
virtual const std::set< ome::xml::model::enums::PixelType > | getPixelTypes () const =0 |
Get supported pixel types. More... | |
virtual const std::set< ome::xml::model::enums::PixelType > | getPixelTypes (const std::string &codec) const =0 |
Get supported pixel types for the given codec. More... | |
virtual bool | isSupportedType (ome::xml::model::enums::PixelType type) const =0 |
Check if the pixel type is supported. More... | |
virtual bool | isSupportedType (ome::xml::model::enums::PixelType type, const std::string &codec) const =0 |
Check if the pixel type is supported by the given codex. More... | |
virtual const std::set< std::string > & | getCompressionTypes () const =0 |
Get supported compression types. More... | |
virtual const std::set< std::string > & | getCompressionTypes (ome::xml::model::enums::PixelType type) const =0 |
Get supported compression types for a given pixel type. More... | |
virtual void | setCompression (const std::string &compression)=0 |
Set the compression type to use when writing. More... | |
virtual const boost::optional< std::string > & | getCompression () const =0 |
Get the compression type to use when writing. More... | |
virtual void | setInterleaved (bool interleaved)=0 |
Set subchannel interleaving. More... | |
virtual const boost::optional< bool > & | getInterleaved () const =0 |
Set subchannel interleaving. More... | |
virtual void | changeOutputFile (const boost::filesystem::path &id)=0 |
Switch the output file for the current dataset. More... | |
virtual void | setWriteSequentially (bool sequential=true)=0 |
Write planes sequentially. More... | |
virtual bool | getWriteSequentially () const =0 |
Check if planes are written sequentially. More... | |
virtual dimension_size_type | setTileSizeX (boost::optional< dimension_size_type > size)=0 |
Set the requested tile width. More... | |
virtual dimension_size_type | getTileSizeX () const =0 |
Get the effective tile width. More... | |
virtual dimension_size_type | setTileSizeY (boost::optional< dimension_size_type > size)=0 |
Set the requested tile height. More... | |
virtual dimension_size_type | getTileSizeY () const =0 |
Get the effective tile height. More... | |
Public Member Functions inherited from ome::files::FormatHandler | |
virtual | ~FormatHandler () |
Destructor. | |
virtual bool | isThisType (const boost::filesystem::path &name, bool open=true) const =0 |
Check if the given file is a valid instance of this file format. More... | |
virtual const std::string & | getFormat () const =0 |
Get the name of this file format. More... | |
virtual const std::string & | getFormatDescription () const =0 |
Get the description of this file format. More... | |
virtual const std::vector< boost::filesystem::path > & | getSuffixes () const =0 |
Get the default file suffixes for this file format. More... | |
virtual const std::vector< boost::filesystem::path > & | getCompressionSuffixes () const =0 |
Get the default compression suffixes for this file format. More... | |
virtual void | setId (const boost::filesystem::path &id)=0 |
Set the current file name. More... | |
virtual void | close (bool fileOnly=false)=0 |
Close the currently open file. More... | |
Protected Member Functions | |
FormatWriter () | |
Constructor. | |
Protected Member Functions inherited from ome::files::FormatHandler | |
FormatHandler () | |
Constructor. | |
Additional Inherited Members | |
Static Public Member Functions inherited from ome::files::FormatHandler | |
static bool | checkSuffix (const boost::filesystem::path &name, const boost::filesystem::path &suffix) |
Perform suffix matching for the given filename. More... | |
static bool | checkSuffix (const boost::filesystem::path &name, const std::vector< boost::filesystem::path > &suffixes) |
Perform suffix matching for the given filename. More... | |
static bool | checkSuffix (const boost::filesystem::path &name, const std::vector< boost::filesystem::path > &suffixes, const std::vector< boost::filesystem::path > &compression_suffixes) |
Perform suffix matching for the given filename. More... | |
static void | assertId (const boost::optional< boost::filesystem::path > &id, bool notNull=true) |
Assert that the current file is valid. More... | |
Interface for all biological file format writers.
Region
with and/or in terms of Boost.MultiArray index ranges.
|
pure virtual |
Get whether or not the writer can save multiple images in a single file.
true
if the writer supports multiple images, false
otherwise. Implemented in ome::files::detail::FormatWriter.
Referenced by ~FormatWriter().
|
pure virtual |
Switch the output file for the current dataset.
id | the new file name. |
Implemented in ome::files::detail::FormatWriter.
Referenced by ~FormatWriter().
|
pure virtual |
Get the compression type to use when writing.
Implemented in ome::files::detail::FormatWriter.
Referenced by ~FormatWriter().
|
pure virtual |
Get supported compression types.
Implemented in ome::files::detail::FormatWriter.
Referenced by ~FormatWriter().
|
pure virtual |
Get supported compression types for a given pixel type.
type | the pixel type to use. |
Implemented in ome::files::detail::FormatWriter.
|
pure virtual |
Get the frame rate to use when writing.
Implemented in ome::files::detail::FormatWriter.
Referenced by ~FormatWriter().
|
pure virtual |
Set subchannel interleaving.
false
if unset. Implemented in ome::files::detail::FormatWriter.
Referenced by ~FormatWriter().
|
pure virtual |
Get the current metadata store for this writer.
null
. Implemented in ome::files::detail::FormatWriter.
Referenced by ~FormatWriter().
|
pure virtual |
Get the current metadata store for this writer.
null
. Implemented in ome::files::detail::FormatWriter.
|
pure virtual |
Get supported pixel types.
Implemented in ome::files::detail::FormatWriter.
Referenced by ~FormatWriter().
|
pure virtual |
Get supported pixel types for the given codec.
codec | the codec to check. |
Implemented in ome::files::detail::FormatWriter.
|
pure virtual |
Get the active plane.
Implemented in ome::files::detail::FormatWriter.
Referenced by ~FormatWriter().
|
pure virtual |
Get the active series.
Implemented in ome::files::detail::FormatWriter.
Referenced by ~FormatWriter().
|
pure virtual |
Get the effective tile width.
This is intended for use with saveBytes().
Implemented in ome::files::detail::FormatWriter, ome::files::out::OMETIFFWriter, and ome::files::out::MinimalTIFFWriter.
Referenced by ~FormatWriter().
|
pure virtual |
Get the effective tile height.
This is intended for use with saveBytes().
Implemented in ome::files::detail::FormatWriter, ome::files::out::OMETIFFWriter, and ome::files::out::MinimalTIFFWriter.
Referenced by ~FormatWriter().
|
pure virtual |
Check if planes are written sequentially.
true
if sequential, false
if not. Implemented in ome::files::detail::FormatWriter.
Referenced by ~FormatWriter().
|
pure virtual |
Check if the pixel type is supported.
type | the pixel type to check. |
true
if supported, false
otherwise. Implemented in ome::files::detail::FormatWriter.
Referenced by ~FormatWriter().
|
pure virtual |
Check if the pixel type is supported by the given codex.
type | the pixel type to check. |
codec | the codec to check. |
true
if supported, false
otherwise. Implemented in ome::files::detail::FormatWriter.
|
pure virtual |
Save an image plane.
Write an image plane from a VariantPixelBuffer of size
to the current series in the current file.
plane | the plane index within the series. |
buf | the source pixel buffer. |
FormatException | if any of the parameters are invalid. |
Implemented in ome::files::detail::FormatWriter.
Referenced by ~FormatWriter().
|
pure virtual |
Save an image plane.
Write an image plane from a VariantPixelBuffer of size
to the current series in the current file.
plane | the plane index within the series. |
buf | the source pixel buffer. |
x | the X coordinate of the upper-left corner of the sub-image. |
y | the Y coordinate of the upper-left corner of the sub-image. |
w | the width of the sub-image. |
h | the height of the sub-image. |
FormatException | if any of the parameters are invalid. |
Implemented in ome::files::out::OMETIFFWriter, and ome::files::out::MinimalTIFFWriter.
|
pure virtual |
Set the compression type to use when writing.
compression | the compression type. |
Implemented in ome::files::detail::FormatWriter.
Referenced by ~FormatWriter().
|
pure virtual |
Set the frame rate to use when writing.
rate | the frame rate (number of frames per second). |
Implemented in ome::files::detail::FormatWriter.
Referenced by ~FormatWriter().
|
pure virtual |
Set subchannel interleaving.
interleaved | true to enable interleaving (chunky) or false to disable interleaving (planar). |
Implemented in ome::files::detail::FormatWriter.
Referenced by ~FormatWriter().
|
pure virtual |
Set the color lookup table associated with the current series.
If the pixel type of the lookup table is unsupported by the file format, this method will throw an exception.
plane | the plane index within the series. |
buf | the source pixel buffer. |
Implemented in ome::files::detail::FormatWriter.
Referenced by ~FormatWriter().
|
pure virtual |
Set the default metadata store for this writer.
retrieve | a metadata retrieve implementation. |
Implemented in ome::files::detail::FormatWriter.
Referenced by ~FormatWriter().
|
pure virtual |
Set the active plane.
plane | the plane to activate. |
Implemented in ome::files::detail::FormatWriter, ome::files::out::OMETIFFWriter, and ome::files::out::MinimalTIFFWriter.
Referenced by ~FormatWriter().
|
pure virtual |
Set the active series.
series | the series to activate. |
Implemented in ome::files::detail::FormatWriter, ome::files::out::OMETIFFWriter, and ome::files::out::MinimalTIFFWriter.
Referenced by ~FormatWriter().
|
pure virtual |
Set the requested tile width.
The requested tile width may not be supported by the underlying file format. If the width requested is unsupported, the writer may set the nearest supported size, or the full image width or greater if no smaller tile sizes are supported. Call getTileSizeX() to get the effective size in use by the writer, or use the return value.
size | the requested tile width. |
Implemented in ome::files::detail::FormatWriter.
Referenced by ~FormatWriter().
|
pure virtual |
Set the requested tile height.
The requested tile height may not be supported by the underlying file format. If the height requested is unsupported, the writer may set the nearest supported size, or the full image height or greater if no smaller tile sizes are supported. Call getTileSizeY() to get the effective size in use by the writer, or use the return value.
size | the requested tile height. |
Implemented in ome::files::detail::FormatWriter.
Referenced by ~FormatWriter().
|
pure virtual |
Write planes sequentially.
Set if planes will be written sequentially. If planes are written sequentially and this flag is set, then performance will be slightly improved.
sequential | true if sequential, false if not. |
Implemented in ome::files::detail::FormatWriter.
Referenced by ~FormatWriter().