40 #include <boost/filesystem/path.hpp> 42 #include <ome/files/FormatReader.h> 43 #include <ome/files/MetadataMap.h> 44 #include <ome/files/Types.h> 46 #include <ome/xml/meta/Metadata.h> 47 #include <ome/xml/meta/MetadataRoot.h> 48 #include <ome/xml/meta/OMEXMLMetadata.h> 50 #include <ome/xml/model/enums/DimensionOrder.h> 52 #ifndef OME_FILES_METADATATOOLS_H 53 #define OME_FILES_METADATATOOLS_H 125 std::shared_ptr<::ome::xml::meta::OMEXMLMetadata>
134 std::shared_ptr<::ome::xml::meta::OMEXMLMetadata>
143 std::shared_ptr<::ome::xml::meta::OMEXMLMetadata>
152 std::shared_ptr<::ome::xml::meta::OMEXMLMetadata>
163 std::shared_ptr<::ome::xml::meta::OMEXMLMetadata>
165 bool doPlane =
false,
166 bool doImageName =
true);
175 std::shared_ptr<::ome::xml::meta::MetadataRoot>
186 std::shared_ptr<::ome::xml::meta::OMEXMLMetadata>
187 getOMEXMLMetadata(std::shared_ptr<::ome::xml::meta::MetadataRetrieve>& retrieve);
202 bool validate =
true);
243 const FormatReader& reader,
244 bool doPlane =
false,
245 bool doImageName =
true);
258 const std::vector<std::shared_ptr<CoreMetadata>> seriesList,
259 bool doPlane =
false);
271 const FormatReader& reader);
283 const FormatReader& reader);
296 const CoreMetadata& seriesMetadata,
311 bool resolve =
true);
355 getModulo(const ::ome::xml::meta::OMEXMLMetadata& omexml,
356 const std::string& tag,
416 const MetadataMap& metadata);
491 const boost::filesystem::path&
id);
520 pixelSize(const ::ome::xml::meta::MetadataRetrieve& meta,
533 pixelSize(const ::ome::xml::meta::MetadataRetrieve& meta);
565 #endif // OME_FILES_METADATATOOLS_H bool defaultCreationDateEnabled()
Check if default creation date is enabled.
Definition: MetadataTools.cpp:1189
bool validateModel(::ome::xml::meta::Metadata &meta, bool correct)
Validate a metadata store.
Definition: MetadataTools.cpp:397
std::size_t dimension_size_type
Size type for image dimensions.
Definition: Types.h:58
uint64_t storage_size_type
Size type for storage size.
Definition: Types.h:64
std::string getOMEXML(::ome::xml::meta::OMEXMLMetadata &omexml, bool validate)
Get OME-XML document from OME-XML metadata.
Definition: MetadataTools.cpp:379
void fillOriginalMetadata(::ome::xml::meta::OMEXMLMetadata &omexml, const MetadataMap &metadata)
Create OriginalMetadataAnnotations from MetadataMap.
Definition: MetadataTools.cpp:1042
void removeBinData(::ome::xml::meta::OMEXMLMetadata &omexml)
Remove all BinData elements from OME-XML metadata.
Definition: MetadataTools.cpp:873
void removeChannels(::ome::xml::meta::OMEXMLMetadata &omexml, dimension_size_type image, dimension_size_type sizeC)
Remove all but the specified number of valid Channel elements from OME-XML metadata.
Definition: MetadataTools.cpp:933
void fillPixels(::ome::xml::meta::MetadataStore &store, const FormatReader &reader)
Fill an OME-XML metadata store Pixels element from reader core metadata.
Definition: MetadataTools.cpp:643
Modulo getModuloAlongT(const ::ome::xml::meta::OMEXMLMetadata &omexml, dimension_size_type image)
Get ModuloAlongT annotation from OME-XML metadata.
Definition: MetadataTools.cpp:738
std::string createID(std::string const &type, dimension_size_type idx)
Create an object identifier for a given object type and index.
Definition: MetadataTools.cpp:178
std::shared_ptr<::ome::xml::meta::OMEXMLMetadata > createOMEXMLMetadata(ome::common::xml::dom::Document &document)
Create OME-XML metadata from DOM Document.
Definition: MetadataTools.cpp:224
std::shared_ptr<::ome::xml::meta::MetadataRoot > createOMEXMLRoot(const std::string &document)
Create OME-XML metadata root from XML document.
Definition: MetadataTools.cpp:348
void addMetadataOnly(::ome::xml::meta::OMEXMLMetadata &omexml, dimension_size_type series, bool resolve)
Add a MetadataOnly element to Pixels for the specified series.
Definition: MetadataTools.cpp:707
Modulo getModuloAlongC(const ::ome::xml::meta::OMEXMLMetadata &omexml, dimension_size_type image)
Get ModuloAlongC annotation from OME-XML metadata.
Definition: MetadataTools.cpp:745
storage_size_type significantPixelSize(const ::ome::xml::meta::MetadataRetrieve &meta, dimension_size_type series)
Get the total significant size of pixel data in a series.
Definition: MetadataTools.cpp:1276
Open Microscopy Environment C++.
void setDefaultCreationDate(::ome::xml::meta::MetadataStore &store, dimension_size_type series, const boost::filesystem::path &id)
Set the creation data for a series.
Definition: MetadataTools.cpp:1201
std::shared_ptr<::ome::xml::meta::OMEXMLMetadata > getOMEXMLMetadata(std::shared_ptr<::ome::xml::meta::MetadataRetrieve > &retrieve)
Get OME-XML metadata from metadata.
Definition: MetadataTools.cpp:357
std::string transformToLatestModelVersion(const std::string &document)
Transform an OME-XML document to the latest model version.
Definition: MetadataTools.cpp:1176
bool validateOMEXML(const std::string &document)
Validate an OME-XML document.
Definition: MetadataTools.cpp:391
MetadataMap getOriginalMetadata(::ome::xml::meta::OMEXMLMetadata &omexml)
Get original metadata from OME-XML metadata StructuredAnnotations.
Definition: MetadataTools.cpp:960
void verifyMinimum(::ome::xml::meta::MetadataRetrieve &retrieve, dimension_size_type series)
Verify correctness of minimal amount of metadata in a series.
Definition: MetadataTools.cpp:825
Modulo getModulo(const ::ome::xml::meta::OMEXMLMetadata &omexml, const std::string &tag, dimension_size_type image)
Get Modulo annotation from OME-XML metadata.
Definition: MetadataTools.cpp:752
Modulo getModuloAlongZ(const ::ome::xml::meta::OMEXMLMetadata &omexml, dimension_size_type image)
Get ModuloAlongZ annotation from OME-XML metadata.
Definition: MetadataTools.cpp:731
void fillMetadata(::ome::xml::meta::MetadataStore &store, const FormatReader &reader, bool doPlane, bool doImageName)
Fill OME-XML metadata store from reader core metadata.
Definition: MetadataTools.cpp:516
ome::xml::model::enums::DimensionOrder createDimensionOrder(const std::string &order)
Create a valid DimensionOrder from string.
Definition: MetadataTools.cpp:1215
storage_size_type pixelSize(const ::ome::xml::meta::MetadataRetrieve &meta, dimension_size_type series)
Get the total size of pixel data in a series.
Definition: MetadataTools.cpp:1241
void removeTiffData(::ome::xml::meta::OMEXMLMetadata &omexml)
Remove all TiffData elements from OME-XML metadata.
Definition: MetadataTools.cpp:902
void fillAllPixels(::ome::xml::meta::MetadataStore &store, const FormatReader &reader)
Fill all OME-XML metadata store Pixels elements from reader core metadata.
Definition: MetadataTools.cpp:630
std::string getModelVersion()
Get the currently-supported OME Data Model version.
Definition: MetadataTools.cpp:1097