40 #include <ome/files/FormatReader.h> 41 #include <ome/files/MetadataMap.h> 42 #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 ome::compat::shared_ptr< ::ome::xml::meta::OMEXMLMetadata>
134 ome::compat::shared_ptr< ::ome::xml::meta::OMEXMLMetadata>
143 ome::compat::shared_ptr< ::ome::xml::meta::OMEXMLMetadata>
152 ome::compat::shared_ptr< ::ome::xml::meta::OMEXMLMetadata>
163 ome::compat::shared_ptr< ::ome::xml::meta::OMEXMLMetadata>
165 bool doPlane =
false,
166 bool doImageName =
true);
175 ome::compat::shared_ptr< ::ome::xml::meta::MetadataRoot>
186 ome::compat::shared_ptr< ::ome::xml::meta::OMEXMLMetadata>
187 getOMEXMLMetadata(ome::compat::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<ome::compat::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,
408 const MetadataMap& metadata);
483 const boost::filesystem::path&
id);
512 pixelSize(const ::ome::xml::meta::MetadataRetrieve& meta,
525 pixelSize(const ::ome::xml::meta::MetadataRetrieve& meta);
557 #endif // OME_FILES_METADATATOOLS_H bool defaultCreationDateEnabled()
Check if default creation date is enabled.
Definition: MetadataTools.cpp:1159
bool validateModel(::ome::xml::meta::Metadata &meta, bool correct)
Validate a metadata store.
Definition: MetadataTools.cpp:396
std::size_t dimension_size_type
Size type for image dimensions.
Definition: Types.h:59
uint64_t storage_size_type
Size type for storage size.
Definition: Types.h:65
std::string getOMEXML(::ome::xml::meta::OMEXMLMetadata &omexml, bool validate)
Get OME-XML document from OME-XML metadata.
Definition: MetadataTools.cpp:378
void fillOriginalMetadata(::ome::xml::meta::OMEXMLMetadata &omexml, const MetadataMap &metadata)
Create OriginalMetadataAnnotations from MetadataMap.
Definition: MetadataTools.cpp:1012
void removeBinData(::ome::xml::meta::OMEXMLMetadata &omexml)
Remove all BinData elements from OME-XML metadata.
Definition: MetadataTools.cpp:872
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:903
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:640
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
Modulo getModuloAlongT(const ::ome::xml::meta::OMEXMLMetadata &omexml, dimension_size_type image)
Get ModuloAlongT annotation from OME-XML metadata.
Definition: MetadataTools.cpp:735
ome::compat::shared_ptr< ::ome::xml::meta::MetadataRoot > createOMEXMLRoot(const std::string &document)
Create OME-XML metadata root from XML document.
Definition: MetadataTools.cpp:347
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:704
Modulo getModuloAlongC(const ::ome::xml::meta::OMEXMLMetadata &omexml, dimension_size_type image)
Get ModuloAlongC annotation from OME-XML metadata.
Definition: MetadataTools.cpp:742
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:1250
ome::compat::shared_ptr< ::ome::xml::meta::OMEXMLMetadata > createOMEXMLMetadata(ome::common::xml::dom::Document &document)
Create OME-XML metadata from DOM Document.
Definition: MetadataTools.cpp:224
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:1171
std::string transformToLatestModelVersion(const std::string &document)
Transform an OME-XML document to the latest model version.
Definition: MetadataTools.cpp:1146
bool validateOMEXML(const std::string &document)
Validate an OME-XML document.
Definition: MetadataTools.cpp:390
ome::compat::shared_ptr< ::ome::xml::meta::OMEXMLMetadata > getOMEXMLMetadata(ome::compat::shared_ptr< ::ome::xml::meta::MetadataRetrieve > &retrieve)
Get OME-XML metadata from metadata.
Definition: MetadataTools.cpp:356
MetadataMap getOriginalMetadata(::ome::xml::meta::OMEXMLMetadata &omexml)
Get original metadata from OME-XML metadata StructuredAnnotations.
Definition: MetadataTools.cpp:930
void verifyMinimum(::ome::xml::meta::MetadataRetrieve &retrieve, dimension_size_type series)
Verify correctness of minimal amount of metadata in a series.
Definition: MetadataTools.cpp:824
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:749
Modulo getModuloAlongZ(const ::ome::xml::meta::OMEXMLMetadata &omexml, dimension_size_type image)
Get ModuloAlongZ annotation from OME-XML metadata.
Definition: MetadataTools.cpp:728
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:517
ome::xml::model::enums::DimensionOrder createDimensionOrder(const std::string &order)
Create a valid DimensionOrder from string.
Definition: MetadataTools.cpp:1185
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:1215
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:627
std::string getModelVersion()
Get the currently-supported OME Data Model version.
Definition: MetadataTools.cpp:1067