bioformats
5.1.8
|
Bio-Formats image reading and writing. More...
Namespaces | |
detail | |
Implementation details. | |
in | |
Reader implementations. | |
tiff | |
TIFF file format (libtiff wrapper). | |
Classes | |
class | CoreMetadata |
Core metadata values. More... | |
struct | FileInfo |
Basic metadata for a file. More... | |
class | FormatException |
Exception thrown for file format operation errors. More... | |
class | FormatHandler |
Interface for all biological file format readers and writers. More... | |
class | FormatReader |
Interface for all biological file format readers. More... | |
class | FormatWriter |
Interface for all biological file format writers. More... | |
class | MetadataConfigurable |
Metadata configuration interface. More... | |
class | MetadataMap |
Metadata key-value map using a restricted set of value types. More... | |
class | MetadataOptions |
Metadata options. More... | |
class | Modulo |
A subdimension of Z, C, or T. More... | |
class | PixelBuffer |
Buffer for a specific pixel type. More... | |
class | PixelBufferBase |
Base class for all PixelBuffer types. More... | |
struct | PixelEndianProperties |
Map the given PixelPropertiesType and Endian enums to the corresponding endian-specific language type. More... | |
struct | PixelEndianProperties< P, ENDIAN_BIG > |
Properties of big endian pixels. More... | |
struct | PixelEndianProperties< P, ENDIAN_LITTLE > |
Properties of little endian pixels. More... | |
struct | PixelEndianProperties< P, ENDIAN_NATIVE > |
Properties of native endian pixels. More... | |
struct | PixelProperties |
Map a given PixelPropertiesType enum to the corresponding language types. More... | |
struct | PixelProperties< ::ome::xml::model::enums::PixelType::BIT > |
Properties of BIT pixels. More... | |
struct | PixelProperties< ::ome::xml::model::enums::PixelType::COMPLEX > |
Properties of COMPLEX pixels. More... | |
struct | PixelProperties< ::ome::xml::model::enums::PixelType::DOUBLE > |
Properties of DOUBLE pixels. More... | |
struct | PixelProperties< ::ome::xml::model::enums::PixelType::DOUBLECOMPLEX > |
Properties of DOUBLECOMPLEX pixels. More... | |
struct | PixelProperties< ::ome::xml::model::enums::PixelType::FLOAT > |
Properties of FLOAT pixels. More... | |
struct | PixelProperties< ::ome::xml::model::enums::PixelType::INT16 > |
Properties of INT16 pixels. More... | |
struct | PixelProperties< ::ome::xml::model::enums::PixelType::INT32 > |
Properties of INT32 pixels. More... | |
struct | PixelProperties< ::ome::xml::model::enums::PixelType::INT8 > |
Properties of INT8 pixels. More... | |
struct | PixelProperties< ::ome::xml::model::enums::PixelType::UINT16 > |
Properties of UINT16 pixels. More... | |
struct | PixelProperties< ::ome::xml::model::enums::PixelType::UINT32 > |
Properties of UINT32 pixels. More... | |
struct | PixelProperties< ::ome::xml::model::enums::PixelType::UINT8 > |
Properties of UINT8 pixels. More... | |
struct | PixelPropertiesBase |
Properties common to all pixel types. More... | |
struct | PlaneRegion |
A rectangular region. More... | |
class | TileBuffer |
Tile pixel data buffer. More... | |
class | TileCache |
Tile cache. More... | |
class | TileCoverage |
Tile coverage cache. More... | |
class | UnknownFormatException |
Exception thrown for unrecognized or unsupported data streams or filenames. More... | |
class | UnsupportedCompressionException |
Exception thrown for unsupported compression types. More... | |
class | VariantPixelBuffer |
Buffer for all pixel types. More... | |
struct | Version |
Release version. More... | |
Typedefs | |
typedef std::size_t | dimension_size_type |
Size type for image dimensions. | |
typedef uint32_t | pixel_size_type |
Size type for pixel bit depths. | |
typedef uint64_t | storage_size_type |
Size type for storage size. | |
Enumerations | |
enum | Domain { UNKNOWN_DOMAIN, HCS_DOMAIN, LM_DOMAIN, EM_DOMAIN, SPM_DOMAIN, SEM_DOMAIN, FLIM_DOMAIN, MEDICAL_DOMAIN, HISTOLOGY_DOMAIN, GEL_DOMAIN, ASTRONOMY_DOMAIN, GRAPHICS_DOMAIN } |
Imaging domain. More... | |
enum | DomainCollection { NON_GRAPHICS_DOMAINS, NON_HCS_DOMAINS, NON_SPECIAL_DOMAINS, ALL_DOMAINS, HCS_ONLY_DOMAINS } |
Imaging domain collections. | |
enum | Dimensions { DIM_SPATIAL_X = 0, DIM_SPATIAL_Y = 1, DIM_SPATIAL_Z = 2, DIM_TEMPORAL_T = 3, DIM_CHANNEL = 4, DIM_SUBCHANNEL = 5, DIM_MODULO_Z = 6, DIM_MODULO_T = 7, DIM_MODULO_C = 8 } |
Dimensions. More... | |
enum | EndianType { ENDIAN_BIG, ENDIAN_LITTLE, ENDIAN_NATIVE } |
Endianness. More... | |
Functions | |
template<class charT , class traits > | |
std::basic_ostream< charT, traits > & | operator<< (std::basic_ostream< charT, traits > &os, const CoreMetadata &core) |
Output CoreMetadata to output stream. More... | |
template<class charT , class traits > | |
std::basic_ostream< charT, traits > & | operator<< (std::basic_ostream< charT, traits > &os, const FileInfo &info) |
Output FileInfo to output stream. More... | |
const std::string & | getDomain (Domain domain) |
Get the string corresponding to a particular Domain. More... | |
const std::vector< std::string > & | getDomainCollection (DomainCollection domains) |
Get the strings corresponding to a particular Domain collection. More... | |
dimension_size_type | getIndex (const std::string &order, dimension_size_type zSize, dimension_size_type cSize, dimension_size_type tSize, dimension_size_type num, dimension_size_type z, dimension_size_type c, dimension_size_type t) |
Get the rasterized index corresponding to the given Z , C and T coordinates (real sizes). More... | |
dimension_size_type | getIndex (const std::string &order, dimension_size_type zSize, dimension_size_type cSize, dimension_size_type tSize, dimension_size_type moduloZSize, dimension_size_type moduloCSize, dimension_size_type moduloTSize, dimension_size_type num, dimension_size_type z, dimension_size_type c, dimension_size_type t, dimension_size_type moduloZ, dimension_size_type moduloC, dimension_size_type moduloT) |
Get the rasterized index corresponding to the given Z , C , T , ModuloZ , ModuloC and ModuloT coordinates (effective sizes). More... | |
ome::compat::array< dimension_size_type, 3 > | getZCTCoords (const std::string &order, dimension_size_type zSize, dimension_size_type cSize, dimension_size_type tSize, dimension_size_type num, dimension_size_type index) |
Get the Z , C and T coordinates (real sizes) corresponding to the given rasterized index value. More... | |
ome::compat::array< dimension_size_type, 6 > | getZCTCoords (const std::string &order, dimension_size_type zSize, dimension_size_type cSize, dimension_size_type tSize, dimension_size_type moduloZSize, dimension_size_type moduloCSize, dimension_size_type moduloTSize, dimension_size_type num, dimension_size_type index) |
Get the Z , C , T , ModuloZ , ModuloC and ModuloT coordinates (effective sizes) corresponding to the given rasterized index value. More... | |
template<> | |
MetadataMap::value_type & | MetadataMap::get< MetadataMap::value_type > (const key_type &key) |
Get a reference to the value of a particular key from the map. More... | |
template<> | |
const MetadataMap::value_type & | MetadataMap::get< MetadataMap::value_type > (const key_type &key) const |
Get a reference to the value of a particular key from the map. More... | |
std::string | createID (std::string const &type, dimension_size_type idx) |
Create an object identifier for a given object type and index. More... | |
std::string | createID (std::string const &type, dimension_size_type idx1, dimension_size_type idx2) |
Create an object identifier for a given object type and indices. More... | |
std::string | createID (std::string const &type, dimension_size_type idx1, dimension_size_type idx2, dimension_size_type idx3) |
Create an object identifier for a given object type and indices. More... | |
std::string | createID (std::string const &type, dimension_size_type idx1, dimension_size_type idx2, dimension_size_type idx3, dimension_size_type idx4) |
Create an object identifier for a given object type and indices. More... | |
ome::compat::shared_ptr< ::ome::xml::meta::OMEXMLMetadata > | createOMEXMLMetadata (ome::common::xml::dom::Document &document) |
Create OME-XML metadata from DOM Document. More... | |
ome::compat::shared_ptr< ::ome::xml::meta::OMEXMLMetadata > | createOMEXMLMetadata (const boost::filesystem::path &file) |
Create OME-XML metadata from XML file. More... | |
ome::compat::shared_ptr< ::ome::xml::meta::OMEXMLMetadata > | createOMEXMLMetadata (const std::string &text) |
Create OME-XML metadata from XML string. More... | |
ome::compat::shared_ptr< ::ome::xml::meta::OMEXMLMetadata > | createOMEXMLMetadata (std::istream &stream) |
Create OME-XML metadata from XML input stream. More... | |
ome::compat::shared_ptr< ::ome::xml::meta::OMEXMLMetadata > | createOMEXMLMetadata (const FormatReader &reader, bool doPlane=false, bool doImageName=true) |
Create OME-XML metadata from reader core metadata. More... | |
ome::compat::shared_ptr< ::ome::xml::meta::MetadataRoot > | createOMEXMLRoot (const std::string &document) |
Create OME-XML metadata root from XML document. More... | |
ome::compat::shared_ptr< ::ome::xml::meta::OMEXMLMetadata > | getOMEXMLMetadata (ome::compat::shared_ptr< ::ome::xml::meta::MetadataRetrieve > &retrieve) |
Get OME-XML metadata from metadata. More... | |
std::string | getOMEXML (::ome::xml::meta::OMEXMLMetadata &omexml, bool validate=true) |
Get OME-XML document from OME-XML metadata. More... | |
bool | validateOMEXML (const std::string &document) |
Validate an OME-XML document. More... | |
bool | validateModel (::ome::xml::meta::Metadata &meta, bool correct) |
Validate a metadata store. More... | |
void | fillMetadata (::ome::xml::meta::MetadataStore &store, const FormatReader &reader, bool doPlane=false, bool doImageName=true) |
Fill OME-XML metadata store from reader core metadata. More... | |
void | fillMetadata (::ome::xml::meta::MetadataStore &store, const std::vector< ome::compat::shared_ptr< CoreMetadata > > seriesList, bool doPlane=false) |
Fill OME-XML metadata store from core metadata. More... | |
void | fillAllPixels (::ome::xml::meta::MetadataStore &store, const FormatReader &reader) |
Fill all OME-XML metadata store Pixels elements from reader core metadata. More... | |
void | fillPixels (::ome::xml::meta::MetadataStore &store, const FormatReader &reader) |
Fill an OME-XML metadata store Pixels element from reader core metadata. More... | |
void | fillPixels (::ome::xml::meta::MetadataStore &store, const CoreMetadata &seriesMetadata, dimension_size_type series) |
Fill an OME-XML metadata store Pixels element from core metadata. More... | |
void | addMetadataOnly (::ome::xml::meta::OMEXMLMetadata &omexml, dimension_size_type series, bool resolve=true) |
Add a MetadataOnly element to Pixels for the specified series. More... | |
Modulo | getModuloAlongZ (const ::ome::xml::meta::OMEXMLMetadata &omexml, dimension_size_type image) |
Get ModuloAlongZ annotation from OME-XML metadata. More... | |
Modulo | getModuloAlongT (const ::ome::xml::meta::OMEXMLMetadata &omexml, dimension_size_type image) |
Get ModuloAlongT annotation from OME-XML metadata. More... | |
Modulo | getModuloAlongC (const ::ome::xml::meta::OMEXMLMetadata &omexml, dimension_size_type image) |
Get ModuloAlongC annotation from OME-XML metadata. More... | |
Modulo | getModulo (const ::ome::xml::meta::OMEXMLMetadata &omexml, const std::string &tag, dimension_size_type image) |
Get Modulo annotation from OME-XML metadata. More... | |
void | verifyMinimum (::ome::xml::meta::MetadataRetrieve &retrieve, dimension_size_type series=0U) |
Verify correctness of minimal amount of metadata in a series. More... | |
void | removeBinData (::ome::xml::meta::OMEXMLMetadata &omexml) |
Remove all BinData elements from OME-XML metadata. More... | |
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. More... | |
MetadataMap | getOriginalMetadata (::ome::xml::meta::OMEXMLMetadata &omexml) |
Get original metadata from OME-XML metadata StructuredAnnotations. More... | |
void | fillOriginalMetadata (::ome::xml::meta::OMEXMLMetadata &omexml, const MetadataMap &metadata) |
Create OriginalMetadataAnnotations from MetadataMap. More... | |
std::string | getModelVersion () |
Get the currently-supported OME Data Model version. More... | |
std::string | getModelVersion (ome::common::xml::dom::Document &document) |
Get the model version used by an OME-XML document. More... | |
std::string | getModelVersion (const std::string &document) |
Get the model version used by an OME-XML document. More... | |
std::string | transformToLatestModelVersion (const std::string &document) |
Transform an OME-XML document to the latest model version. More... | |
bool | defaultCreationDateEnabled () |
Check if default creation date is enabled. More... | |
void | defaultCreationDateEnabled (bool enabled) |
Enable or disable default creation date. More... | |
void | setDefaultCreationDate (::ome::xml::meta::MetadataStore &store, dimension_size_type series, const boost::filesystem::path &id) |
Set the creation data for a series. More... | |
ome::xml::model::enums::DimensionOrder | createDimensionOrder (const std::string &order) |
Create a valid DimensionOrder from string. More... | |
storage_size_type | pixelSize (const ::ome::xml::meta::MetadataRetrieve &meta, dimension_size_type series) |
Get the total size of pixel data in a series. More... | |
storage_size_type | pixelSize (const ::ome::xml::meta::MetadataRetrieve &meta) |
Get the total size of pixel data for all series. More... | |
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. More... | |
storage_size_type | significantPixelSize (const ::ome::xml::meta::MetadataRetrieve &meta) |
Get the total significant size of pixel data for all series. More... | |
template<class charT , class traits > | |
std::basic_ostream< charT, traits > & | operator<< (std::basic_ostream< charT, traits > &os, const Modulo &modulo) |
Output Modulo to output stream. More... | |
pixel_size_type | bytesPerPixel (::ome::xml::model::enums::PixelType pixeltype) |
Get the size of a PixelType, in bytes. More... | |
pixel_size_type | bitsPerPixel (::ome::xml::model::enums::PixelType pixeltype) |
Get the size of a PixelType, in bits. More... | |
pixel_size_type | significantBitsPerPixel (::ome::xml::model::enums::PixelType pixeltype) |
Get the significant (maximum bits used) size of a PixelType, in bits. More... | |
bool | isSigned (::ome::xml::model::enums::PixelType pixeltype) |
Check whether a PixelType is signed. More... | |
bool | isInteger (::ome::xml::model::enums::PixelType pixeltype) |
Check whether a PixelType is integer. More... | |
bool | isFloatingPoint (::ome::xml::model::enums::PixelType pixeltype) |
Check whether a PixelType is floating point. More... | |
bool | isComplex (::ome::xml::model::enums::PixelType pixeltype) |
Check whether a PixelType is complex. More... | |
::ome::xml::model::enums::PixelType | pixelTypeFromBytes (pixel_size_type bytes, bool is_signed=false, bool is_integer=true, bool is_complex=false) |
Determine a likely pixel type from its the storage size in bytes. More... | |
::ome::xml::model::enums::PixelType | pixelTypeFromBits (pixel_size_type bytes, bool is_signed=false, bool is_integer=true, bool is_complex=false) |
Determine a likely pixel type from its the storage size in bits. More... | |
template<typename T > | |
void | byteswap (T &value) |
Byteswap value to switch endianness. More... | |
template<> | |
void | byteswap (std::complex< float > &value) |
Byteswap value to switch endianness. More... | |
template<> | |
void | byteswap (std::complex< double > &value) |
Byteswap value to switch endianness. More... | |
PlaneRegion | operator& (const PlaneRegion &a, const PlaneRegion &b) |
Intersect two regions. More... | |
PlaneRegion | operator| (const PlaneRegion &a, const PlaneRegion &b) |
Combine (union) two regions. More... | |
template<class charT , class traits > | |
std::basic_ostream< charT, traits > & | operator<< (std::basic_ostream< charT, traits > &os, const PlaneRegion ®ion) |
Output PlaneRegion to output stream. More... | |
template<class charT , class traits > | |
std::basic_ostream< charT, traits > & | operator<< (std::basic_ostream< charT, traits > &os, const Version &version) |
Output Version to output stream. More... | |
std::string | escapeXML (const std::string &s) |
Replace special characters with XML entities in an XML string. More... | |
std::string | sanitizeXML (const std::string &s) |
Filter control codes and invalid sequences in an XML string. More... | |
bool | validateXML (const std::string &s, const std::string &loc="XML") |
Validate XML in an XML string. More... | |
Variables | |
const Version | release_version (OME_VERSION_MAJOR, OME_VERSION_MINOR, OME_VERSION_PATCH, OME_VERSION_EXTRA_S) |
The release version number of the library currently being linked against. | |
const ::ome::xml::model::primitives::Timestamp | release_date (posix_release_date()) |
The release date of the library currently being linked against. | |
Bio-Formats image reading and writing.
Dimensions.
The OME data model currently supports five dimensions (XYZTC), plus an implicit dimension (subchannel) and three modulo dimensions which subdivide Z, T and C. This enumeration is used to refer to specific dimensions, and the value is the logical dimension order used for the PixelBuffer interface.
The current interface requires all dimensions to be present even if unused. Future model changes may remove this requirement.
Imaging domain.
void ome::bioformats::addMetadataOnly | ( | ::ome::xml::meta::OMEXMLMetadata & | omexml, |
dimension_size_type | series, | ||
bool | resolve = true |
||
) |
Add a MetadataOnly element to Pixels for the specified series.
omexml | the OME-XML metadata store. |
series | the series containing the Pixels element to add MetadataOnly to. |
resolve | true to resolve references, false to skip resolving references |
References ome::xml::meta::OMEXMLMetadata::getRoot(), and ome::xml::meta::OMEXMLMetadata::resolveReferences().
Referenced by fillMetadata(), and ome::bioformats::in::OMETIFFReader::getMetadataStoreForDisplay().
pixel_size_type ome::bioformats::bitsPerPixel | ( | ::ome::xml::model::enums::PixelType | pixeltype | ) |
Get the size of a PixelType, in bits.
pixeltype | the PixelType to query. |
Referenced by ome::qtwidgets::gl::Image2D::create(), ome::bioformats::detail::FormatReader::getBitsPerPixel(), ome::bioformats::tiff::getCoreMetadata(), ome::bioformats::in::OMETIFFReader::initFile(), ome::bioformats::out::MinimalTIFFWriter::setupIFD(), and ome::bioformats::out::OMETIFFWriter::setupIFD().
pixel_size_type ome::bioformats::bytesPerPixel | ( | ::ome::xml::model::enums::PixelType | pixeltype | ) |
Get the size of a PixelType, in bytes.
pixeltype | the PixelType to query. |
Referenced by ome::bioformats::detail::FormatReader::getOptimalTileHeight(), pixelSize(), and pixelTypeFromBytes().
|
inline |
Byteswap value to switch endianness.
value | the value to swap. |
|
inline |
Byteswap value to switch endianness.
value | the value to swap. |
|
inline |
Byteswap value to switch endianness.
value | the value to swap. |
ome::xml::model::enums::DimensionOrder ome::bioformats::createDimensionOrder | ( | const std::string & | order | ) |
Create a valid DimensionOrder from string.
Any duplicate dimension will have all duplicates following the initial instance removed. Any missing dimension will be suffixed to the resulting dimension order; the order of these dimensions is unspecified (since they weren't provided, the expectation is that the caller did not care).
order | the string dimension order. |
std::logic_error | if the provided order is invalid. |
std::string ome::bioformats::createID | ( | std::string const & | type, |
dimension_size_type | idx | ||
) |
Create an object identifier for a given object type and index.
type | the object type. |
idx | the object index. |
Referenced by fillMetadata(), fillOriginalMetadata(), and fillPixels().
std::string ome::bioformats::createID | ( | std::string const & | type, |
dimension_size_type | idx1, | ||
dimension_size_type | idx2 | ||
) |
Create an object identifier for a given object type and indices.
type | the object type. |
idx1 | the first object index. |
idx2 | the second object index. |
std::string ome::bioformats::createID | ( | std::string const & | type, |
dimension_size_type | idx1, | ||
dimension_size_type | idx2, | ||
dimension_size_type | idx3 | ||
) |
Create an object identifier for a given object type and indices.
type | the object type. |
idx1 | the first object index. |
idx2 | the second object index. |
idx3 | the third object index. |
std::string ome::bioformats::createID | ( | std::string const & | type, |
dimension_size_type | idx1, | ||
dimension_size_type | idx2, | ||
dimension_size_type | idx3, | ||
dimension_size_type | idx4 | ||
) |
Create an object identifier for a given object type and indices.
type | the object type. |
idx1 | the first object index. |
idx2 | the second object index. |
idx3 | the third object index. |
idx4 | the fourth object index. |
ome::compat::shared_ptr<::ome::xml::meta::OMEXMLMetadata > ome::bioformats::createOMEXMLMetadata | ( | ome::common::xml::dom::Document & | document | ) |
Create OME-XML metadata from DOM Document.
document | the XML document. |
References ome::common::xml::dom::Document::getDocumentElement().
Referenced by createOMEXMLMetadata(), createOMEXMLRoot(), ome::bioformats::in::OMETIFFReader::initFile(), ome::bioformats::in::OMETIFFReader::isFilenameThisTypeImpl(), and ome::bioformats::in::OMETIFFReader::isSingleFile().
ome::compat::shared_ptr<::ome::xml::meta::OMEXMLMetadata > ome::bioformats::createOMEXMLMetadata | ( | const boost::filesystem::path & | file | ) |
Create OME-XML metadata from XML file.
file | the XML file. |
References ome::xml::createDocument(), createOMEXMLMetadata(), ome::common::xml::dom::ParseParameters::doSchema, and ome::common::xml::dom::ParseParameters::validationSchemaFullChecking.
ome::compat::shared_ptr<::ome::xml::meta::OMEXMLMetadata > ome::bioformats::createOMEXMLMetadata | ( | const std::string & | text | ) |
Create OME-XML metadata from XML string.
text | the XML string. |
References ome::xml::createDocument(), createOMEXMLMetadata(), ome::common::xml::dom::ParseParameters::doSchema, and ome::common::xml::dom::ParseParameters::validationSchemaFullChecking.
ome::compat::shared_ptr<::ome::xml::meta::OMEXMLMetadata > ome::bioformats::createOMEXMLMetadata | ( | std::istream & | stream | ) |
Create OME-XML metadata from XML input stream.
stream | the XML input stream. |
References ome::xml::createDocument(), createOMEXMLMetadata(), ome::common::xml::dom::ParseParameters::doSchema, and ome::common::xml::dom::ParseParameters::validationSchemaFullChecking.
ome::compat::shared_ptr<::ome::xml::meta::OMEXMLMetadata > ome::bioformats::createOMEXMLMetadata | ( | const FormatReader & | reader, |
bool | doPlane = false , |
||
bool | doImageName = true |
||
) |
Create OME-XML metadata from reader core metadata.
reader | the reader to use. |
doPlane | create Plane elements if true . |
doImageName | set image name if true . |
References fillMetadata().
ome::compat::shared_ptr<::ome::xml::meta::MetadataRoot > ome::bioformats::createOMEXMLRoot | ( | const std::string & | document | ) |
Create OME-XML metadata root from XML document.
document | the XML document source. |
References createOMEXMLMetadata().
bool ome::bioformats::defaultCreationDateEnabled | ( | ) |
Check if default creation date is enabled.
true
if enabled, false
otherwise. Referenced by setDefaultCreationDate().
void ome::bioformats::defaultCreationDateEnabled | ( | bool | enabled | ) |
Enable or disable default creation date.
This setting enables or disables the replacement of missing creation dates.
enabled | true to enable, false to disable. |
std::string ome::bioformats::escapeXML | ( | const std::string & | s | ) |
Replace special characters with XML entities in an XML string.
s | the string to escape. |
void ome::bioformats::fillAllPixels | ( | ::ome::xml::meta::MetadataStore & | store, |
const FormatReader & | reader | ||
) |
Fill all OME-XML metadata store Pixels elements from reader core metadata.
Set Pixels metadata for all series.
store | the OME-XML metadata store. |
reader | the reader to use. |
References fillPixels(), ome::bioformats::FormatReader::getSeries(), ome::bioformats::FormatReader::getSeriesCount(), and ome::bioformats::FormatReader::setSeries().
void ome::bioformats::fillMetadata | ( | ::ome::xml::meta::MetadataStore & | store, |
const FormatReader & | reader, | ||
bool | doPlane = false , |
||
bool | doImageName = true |
||
) |
Fill OME-XML metadata store from reader core metadata.
The metadata store is expected to be empty.
store | the OME-XML metadata store. |
reader | the reader to use. |
doPlane | create Plane elements if true . |
doImageName | set image name if true . |
References addMetadataOnly(), createID(), fillPixels(), ome::bioformats::FormatReader::getCurrentFile(), ome::bioformats::FormatReader::getImageCount(), ome::bioformats::FormatReader::getPixelType(), ome::bioformats::FormatReader::getSeries(), ome::bioformats::FormatReader::getSeriesCount(), ome::bioformats::FormatReader::getZCTCoords(), setDefaultCreationDate(), ome::xml::meta::MetadataStore::setImageID(), ome::xml::meta::MetadataStore::setPlaneTheC(), ome::xml::meta::MetadataStore::setPlaneTheT(), ome::xml::meta::MetadataStore::setPlaneTheZ(), and ome::bioformats::FormatReader::setSeries().
Referenced by createOMEXMLMetadata(), ome::bioformats::in::MinimalTIFFReader::initFile(), and ome::bioformats::in::OMETIFFReader::initFile().
void ome::bioformats::fillMetadata | ( | ::ome::xml::meta::MetadataStore & | store, |
const std::vector< ome::compat::shared_ptr< CoreMetadata > > | seriesList, | ||
bool | doPlane = false |
||
) |
Fill OME-XML metadata store from core metadata.
The metadata store is expected to be empty.
store | the OME-XML metadata store. |
seriesList | the core metadata to use. |
doPlane | create Plane elements if true . |
References addMetadataOnly(), createID(), fillPixels(), getZCTCoords(), ome::xml::meta::MetadataStore::setImageID(), ome::xml::meta::MetadataStore::setPlaneTheC(), ome::xml::meta::MetadataStore::setPlaneTheT(), and ome::xml::meta::MetadataStore::setPlaneTheZ().
void ome::bioformats::fillOriginalMetadata | ( | ::ome::xml::meta::OMEXMLMetadata & | omexml, |
const MetadataMap & | metadata | ||
) |
Create OriginalMetadataAnnotations from MetadataMap.
omexml | the OME-XML metadata store. |
metadata | the original metadata. |
References createID(), ome::bioformats::MetadataMap::empty(), ome::bioformats::MetadataMap::flatten(), ome::xml::meta::OMEXMLMetadata::getRoot(), ome::xml::meta::OMEXMLMetadata::getXMLAnnotationID(), and ome::xml::meta::OMEXMLMetadata::resolveReferences().
Referenced by ome::bioformats::detail::FormatReader::setId().
void ome::bioformats::fillPixels | ( | ::ome::xml::meta::MetadataStore & | store, |
const FormatReader & | reader | ||
) |
Fill an OME-XML metadata store Pixels element from reader core metadata.
Set Pixels metadata for the reader's current series.
store | the OME-XML metadata store. |
reader | the reader to use. |
References createID(), ome::bioformats::FormatReader::getBitsPerPixel(), ome::bioformats::FormatReader::getDimensionOrder(), ome::bioformats::FormatReader::getEffectiveSizeC(), ome::bioformats::FormatReader::getPixelType(), ome::bioformats::FormatReader::getRGBChannelCount(), ome::bioformats::FormatReader::getSeries(), ome::bioformats::FormatReader::getSizeC(), ome::bioformats::FormatReader::getSizeT(), ome::bioformats::FormatReader::getSizeX(), ome::bioformats::FormatReader::getSizeY(), ome::bioformats::FormatReader::getSizeZ(), ome::bioformats::FormatReader::isInterleaved(), ome::bioformats::FormatReader::isLittleEndian(), ome::xml::meta::MetadataStore::setChannelID(), ome::xml::meta::MetadataStore::setChannelSamplesPerPixel(), ome::xml::meta::MetadataStore::setPixelsBigEndian(), ome::xml::meta::MetadataStore::setPixelsDimensionOrder(), ome::xml::meta::MetadataStore::setPixelsID(), ome::xml::meta::MetadataStore::setPixelsInterleaved(), ome::xml::meta::MetadataStore::setPixelsSignificantBits(), ome::xml::meta::MetadataStore::setPixelsSizeC(), ome::xml::meta::MetadataStore::setPixelsSizeT(), ome::xml::meta::MetadataStore::setPixelsSizeX(), ome::xml::meta::MetadataStore::setPixelsSizeY(), ome::xml::meta::MetadataStore::setPixelsSizeZ(), and ome::xml::meta::MetadataStore::setPixelsType().
Referenced by fillAllPixels(), and fillMetadata().
void ome::bioformats::fillPixels | ( | ::ome::xml::meta::MetadataStore & | store, |
const CoreMetadata & | seriesMetadata, | ||
dimension_size_type | series | ||
) |
Fill an OME-XML metadata store Pixels element from core metadata.
Set Pixels metadata for the the specified series.
store | the OME-XML metadata store. |
seriesMetadata | the seriesMetadata the metadata to use. |
series | the series to set. |
References ome::bioformats::CoreMetadata::bitsPerPixel, createID(), ome::bioformats::CoreMetadata::dimensionOrder, ome::bioformats::CoreMetadata::interleaved, ome::bioformats::CoreMetadata::littleEndian, ome::bioformats::CoreMetadata::pixelType, ome::xml::meta::MetadataStore::setChannelID(), ome::xml::meta::MetadataStore::setChannelSamplesPerPixel(), ome::xml::meta::MetadataStore::setPixelsBigEndian(), ome::xml::meta::MetadataStore::setPixelsDimensionOrder(), ome::xml::meta::MetadataStore::setPixelsID(), ome::xml::meta::MetadataStore::setPixelsInterleaved(), ome::xml::meta::MetadataStore::setPixelsSignificantBits(), ome::xml::meta::MetadataStore::setPixelsSizeC(), ome::xml::meta::MetadataStore::setPixelsSizeT(), ome::xml::meta::MetadataStore::setPixelsSizeX(), ome::xml::meta::MetadataStore::setPixelsSizeY(), ome::xml::meta::MetadataStore::setPixelsSizeZ(), ome::xml::meta::MetadataStore::setPixelsType(), ome::bioformats::CoreMetadata::sizeC, ome::bioformats::CoreMetadata::sizeT, ome::bioformats::CoreMetadata::sizeX, ome::bioformats::CoreMetadata::sizeY, and ome::bioformats::CoreMetadata::sizeZ.
const std::string & ome::bioformats::getDomain | ( | Domain | domain | ) |
Get the string corresponding to a particular Domain.
domain | the Domain to use. |
References ASTRONOMY_DOMAIN, EM_DOMAIN, FLIM_DOMAIN, GEL_DOMAIN, GRAPHICS_DOMAIN, HCS_DOMAIN, HISTOLOGY_DOMAIN, LM_DOMAIN, MEDICAL_DOMAIN, SEM_DOMAIN, SPM_DOMAIN, and UNKNOWN_DOMAIN.
Referenced by ome::bioformats::in::MinimalTIFFReader::MinimalTIFFReader().
const std::vector< std::string > & ome::bioformats::getDomainCollection | ( | DomainCollection | domains | ) |
Get the strings corresponding to a particular Domain collection.
domains | the Domain collection to use. |
References ASTRONOMY_DOMAIN, EM_DOMAIN, FLIM_DOMAIN, GEL_DOMAIN, GRAPHICS_DOMAIN, HCS_DOMAIN, HISTOLOGY_DOMAIN, LM_DOMAIN, MEDICAL_DOMAIN, SEM_DOMAIN, SPM_DOMAIN, and UNKNOWN_DOMAIN.
Referenced by ome::bioformats::in::OMETIFFReader::getDomains(), and ome::bioformats::in::OMETIFFReader::OMETIFFReader().
dimension_size_type ome::bioformats::getIndex | ( | const std::string & | order, |
dimension_size_type | zSize, | ||
dimension_size_type | cSize, | ||
dimension_size_type | tSize, | ||
dimension_size_type | num, | ||
dimension_size_type | z, | ||
dimension_size_type | c, | ||
dimension_size_type | t | ||
) |
Get the rasterized index corresponding to the given Z
, C
and T
coordinates (real sizes).
order | dimension order. |
zSize | total number of focal planes (real size). |
cSize | total number of channels (real size). |
tSize | total number of time points (real size). |
num | total number of image planes (zSize * cSize * tSize), specified as a consistency check. |
z | the Z coordinate of ZCT coordinate triple to convert to 1D index (real size). |
c | the C coordinate of ZCT coordinate triple to convert to 1D index (real size). |
t | the T coordinate of ZCT coordinate triple to convert to 1D index (real size). |
Referenced by ome::bioformats::detail::FormatWriter::getIndex(), getIndex(), ome::bioformats::detail::FormatReader::getIndex(), and ome::bioformats::in::OMETIFFReader::initFile().
dimension_size_type ome::bioformats::getIndex | ( | const std::string & | order, |
dimension_size_type | zSize, | ||
dimension_size_type | cSize, | ||
dimension_size_type | tSize, | ||
dimension_size_type | moduloZSize, | ||
dimension_size_type | moduloCSize, | ||
dimension_size_type | moduloTSize, | ||
dimension_size_type | num, | ||
dimension_size_type | z, | ||
dimension_size_type | c, | ||
dimension_size_type | t, | ||
dimension_size_type | moduloZ, | ||
dimension_size_type | moduloC, | ||
dimension_size_type | moduloT | ||
) |
Get the rasterized index corresponding to the given Z
, C
, T
, ModuloZ
, ModuloC
and ModuloT
coordinates (effective sizes).
Z
, C
and T
coordinates take the modulo dimension sizes into account. The effective size for each of these dimensions is limited to the total size of the dimension divided by the modulo size.order | dimension order. |
zSize | total number of focal planes (real size). |
cSize | total number of channels (real size). |
tSize | total number of time points (real size). |
moduloZSize | total number of ModuloZ planes (real size). |
moduloCSize | total number of ModuloC channels (real size). |
moduloTSize | total number of ModuloT time points (real size). |
num | total number of image planes (zSize * cSize * tSize), specified as a consistency check. |
z | the Z coordinate of ZCTmZmCmT coordinate sextuple to convert to 1D index (effective size). |
c | the C coordinate of ZCTmZmCmT coordinate sextuple to convert to 1D index (effective size). |
t | the T coordinate of ZCTmZmCmT coordinate sextuple to convert to 1D index (effective size). |
moduloZ | the ModuloZ coordinate of ZCTmZmCmT coordinate sextuple to convert to 1D index (effective size). |
moduloC | the ModuloC coordinate of ZCTmZmCmT coordinate sextuple to convert to 1D index (effective size). |
moduloT | the ModuloT coordinate of ZCTmZmCmT coordinate sextuple to convert to 1D index (effective size). |
References getIndex().
std::string ome::bioformats::getModelVersion | ( | ) |
Get the currently-supported OME Data Model version.
std::string ome::bioformats::getModelVersion | ( | ome::common::xml::dom::Document & | document | ) |
Get the model version used by an OME-XML document.
document | the OME-XML document. |
References ome::common::xml::dom::Document::getDocumentElement().
std::string ome::bioformats::getModelVersion | ( | const std::string & | document | ) |
Get the model version used by an OME-XML document.
document | the OME-XML document. |
Modulo ome::bioformats::getModulo | ( | const ::ome::xml::meta::OMEXMLMetadata & | omexml, |
const std::string & | tag, | ||
dimension_size_type | image | ||
) |
Get Modulo annotation from OME-XML metadata.
omexml | the OME-XML metadata store. |
tag | the Modulo annotation XML tag name. |
image | the image index. |
References ome::common::xml::dom::NodeList::begin(), ome::xml::createDocument(), ome::common::xml::dom::NodeList::empty(), ome::common::xml::dom::NodeList::end(), ome::common::xml::dom::Document::getElementsByTagName(), and ome::xml::meta::OMEXMLMetadata::getRoot().
Referenced by getModuloAlongC(), getModuloAlongT(), and getModuloAlongZ().
Modulo ome::bioformats::getModuloAlongC | ( | const ::ome::xml::meta::OMEXMLMetadata & | omexml, |
dimension_size_type | image | ||
) |
Get ModuloAlongC annotation from OME-XML metadata.
omexml | the OME-XML metadata store. |
image | the image index. |
References getModulo().
Referenced by ome::bioformats::in::OMETIFFReader::initFile().
Modulo ome::bioformats::getModuloAlongT | ( | const ::ome::xml::meta::OMEXMLMetadata & | omexml, |
dimension_size_type | image | ||
) |
Get ModuloAlongT annotation from OME-XML metadata.
omexml | the OME-XML metadata store. |
image | the image index. |
References getModulo().
Referenced by ome::bioformats::in::OMETIFFReader::initFile().
Modulo ome::bioformats::getModuloAlongZ | ( | const ::ome::xml::meta::OMEXMLMetadata & | omexml, |
dimension_size_type | image | ||
) |
Get ModuloAlongZ annotation from OME-XML metadata.
omexml | the OME-XML metadata store. |
image | the image index. |
References getModulo().
Referenced by ome::bioformats::in::OMETIFFReader::initFile().
std::string ome::bioformats::getOMEXML | ( | ::ome::xml::meta::OMEXMLMetadata & | omexml, |
bool | validate = true |
||
) |
Get OME-XML document from OME-XML metadata.
This will convert the OME-XML metadata to an XML document string.
omexml | the OME-XML metadata store. |
validate | true to validate the OME-XML, false to skip validation. |
References ome::xml::meta::OMEXMLMetadata::dumpXML(), and validateOMEXML().
Referenced by ome::bioformats::out::OMETIFFWriter::getOMEXML().
ome::compat::shared_ptr<::ome::xml::meta::OMEXMLMetadata > ome::bioformats::getOMEXMLMetadata | ( | ome::compat::shared_ptr< ::ome::xml::meta::MetadataRetrieve > & | retrieve | ) |
Get OME-XML metadata from metadata.
This will convert the metadata to OME-XML metadata if required.
retrieve | the metadata to use. |
References ome::xml::meta::convert().
MetadataMap ome::bioformats::getOriginalMetadata | ( | ::ome::xml::meta::OMEXMLMetadata & | omexml | ) |
Get original metadata from OME-XML metadata StructuredAnnotations.
omexml | the OME-XML metadata store. |
References ome::xml::createDocument(), ome::xml::model::detail::OMEModelObject::getChildrenByTagName(), ome::common::xml::dom::Document::getDocumentElement(), ome::xml::meta::OMEXMLMetadata::getRoot(), ome::bioformats::MetadataMap::set(), and ome::common::xml::dom::ParseParameters::validationScheme.
Referenced by ome::bioformats::in::OMETIFFReader::initFile().
ome::compat::array< dimension_size_type, 3 > ome::bioformats::getZCTCoords | ( | const std::string & | order, |
dimension_size_type | zSize, | ||
dimension_size_type | cSize, | ||
dimension_size_type | tSize, | ||
dimension_size_type | num, | ||
dimension_size_type | index | ||
) |
Get the Z
, C
and T
coordinates (real sizes) corresponding to the given rasterized index value.
order | dimension order. |
zSize | total number of focal planes (real size). |
cSize | total number of channels (real size). |
tSize | total number of time points (real size). |
num | total number of image planes (zSize * cSize * tSize), specified as a consistency check. |
index | 1D (rasterized) index to convert to ZCT coordinates. |
Referenced by ome::bioformats::out::OMETIFFWriter::fillMetadata(), fillMetadata(), ome::bioformats::detail::FormatWriter::getZCTCoords(), getZCTCoords(), ome::bioformats::detail::FormatReader::getZCTCoords(), and ome::bioformats::detail::FormatReader::getZCTModuloCoords().
ome::compat::array< dimension_size_type, 6 > ome::bioformats::getZCTCoords | ( | const std::string & | order, |
dimension_size_type | zSize, | ||
dimension_size_type | cSize, | ||
dimension_size_type | tSize, | ||
dimension_size_type | moduloZSize, | ||
dimension_size_type | moduloCSize, | ||
dimension_size_type | moduloTSize, | ||
dimension_size_type | num, | ||
dimension_size_type | index | ||
) |
Get the Z
, C
, T
, ModuloZ
, ModuloC
and ModuloT
coordinates (effective sizes) corresponding to the given rasterized index value.
Z
, C
and T
coordinates are not the same as those returned by ome::bioformats::getZCTCoords(const std::string&, dimension_size_type, dimension_size_type, dimension_size_type, dimension_size_type, dimension_size_type) because the size of the modulo dimensions is taken into account. The effective size for each of these dimensions is limited to the total size of the dimension divided by the modulo size.order | dimension order. |
zSize | total number of focal planes (effective size). |
cSize | total number of channels (effective size). |
tSize | total number of time points (effective size). |
moduloZSize | total number of ModuloZ planes (effective size). |
moduloCSize | total number of ModuloC channels (effective size). |
moduloTSize | total number of ModuloT time points (effective size). |
num | total number of image planes (zSize * cSize * tSize), specified as a consistency check. |
index | 1D (rasterized) index to convert to ZCTmZmCmT coordinates. |
References getZCTCoords().
bool ome::bioformats::isComplex | ( | ::ome::xml::model::enums::PixelType | pixeltype | ) |
Check whether a PixelType is complex.
pixeltype | the PixelType to query. |
true
if complex, false
otherwise. bool ome::bioformats::isFloatingPoint | ( | ::ome::xml::model::enums::PixelType | pixeltype | ) |
Check whether a PixelType is floating point.
pixeltype | the PixelType to query. |
!isInteger
().true
if floating point, false
otherwise. References isInteger().
bool ome::bioformats::isInteger | ( | ::ome::xml::model::enums::PixelType | pixeltype | ) |
Check whether a PixelType is integer.
pixeltype | the PixelType to query. |
true
if integer, false
otherwise. Referenced by isFloatingPoint().
bool ome::bioformats::isSigned | ( | ::ome::xml::model::enums::PixelType | pixeltype | ) |
Check whether a PixelType is signed.
pixeltype | the PixelType to query. |
true
if signed, false
otherwise.
|
inline |
Get a reference to the value of a particular key from the map.
If the key was not found, or the type of value
does not match the stored value type, value
will remain unmodified.
key | the key to find. |
boost::bad_get | on failure if the key was not found or if the type did not match the stored value type. |
|
inline |
Get a reference to the value of a particular key from the map.
If the key was not found, or the type of value
does not match the stored value type, value
will remain unmodified.
key | the key to find. |
boost::bad_get | on failure if the key was not found or if the type did not match the stored value type. |
|
inline |
Intersect two regions.
If the regions do not intersect, a default-constructed region of zero size will be returned.
a | the first region. |
b | the second region. |
References ome::bioformats::PlaneRegion::h, ome::bioformats::PlaneRegion::w, ome::bioformats::PlaneRegion::x, and ome::bioformats::PlaneRegion::y.
|
inline |
Output Version to output stream.
os | the output stream. |
version | the Version to output. |
References ome::bioformats::Version::major.
|
inline |
Output Modulo to output stream.
os | the output stream. |
modulo | the Modulo to output. |
References ome::bioformats::Modulo::parentDimension.
|
inline |
Output FileInfo to output stream.
os | the output stream. |
info | the FileInfo to output. |
References ome::bioformats::FileInfo::filename.
|
inline |
Output CoreMetadata to output stream.
os | the output stream. |
core | the CoreMetadata to output. |
References ome::bioformats::CoreMetadata::sizeX.
|
inline |
Output PlaneRegion to output stream.
os | the output stream. |
region | the PlaneRegion to output. |
References ome::bioformats::PlaneRegion::x.
|
inline |
Combine (union) two regions.
If the regions do not abut about a common edge, a default-constructed region of zero size will be returned.
a | the first region. |
b | the second region. |
References ome::bioformats::PlaneRegion::h, ome::bioformats::PlaneRegion::w, ome::bioformats::PlaneRegion::x, and ome::bioformats::PlaneRegion::y.
storage_size_type ome::bioformats::pixelSize | ( | const ::ome::xml::meta::MetadataRetrieve & | meta, |
dimension_size_type | series | ||
) |
Get the total size of pixel data in a series.
The size for the pixel type is rounded up to the nearest byte before multiplying by the dimension sizes.
meta | the metadata to use. |
series | the image series to use. |
References bytesPerPixel().
Referenced by pixelSize(), ome::bioformats::out::MinimalTIFFWriter::setId(), ome::bioformats::out::OMETIFFWriter::setId(), and significantPixelSize().
storage_size_type ome::bioformats::pixelSize | ( | const ::ome::xml::meta::MetadataRetrieve & | meta | ) |
Get the total size of pixel data for all series.
The size for the pixel type is rounded up to the nearest byte before multiplying by the dimension sizes.
meta | the metadata to use. |
References pixelSize().
ome::xml::model::enums::PixelType ome::bioformats::pixelTypeFromBits | ( | pixel_size_type | bytes, |
bool | is_signed = false , |
||
bool | is_integer = true , |
||
bool | is_complex = false |
||
) |
Determine a likely pixel type from its the storage size in bits.
Note that the BIT type will never be returned due to having the same storage size as other types.
bytes | the storage size in bits. |
is_signed | true if signed, false if unsigned. |
is_integer | true if integer, false otherwise. |
is_complex | :c true if complex, false otherwise. |
if | no pixel type was identified or the parameters are invalid. |
References pixelTypeFromBytes().
ome::xml::model::enums::PixelType ome::bioformats::pixelTypeFromBytes | ( | pixel_size_type | bytes, |
bool | is_signed = false , |
||
bool | is_integer = true , |
||
bool | is_complex = false |
||
) |
Determine a likely pixel type from its the storage size in bytes.
Note that the BIT type will never be returned due to having the same storage size as other types.
bytes | the storage size in bytes. |
is_signed | true if signed, false if unsigned. |
is_integer | true if integer, false otherwise. |
is_complex | :c true if complex, false otherwise. |
if | no pixel type was identified or the parameters are invalid. |
References bytesPerPixel(), ome::xml::model::enums::PixelType::COMPLEX, ome::xml::model::enums::PixelType::DOUBLE, ome::xml::model::enums::PixelType::DOUBLECOMPLEX, ome::xml::model::enums::PixelType::FLOAT, ome::xml::model::enums::PixelType::INT16, ome::xml::model::enums::PixelType::INT32, ome::xml::model::enums::PixelType::INT8, ome::xml::model::enums::PixelType::UINT16, ome::xml::model::enums::PixelType::UINT32, and ome::xml::model::enums::PixelType::UINT8.
Referenced by pixelTypeFromBits().
void ome::bioformats::removeBinData | ( | ::ome::xml::meta::OMEXMLMetadata & | omexml | ) |
Remove all BinData elements from OME-XML metadata.
omexml | the OME-XML metadata store. |
References ome::xml::meta::OMEXMLMetadata::getRoot(), and ome::xml::meta::OMEXMLMetadata::resolveReferences().
Referenced by ome::bioformats::out::OMETIFFWriter::close(), and ome::bioformats::in::OMETIFFReader::getMetadataStoreForDisplay().
void ome::bioformats::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.
omexml | the OME-XML metadata store. |
image | the image index. |
sizeC | the number of channels to retain. |
References ome::xml::meta::OMEXMLMetadata::getRoot(), and ome::xml::meta::OMEXMLMetadata::resolveReferences().
Referenced by ome::bioformats::in::OMETIFFReader::cleanMetadata().
std::string ome::bioformats::sanitizeXML | ( | const std::string & | s | ) |
Filter control codes and invalid sequences in an XML string.
Remove all control codes except for LF, HT and CR. Also replace &#
with #
.
s | the string to filter. |
void ome::bioformats::setDefaultCreationDate | ( | ::ome::xml::meta::MetadataStore & | store, |
dimension_size_type | series, | ||
const boost::filesystem::path & | id | ||
) |
Set the creation data for a series.
If the specified file exists, the modification time of this file will be used as the creation date. If it does not exist, the current system time will be used as a fallback.
This function will do nothing unless defaultCreationDateEnabled(bool) is enabled.
store | the OME-XML metadata store. |
series | the series for which to set the creation date. |
id | the filename for the series. |
References defaultCreationDateEnabled(), and ome::xml::meta::MetadataStore::setImageAcquisitionDate().
Referenced by fillMetadata().
pixel_size_type ome::bioformats::significantBitsPerPixel | ( | ::ome::xml::model::enums::PixelType | pixeltype | ) |
Get the significant (maximum bits used) size of a PixelType, in bits.
pixeltype | the PixelType to query. |
Referenced by ome::bioformats::tiff::getCoreMetadata(), ome::bioformats::tiff::IFD::setBitsPerSample(), and significantPixelSize().
storage_size_type ome::bioformats::significantPixelSize | ( | const ::ome::xml::meta::MetadataRetrieve & | meta, |
dimension_size_type | series | ||
) |
Get the total significant size of pixel data in a series.
The significant size for the pixel type (in bits) is multiplied by the dimension sizes before converting to bytes.
meta | the metadata to use. |
series | the image series to use. |
References significantBitsPerPixel().
Referenced by ome::bioformats::out::MinimalTIFFWriter::setId(), and ome::bioformats::out::OMETIFFWriter::setId().
storage_size_type ome::bioformats::significantPixelSize | ( | const ::ome::xml::meta::MetadataRetrieve & | meta | ) |
Get the total significant size of pixel data for all series.
The significant size for the pixel type (in bits) is multiplied by the dimension sizes before converting to bytes.
meta | the metadata to use. |
References pixelSize().
std::string ome::bioformats::transformToLatestModelVersion | ( | const std::string & | document | ) |
Transform an OME-XML document to the latest model version.
document | the OME-XML document. |
bool ome::bioformats::validateModel | ( | ::ome::xml::meta::Metadata & | meta, |
bool | correct | ||
) |
Validate a metadata store.
Note that unlike validateOMEXML(const std::string&) this does not perform XML validation. It will look for missing or inconsistent metadata and (if specified) attempt to correct the metadata to make it valid.
meta | the metadata store. |
correct | true to attempt correction, false to leave unmodified. |
true
if valid, false
if invalid. FormatException | if correction of invalid metadata fails. |
References ome::xml::meta::MetadataRetrieve::getChannelCount(), ome::xml::meta::MetadataRetrieve::getChannelSamplesPerPixel(), ome::xml::meta::MetadataRetrieve::getImageCount(), ome::xml::meta::MetadataRetrieve::getPixelsSizeC(), ome::xml::meta::MetadataRetrieve::getPixelsSizeT(), ome::xml::meta::MetadataRetrieve::getPixelsSizeX(), ome::xml::meta::MetadataRetrieve::getPixelsSizeY(), ome::xml::meta::MetadataRetrieve::getPixelsSizeZ(), ome::xml::meta::MetadataStore::setChannelSamplesPerPixel(), and ome::xml::meta::MetadataStore::setPixelsSizeC().
Referenced by ome::bioformats::out::OMETIFFWriter::setId().
bool ome::bioformats::validateOMEXML | ( | const std::string & | document | ) |
Validate an OME-XML document.
document | the XML document source. |
true
if valid, false
if invalid. References validateXML().
Referenced by getOMEXML().
bool ome::bioformats::validateXML | ( | const std::string & | s, |
const std::string & | loc = "XML" |
||
) |
Validate XML in an XML string.
s | the string to validate. |
loc | the file location or other descriptive text for the string; used for error reporting only. |
true
if valid, false
if invalid. References ome::xml::createDocument().
Referenced by validateOMEXML().
void ome::bioformats::verifyMinimum | ( | ::ome::xml::meta::MetadataRetrieve & | retrieve, |
dimension_size_type | series = 0U |
||
) |
Verify correctness of minimal amount of metadata in a series.
retrieve | the OME-XML metadata store. |
series | the image series to verify. |
FormatException | if any metadata is missing. |
References ome::xml::meta::MetadataRetrieve::getChannelCount(), ome::xml::meta::MetadataRetrieve::getChannelID(), ome::xml::meta::MetadataRetrieve::getImageID(), ome::xml::meta::MetadataRetrieve::getPixelsID(), and ome::xml::meta::MetadataStore::getRoot().
Referenced by ome::bioformats::in::OMETIFFReader::isFilenameThisTypeImpl().