38 #ifndef OME_FILES_OUT_OMETIFFWRITER_H
39 #define OME_FILES_OUT_OMETIFFWRITER_H
41 #include <ome/files/detail/FormatWriter.h>
42 #include <ome/files/detail/OMETIFF.h>
47 #include <ome/xml/meta/OMEXMLMetadata.h>
83 ome::compat::shared_ptr<ome::files::tiff::TIFF>
tiff;
92 TIFFState(ome::compat::shared_ptr<ome::files::tiff::TIFF>& tiff);
99 typedef std::map<boost::filesystem::path, TIFFState>
tiff_map;
106 std::vector<detail::OMETIFFPlane>
planes;
143 ome::compat::shared_ptr<ome::xml::meta::OMEXMLMetadata>
omeMeta;
159 setId(
const boost::filesystem::path&
id);
163 close(
bool fileOnly =
false);
210 getOMEXML(
const boost::filesystem::path&
id);
220 const std::string&
xml);
239 boost::optional<bool>
247 #endif // OME_FILES_OUT_OMETIFFWRITER_H
void close(bool fileOnly=false)
Close the currently open file.
Definition: OMETIFFWriter.cpp:542
void saveBytes(dimension_size_type plane, VariantPixelBuffer &buf, dimension_size_type x, dimension_size_type y, dimension_size_type w, dimension_size_type h)
Save an image plane.
Definition: OMETIFFWriter.cpp:673
void setupIFD() const
Set IFD parameters for the current series.
Definition: OMETIFFWriter.cpp:633
boost::filesystem::path baseDir
Base path for computing relative paths in the OME-XML.
Definition: OMETIFFWriter.h:113
logging::sources::severity_logger_mt< logging::trivial::severity_level > Logger
virtual ~OMETIFFWriter()
Destructor.
Definition: OMETIFFWriter.cpp:434
dimension_size_type ifdCount
Number of IFDs written.
Definition: OMETIFFWriter.h:85
series_list seriesState
State of each series.
Definition: OMETIFFWriter.h:129
ome::compat::shared_ptr< ome::xml::meta::OMEXMLMetadata > omeMeta
OME-XML metadata for embedding in the TIFF.
Definition: OMETIFFWriter.h:143
std::size_t dimension_size_type
Size type for image dimensions.
Definition: Types.h:59
ome::compat::shared_ptr< ome::files::tiff::TIFF > tiff
TIFF file handle.
Definition: OMETIFFWriter.h:83
std::map< boost::filesystem::path, TIFFState > tiff_map
Map filename to TIFF state.
Definition: OMETIFFWriter.h:99
ome::common::Logger logger
Message logger.
Definition: OMETIFFWriter.h:71
boost::optional< bool > getBigTIFF() const
Query use of BigTIFF support.
Definition: OMETIFFWriter.cpp:910
std::map< boost::filesystem::path, std::string > file_uuid_map
Map filename to UUID.
Definition: OMETIFFWriter.h:74
tiff_map tiffs
Open TIFF files.
Definition: OMETIFFWriter.h:120
std::string flags
TIFF flags.
Definition: OMETIFFWriter.h:126
OMETIFFWriter()
Constructor.
Definition: OMETIFFWriter.cpp:420
void setPlane(dimension_size_type plane) const
Set the active plane.
Definition: OMETIFFWriter.cpp:613
void setSeries(dimension_size_type series) const
Set the active series.
Definition: OMETIFFWriter.cpp:600
ome::compat::shared_ptr< ::ome::xml::meta::MetadataRetrieve > originalMetadataRetrieve
Original MetadataRetrieve.
Definition: OMETIFFWriter.h:140
file_uuid_map files
UUID to filename mapping.
Definition: OMETIFFWriter.h:116
void nextIFD() const
Flush current IFD and create new IFD.
Definition: OMETIFFWriter.cpp:626
Current state of an image series.
Definition: OMETIFFWriter.h:103
std::string getOMEXML(const boost::filesystem::path &id)
Get OME-XML for embedding into the specified TIFF file.
Definition: OMETIFFWriter.cpp:775
TIFF writer with support for OME-XML metadata.
Definition: OMETIFFWriter.h:67
std::string uuid
UUID of file.
Definition: OMETIFFWriter.h:81
State of TIFF file.
Definition: OMETIFFWriter.h:78
void setBigTIFF(boost::optional< bool > big=true)
Set use of BigTIFF support.
Definition: OMETIFFWriter.cpp:904
void saveComment(const boost::filesystem::path &id, const std::string &xml)
Save OME-XML text in the first IFD of the specified TIFF file.
Definition: OMETIFFWriter.cpp:796
std::vector< detail::OMETIFFPlane > planes
Current state of each plane in an image series.
Definition: OMETIFFWriter.h:106
void fillMetadata()
Fill MetadataStore with cached metadata.
Definition: OMETIFFWriter.cpp:700
void setId(const boost::filesystem::path &id)
Set the current file name.
Definition: OMETIFFWriter.cpp:446
~TIFFState()
Destructor.
Definition: OMETIFFWriter.cpp:416
TIFFState(ome::compat::shared_ptr< ome::files::tiff::TIFF > &tiff)
Constructor.
Definition: OMETIFFWriter.cpp:409
Buffer for all pixel types.
Definition: VariantPixelBuffer.h:75
tiff_map::iterator currentTIFF
Current TIFF file.
Definition: OMETIFFWriter.h:123
std::vector< SeriesState > series_list
Vector of SeriesState objects.
Definition: OMETIFFWriter.h:110
boost::optional< bool > bigTIFF
Write a Big TIFF.
Definition: OMETIFFWriter.h:147