ome-files 0.2.2

Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
ome::files Namespace Reference

OME-Files 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::COMPLEXDOUBLE >
| Properties of COMPLEXDOUBLE pixels. More...
struct | PixelProperties< ::ome::xml::model::enums::PixelType::COMPLEXFLOAT >
| Properties of COMPLEXFLOAT pixels. More...
struct | PixelProperties< ::ome::xml::model::enums::PixelType::DOUBLE >
| Properties of DOUBLE 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 | removeTiffData (::ome::xml::meta::OMEXMLMetadata &omexml)
| Remove all TiffData 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...
void | register_module_paths ()
| Register the OME-Files module paths with OME-Common. 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 &region)
| Output PlaneRegion 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...
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...

## Variables
const Version | release_version (OME_FILES_VERSION_MAJOR, OME_FILES_VERSION_MINOR, OME_FILES_VERSION_PATCH, OME_FILES_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.

## Detailed Description

OME-Files image reading and writing.

## Enumeration Type Documentation

## § Dimensions

enum ome::files::Dimensions

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.

Enumerator
DIM_SPATIAL_X | Spatial x dimension (X).
DIM_SPATIAL_Y | Spatial y dimension (Y).
DIM_SPATIAL_Z | Spatial z dimension (Z).
DIM_TEMPORAL_T | Temporal t dimension (T).
DIM_CHANNEL | Logical channel (typically detectors of specific wavelengths) (C).
DIM_SUBCHANNEL | Logical sub-channel (typically used for RGB channel sub-components) (S).
DIM_MODULO_Z | Logical subdivision of the spatial z dimension (z).
DIM_MODULO_T | Logical subdivision of the temporal t dimension (t).
DIM_MODULO_C | Logical subdivision of the logical channel dimension (c).

## § Domain

enum ome::files::Domain

Imaging domain.

Enumerator
UNKNOWN_DOMAIN | Unknown.
HCS_DOMAIN | High-Content Screening (HCS)
LM_DOMAIN | Light Microscopy (LM)
EM_DOMAIN | Electron Microscopy (EM)
SPM_DOMAIN | Scanning Probe Microscopy (SPM)
SEM_DOMAIN | Scanning Electron Microscopy (SEM)
FLIM_DOMAIN | Fluorescence-Lifetime Imaging (FLIM)
MEDICAL_DOMAIN | Medical Imaging.
HISTOLOGY_DOMAIN | Histology.
GEL_DOMAIN | Gel/Blot Imaging.
ASTRONOMY_DOMAIN | Astronomy.
GRAPHICS_DOMAIN | Graphics.

## § EndianType

enum ome::files::EndianType

Endianness.

Enumerator
ENDIAN_BIG | Big endian.
ENDIAN_LITTLE | Little endian.
ENDIAN_NATIVE | Native endian.

## Function Documentation

## § addMetadataOnly()

void ome::files::addMetadataOnly | ( | ::ome::xml::meta::OMEXMLMetadata & | omexml,
|  | dimension_size_type | series,
|  | bool | resolve = `true`
| ) |  |

Add a MetadataOnly element to Pixels for the specified series.

Parameters

  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 addMetadataOnly(), ome::xml::meta::OMEXMLMetadata::getRoot(), and ome::xml::meta::OMEXMLMetadata::resolveReferences().

Referenced by addMetadataOnly(), and fillMetadata().

Here is the caller graph for this function:

## § bitsPerPixel()

pixel_size_type ome::files::bitsPerPixel | ( | ::ome::xml::model::enums::PixelType | pixeltype | ) |

Get the size of a PixelType, in bits.

Parameters

  pixeltype | the PixelType to query.

Returns
  the size, in bits

Referenced by ome::files::detail::FormatReader::getBitsPerPixel(), ome::files::tiff::getCoreMetadata(), ome::files::in::OMETIFFReader::initFile(), ome::files::out::MinimalTIFFWriter::setupIFD(), and ome::files::out::OMETIFFWriter::setupIFD().

Here is the caller graph for this function:

## § bytesPerPixel()

pixel_size_type ome::files::bytesPerPixel | ( | ::ome::xml::model::enums::PixelType | pixeltype | ) |

Get the size of a PixelType, in bytes.

Parameters

  pixeltype | the PixelType to query.

Returns
  the size, in bytes

Referenced by ome::files::detail::FormatReader::getOptimalTileHeight(), pixelSize(), pixelTypeFromBytes(), and ome::files::detail::FormatReader::readPlane().

Here is the caller graph for this function:

## § byteswap() [1/3]

template<typename T >

void ome::files::byteswap | ( | T & | value | ) |
| inline

Byteswap value to switch endianness.

Parameters

  value | the value to swap.

Referenced by ome::files::detail::FormatReader::readPlane().

Here is the caller graph for this function:

## § byteswap() [2/3]

template<>

void ome::files::byteswap | ( | std::complex< float > & | value | ) |
| inline

Byteswap value to switch endianness.

Parameters

  value | the value to swap.

## § byteswap() [3/3]

template<>

void ome::files::byteswap | ( | std::complex< double > & | value | ) |
| inline

Byteswap value to switch endianness.

Parameters

  value | the value to swap.

## § createDimensionOrder()

ome::xml::model::enums::DimensionOrder ome::files::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).

Parameters

  order | the string dimension order.

Returns
  the dimension order.

Exceptions

  std::logic_error | if the provided order is invalid.

References createDimensionOrder().

Referenced by createDimensionOrder().

Here is the caller graph for this function:

## § createID() [1/4]

std::string ome::files::createID | ( | std::string const & | type,
|  | dimension_size_type | idx
| ) |  |

Create an object identifier for a given object type and index.

Parameters

  type | the object type.
  idx | the object index.

Returns
  the identifier.

References createID().

Referenced by createID(), fillMetadata(), fillOriginalMetadata(), and fillPixels().

Here is the caller graph for this function:

## § createID() [2/4]

std::string ome::files::createID | ( | std::string const & | type,
|  | dimension_size_type | idx1,
|  | dimension_size_type | idx2
| ) |  |

Create an object identifier for a given object type and indices.

Parameters

  type | the object type.
  idx1 | the first object index.
  idx2 | the second object index.

Returns
  the identifier.

References createID().

## § createID() [3/4]

std::string ome::files::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.

Parameters

  type | the object type.
  idx1 | the first object index.
  idx2 | the second object index.
  idx3 | the third object index.

Returns
  the identifier.

References createID().

## § createID() [4/4]

std::string ome::files::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.

Parameters

  type | the object type.
  idx1 | the first object index.
  idx2 | the second object index.
  idx3 | the third object index.
  idx4 | the fourth object index.

Returns
  the identifier.

References createID().

## § createOMEXMLMetadata() [1/5]

ome::compat::shared_ptr<::ome::xml::meta::OMEXMLMetadata > ome::files::createOMEXMLMetadata | ( | ome::common::xml::dom::Document & | document | ) |

Create OME-XML metadata from DOM Document.

Parameters

  document | the XML document.

Returns
  the OME-XML metadata.

References createOMEXMLMetadata(), ome::common::xml::dom::ParseParameters::doSchema, ome::common::xml::dom::Document::getDocumentElement(), ome::common::xml::dom::ParseParameters::validationSchemaFullChecking, and ome::common::xml::dom::writeDocument().

Referenced by ome::files::in::OMETIFFReader::cacheMetadata(), createOMEXMLMetadata(), createOMEXMLRoot(), ome::files::in::OMETIFFReader::initFile(), and ome::files::in::OMETIFFReader::readMetadata().

Here is the caller graph for this function:

## § createOMEXMLMetadata() [2/5]

ome::compat::shared_ptr<::ome::xml::meta::OMEXMLMetadata > ome::files::createOMEXMLMetadata | ( | const boost::filesystem::path & | file | ) |

Create OME-XML metadata from XML file.

Parameters

  file | the XML file.

Returns
  the OME-XML metadata.

References createOMEXMLMetadata(), ome::common::xml::dom::ParseParameters::doSchema, and ome::common::xml::dom::ParseParameters::validationSchemaFullChecking.

## § createOMEXMLMetadata() [3/5]

ome::compat::shared_ptr<::ome::xml::meta::OMEXMLMetadata > ome::files::createOMEXMLMetadata | ( | const std::string & | text | ) |

Create OME-XML metadata from XML string.

Parameters

  text | the XML string.

Returns
  the OME-XML metadata.

References createOMEXMLMetadata(), ome::common::xml::dom::ParseParameters::doSchema, and ome::common::xml::dom::ParseParameters::validationSchemaFullChecking.

## § createOMEXMLMetadata() [4/5]

ome::compat::shared_ptr<::ome::xml::meta::OMEXMLMetadata > ome::files::createOMEXMLMetadata | ( | std::istream & | stream | ) |

Create OME-XML metadata from XML input stream.

Parameters

  stream | the XML input stream.

Returns
  the OME-XML metadata.

References createOMEXMLMetadata(), ome::common::xml::dom::ParseParameters::doSchema, and ome::common::xml::dom::ParseParameters::validationSchemaFullChecking.

## § createOMEXMLMetadata() [5/5]

ome::compat::shared_ptr<::ome::xml::meta::OMEXMLMetadata > ome::files::createOMEXMLMetadata | ( | const FormatReader & | reader,
|  | bool | doPlane = `false`,
|  | bool | doImageName = `true`
| ) |  |

Create OME-XML metadata from reader core metadata.

Parameters

  reader | the reader to use.
  doPlane | create Plane elements if `true`.
  doImageName | set image name if `true`.

Returns
  the OME-XML metadata.

References createOMEXMLMetadata(), and fillMetadata().

## § createOMEXMLRoot()

ome::compat::shared_ptr<::ome::xml::meta::MetadataRoot > ome::files::createOMEXMLRoot | ( | const std::string & | document | ) |

Create OME-XML metadata root from XML document.

Parameters

  document | the XML document source.

Returns
  the OME-XML metadata root.

Todo:
  Implement model transforms.

References createOMEXMLMetadata(), and createOMEXMLRoot().

Referenced by createOMEXMLRoot().

Here is the caller graph for this function:

## § defaultCreationDateEnabled() [1/2]

bool ome::files::defaultCreationDateEnabled | ( |  | ) |

Check if default creation date is enabled.

Returns
  `true` if enabled, `false` otherwise.

References defaultCreationDateEnabled().

Referenced by defaultCreationDateEnabled(), and setDefaultCreationDate().

Here is the caller graph for this function:

## § defaultCreationDateEnabled() [2/2]

void ome::files::defaultCreationDateEnabled | ( | bool | enabled | ) |

Enable or disable default creation date.

This setting enables or disables the replacement of missing creation dates.

See also
  setDefaultCreationDate().

Parameters

  enabled | `true` to enable, `false` to disable.

References defaultCreationDateEnabled().

## § escapeXML()

std::string ome::files::escapeXML | ( | const std::string & | s | ) |

Replace special characters with XML entities in an XML string.

Parameters

  s | the string to escape.

Returns
  the escaped string.

## § fillAllPixels()

void ome::files::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.

Parameters

  store | the OME-XML metadata store.
  reader | the reader to use.

References fillAllPixels(), fillPixels(), ome::files::FormatReader::getSeries(), ome::files::FormatReader::getSeriesCount(), and ome::files::FormatReader::setSeries().

Referenced by fillAllPixels().

Here is the caller graph for this function:

## § fillMetadata() [1/2]

void ome::files::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.

Parameters

  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(), fillMetadata(), fillPixels(), ome::files::FormatReader::getCurrentFile(), ome::files::FormatReader::getImageCount(), ome::xml::meta::OMEXMLMetadata::getPixelsBinDataCount(), ome::files::FormatReader::getPixelType(), ome::files::FormatReader::getSeries(), ome::files::FormatReader::getSeriesCount(), ome::xml::meta::OMEXMLMetadata::getTiffDataCount(), ome::files::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::files::FormatReader::setSeries().

Referenced by createOMEXMLMetadata(), fillMetadata(), ome::files::in::MinimalTIFFReader::initFile(), and ome::files::in::OMETIFFReader::initFile().

Here is the caller graph for this function:

## § fillMetadata() [2/2]

void ome::files::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.

Parameters

  store | the OME-XML metadata store.
  seriesList | the core metadata to use.
  doPlane | create Plane elements if `true`.

References addMetadataOnly(), createID(), fillMetadata(), fillPixels(), ome::xml::meta::OMEXMLMetadata::getPixelsBinDataCount(), ome::xml::meta::OMEXMLMetadata::getTiffDataCount(), getZCTCoords(), ome::xml::meta::MetadataStore::setImageID(), ome::xml::meta::MetadataStore::setPlaneTheC(), ome::xml::meta::MetadataStore::setPlaneTheT(), and ome::xml::meta::MetadataStore::setPlaneTheZ().

## § fillOriginalMetadata()

void ome::files::fillOriginalMetadata | ( | ::ome::xml::meta::OMEXMLMetadata & | omexml,
|  | const MetadataMap & | metadata
| ) |  |

Create OriginalMetadataAnnotations from MetadataMap.

Parameters

  omexml | the OME-XML metadata store.
  metadata | the original metadata.

References createID(), ome::files::MetadataMap::empty(), fillOriginalMetadata(), ome::files::MetadataMap::flatten(), ome::xml::meta::OMEXMLMetadata::getRoot(), ome::xml::meta::OMEXMLMetadata::getXMLAnnotationID(), and ome::xml::meta::OMEXMLMetadata::resolveReferences().

Referenced by fillOriginalMetadata(), and ome::files::detail::FormatReader::setId().

Here is the caller graph for this function:

## § fillPixels() [1/2]

void ome::files::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.

Parameters

  store | the OME-XML metadata store.
  reader | the reader to use.

References createID(), fillPixels(), ome::files::FormatReader::getBitsPerPixel(), ome::files::FormatReader::getDimensionOrder(), ome::files::FormatReader::getEffectiveSizeC(), ome::files::FormatReader::getPixelType(), ome::files::FormatReader::getRGBChannelCount(), ome::files::FormatReader::getSeries(), ome::files::FormatReader::getSizeC(), ome::files::FormatReader::getSizeT(), ome::files::FormatReader::getSizeX(), ome::files::FormatReader::getSizeY(), ome::files::FormatReader::getSizeZ(), ome::files::FormatReader::isInterleaved(), ome::files::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(), fillMetadata(), and fillPixels().

Here is the caller graph for this function:

## § fillPixels() [2/2]

void ome::files::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.

Parameters

  store | the OME-XML metadata store.
  seriesMetadata | the seriesMetadata the metadata to use.
  series | the series to set.

References ome::files::CoreMetadata::bitsPerPixel, createID(), ome::files::CoreMetadata::dimensionOrder, fillPixels(), ome::files::CoreMetadata::interleaved, ome::files::CoreMetadata::littleEndian, ome::files::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::files::CoreMetadata::sizeC, ome::files::CoreMetadata::sizeT, ome::files::CoreMetadata::sizeX, ome::files::CoreMetadata::sizeY, and ome::files::CoreMetadata::sizeZ.

## § getDomain()

const std::string & ome::files::getDomain | ( | Domain | domain | ) |

Get the string corresponding to a particular Domain.

Parameters

  domain | the Domain to use.

Returns
  the string description of the Domain.

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::files::in::MinimalTIFFReader::MinimalTIFFReader().

Here is the caller graph for this function:

## § getDomainCollection()

const std::vector< std::string > & ome::files::getDomainCollection | ( | DomainCollection | domains | ) |

Get the strings corresponding to a particular Domain collection.

Parameters

  domains | the Domain collection to use.

Returns
  the string descriptions of the Domain collection.

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::files::in::OMETIFFReader::getDomains(), and ome::files::in::OMETIFFReader::OMETIFFReader().

Here is the caller graph for this function:

## § getIndex() [1/2]

dimension_size_type ome::files::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).

Parameters

  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).

Returns
  the 1D index.

Referenced by ome::files::detail::FormatReader::getCoreMetadata(), ome::files::detail::FormatWriter::getIndex(), getIndex(), ome::files::detail::FormatReader::getIndex(), and ome::files::in::OMETIFFReader::initFile().

Here is the caller graph for this function:

## § getIndex() [2/2]

dimension_size_type ome::files::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).

Note
  The `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.

Parameters

  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).

Returns
  the 1D index.

References getIndex().

## § getModelVersion() [1/3]

std::string ome::files::getModelVersion | ( |  | ) |

Get the currently-supported OME Data Model version.

Returns
  the model version.

## § getModelVersion() [2/3]

std::string ome::files::getModelVersion | ( | ome::common::xml::dom::Document & | document | ) |

Get the model version used by an OME-XML document.

Parameters

  document | the OME-XML document.

Returns
  the model version.

References ome::common::xml::dom::Document::getDocumentElement().

## § getModelVersion() [3/3]

std::string ome::files::getModelVersion | ( | const std::string & | document | ) |

Get the model version used by an OME-XML document.

Parameters

  document | the OME-XML document.

Returns
  the model version.

## § getModulo()

Modulo ome::files::getModulo | ( | const ::ome::xml::meta::OMEXMLMetadata & | omexml,
|  | const std::string & | tag,
|  | dimension_size_type | image
| ) |  |

Get Modulo annotation from OME-XML metadata.

Parameters

  omexml | the OME-XML metadata store.
  tag | the Modulo annotation XML tag name.
  image | the image index.

Returns
  the Modulo annotation.

References ome::common::xml::dom::NodeList::begin(), ome::common::xml::dom::NodeList::empty(), ome::common::xml::dom::NodeList::end(), ome::common::xml::dom::Document::getElementsByTagName(), getModulo(), and ome::xml::meta::OMEXMLMetadata::getRoot().

Referenced by getModulo(), getModuloAlongC(), getModuloAlongT(), and getModuloAlongZ().

Here is the caller graph for this function:

## § getModuloAlongC()

Modulo ome::files::getModuloAlongC | ( | const ::ome::xml::meta::OMEXMLMetadata & | omexml,
|  | dimension_size_type | image
| ) |  |

Get ModuloAlongC annotation from OME-XML metadata.

Parameters

  omexml | the OME-XML metadata store.
  image | the image index.

Returns
  the Modulo annotation.

References getModulo(), and getModuloAlongC().

Referenced by getModuloAlongC(), and ome::files::in::OMETIFFReader::initFile().

Here is the caller graph for this function:

## § getModuloAlongT()

Modulo ome::files::getModuloAlongT | ( | const ::ome::xml::meta::OMEXMLMetadata & | omexml,
|  | dimension_size_type | image
| ) |  |

Get ModuloAlongT annotation from OME-XML metadata.

Parameters

  omexml | the OME-XML metadata store.
  image | the image index.

Returns
  the Modulo annotation.

References getModulo(), and getModuloAlongT().

Referenced by getModuloAlongT(), and ome::files::in::OMETIFFReader::initFile().

Here is the caller graph for this function:

## § getModuloAlongZ()

Modulo ome::files::getModuloAlongZ | ( | const ::ome::xml::meta::OMEXMLMetadata & | omexml,
|  | dimension_size_type | image
| ) |  |

Get ModuloAlongZ annotation from OME-XML metadata.

Parameters

  omexml | the OME-XML metadata store.
  image | the image index.

Returns
  the Modulo annotation.

References getModulo(), and getModuloAlongZ().

Referenced by getModuloAlongZ(), and ome::files::in::OMETIFFReader::initFile().

Here is the caller graph for this function:

## § getOMEXML()

std::string ome::files::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.

Parameters

  omexml | the OME-XML metadata store.
  validate | `true` to validate the OME-XML, `false` to skip validation.

Returns
  the OME-XML metadata as an XML document string.

References ome::xml::meta::OMEXMLMetadata::dumpXML(), getOMEXML(), and validateOMEXML().

Referenced by ome::files::out::OMETIFFWriter::getOMEXML(), and getOMEXML().

Here is the caller graph for this function:

## § getOMEXMLMetadata()

ome::compat::shared_ptr<::ome::xml::meta::OMEXMLMetadata > ome::files::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.

Parameters

  retrieve | the metadata to use.

Returns
  the OME-XML metadata.

References getOMEXMLMetadata().

Referenced by getOMEXMLMetadata().

Here is the caller graph for this function:

## § getOriginalMetadata()

MetadataMap ome::files::getOriginalMetadata | ( | ::ome::xml::meta::OMEXMLMetadata & | omexml | ) |

Get original metadata from OME-XML metadata StructuredAnnotations.

Parameters

  omexml | the OME-XML metadata store.

Returns
  a map of the original metadata annotations.

Todo:
  log error

References ome::xml::model::detail::OMEModelObject::getChildrenByTagName(), ome::common::xml::dom::Document::getDocumentElement(), getOriginalMetadata(), ome::xml::meta::OMEXMLMetadata::getRoot(), ome::files::MetadataMap::set(), and ome::common::xml::dom::ParseParameters::validationScheme.

Referenced by getOriginalMetadata(), and ome::files::in::OMETIFFReader::initFile().

Here is the caller graph for this function:

## § getZCTCoords() [1/2]

ome::compat::array< dimension_size_type, 3 > ome::files::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.

Parameters

  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.

Returns
  an array containing the ZCT coordinates (real sizes, in that order).

Referenced by ome::files::out::OMETIFFWriter::fillMetadata(), fillMetadata(), ome::files::detail::FormatReader::getCoreMetadata(), ome::files::detail::FormatWriter::getZCTCoords(), getZCTCoords(), ome::files::detail::FormatReader::getZCTCoords(), and ome::files::detail::FormatReader::getZCTModuloCoords().

Here is the caller graph for this function:

## § getZCTCoords() [2/2]

ome::compat::array< dimension_size_type, 6 > ome::files::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.

Note
  The `Z`, `C` and `T` coordinates are not the same as those returned by ome::files::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.

Parameters

  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.

Returns
  an array containing the ZCTmZmCmT coordinates (effective sizes, in that order).

References getZCTCoords().

## § isComplex()

bool ome::files::isComplex | ( | ::ome::xml::model::enums::PixelType | pixeltype | ) |

Check whether a PixelType is complex.

Parameters

  pixeltype | the PixelType to query.

Returns
  `true` if complex, `false` otherwise.

## § isFloatingPoint()

bool ome::files::isFloatingPoint | ( | ::ome::xml::model::enums::PixelType | pixeltype | ) |

Check whether a PixelType is floating point.

Parameters

  pixeltype | the PixelType to query.

Note
  Equivalent to `!isInteger`().

Returns
  `true` if floating point, `false` otherwise.

References isInteger().

## § isInteger()

bool ome::files::isInteger | ( | ::ome::xml::model::enums::PixelType | pixeltype | ) |

Check whether a PixelType is integer.

Parameters

  pixeltype | the PixelType to query.

Returns
  `true` if integer, `false` otherwise.

Referenced by isFloatingPoint().

Here is the caller graph for this function:

## § isSigned()

bool ome::files::isSigned | ( | ::ome::xml::model::enums::PixelType | pixeltype | ) |

Check whether a PixelType is signed.

Parameters

  pixeltype | the PixelType to query.

Returns
  `true` if signed, `false` otherwise.

## § MetadataMap::get< MetadataMap::value_type >() [1/2]

template<>

MetadataMap::value_type& ome::files::MetadataMap::get< MetadataMap::value_type > | ( | const key_type & | key | ) |
| 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.

Parameters

  key | the key to find.

Returns
  a reference to the stored value.

Exceptions

  boost::bad_get | on failure if the key was not found or if the type did not match the stored value type.

References ome::files::MetadataMap::discriminating_map.

## § MetadataMap::get< MetadataMap::value_type >() [2/2]

template<>

const MetadataMap::value_type& ome::files::MetadataMap::get< MetadataMap::value_type > | ( | const key_type & | key | ) | const
| 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.

Parameters

  key | the key to find.

Returns
  a reference to the stored value.

Exceptions

  boost::bad_get | on failure if the key was not found or if the type did not match the stored value type.

References ome::files::MetadataMap::discriminating_map.

## § operator &()

PlaneRegion ome::files::operator& | ( | const PlaneRegion & | a,
|  | const PlaneRegion & | b
| ) |  |
| inline

Intersect two regions.

If the regions do not intersect, a default-constructed region of zero size will be returned.

Parameters

  a | the first region.
  b | the second region.

Returns
  the intersection of the two regions.

References ome::files::PlaneRegion::h, ome::files::PlaneRegion::PlaneRegion(), ome::files::PlaneRegion::w, ome::files::PlaneRegion::x, and ome::files::PlaneRegion::y.

## § operator<<() [1/5]

template<class charT , class traits >

std::basic_ostream<charT,traits>& ome::files::operator<< | ( | std::basic_ostream< charT, traits > & | os,
|  | const Version & | version
| ) |  |
| inline

Output Version to output stream.

Parameters

  os | the output stream.
  version | the Version to output.

Returns
  the output stream.

References ome::files::Version::major.

## § operator<<() [2/5]

template<class charT , class traits >

std::basic_ostream<charT,traits>& ome::files::operator<< | ( | std::basic_ostream< charT, traits > & | os,
|  | const Modulo & | modulo
| ) |  |
| inline

Output Modulo to output stream.

Parameters

  os | the output stream.
  modulo | the Modulo to output.

Returns
  the output stream.

References ome::files::Modulo::parentDimension.

## § operator<<() [3/5]

template<class charT , class traits >

std::basic_ostream<charT,traits>& ome::files::operator<< | ( | std::basic_ostream< charT, traits > & | os,
|  | const FileInfo & | info
| ) |  |
| inline

Output FileInfo to output stream.

Parameters

  os | the output stream.
  info | the FileInfo to output.

Returns
  the output stream.

References ome::files::FileInfo::filename.

## § operator<<() [4/5]

template<class charT , class traits >

std::basic_ostream<charT,traits>& ome::files::operator<< | ( | std::basic_ostream< charT, traits > & | os,
|  | const CoreMetadata & | core
| ) |  |
| inline

Output CoreMetadata to output stream.

Parameters

  os | the output stream.
  core | the CoreMetadata to output.

Returns
  the output stream.

References ome::files::CoreMetadata::sizeX.

## § operator<<() [5/5]

template<class charT , class traits >

std::basic_ostream<charT,traits>& ome::files::operator<< | ( | std::basic_ostream< charT, traits > & | os,
|  | const PlaneRegion & | region
| ) |  |
| inline

Output PlaneRegion to output stream.

Parameters

  os | the output stream.
  region | the PlaneRegion to output.

Returns
  the output stream.

References ome::files::PlaneRegion::x.

## § operator|()

PlaneRegion ome::files::operator| | ( | const PlaneRegion & | a,
|  | const PlaneRegion & | b
| ) |  |
| 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.

Parameters

  a | the first region.
  b | the second region.

Returns
  the union of the two regions.

References ome::files::PlaneRegion::h, ome::files::PlaneRegion::PlaneRegion(), ome::files::PlaneRegion::w, ome::files::PlaneRegion::x, and ome::files::PlaneRegion::y.

## § pixelSize() [1/2]

storage_size_type ome::files::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.

Parameters

  meta | the metadata to use.
  series | the image series to use.

Returns
  the size (in bytes).

References bytesPerPixel(), and pixelSize().

Referenced by pixelSize(), ome::files::out::MinimalTIFFWriter::setId(), ome::files::out::OMETIFFWriter::setId(), and significantPixelSize().

Here is the caller graph for this function:

## § pixelSize() [2/2]

storage_size_type ome::files::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.

Parameters

  meta | the metadata to use.

Returns
  the size (in bytes).

References pixelSize().

## § pixelTypeFromBits()

ome::xml::model::enums::PixelType ome::files::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.

Parameters

  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.

Returns
  the corresponding pixel type.

Exceptions

  if | no pixel type was identified or the parameters are invalid.

References pixelTypeFromBytes().

## § pixelTypeFromBytes()

ome::xml::model::enums::PixelType ome::files::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.

Parameters

  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.

Returns
  the corresponding pixel type.

Exceptions

  if | no pixel type was identified or the parameters are invalid.

References bytesPerPixel(), ome::xml::model::enums::PixelType::COMPLEXDOUBLE, ome::xml::model::enums::PixelType::COMPLEXFLOAT, ome::xml::model::enums::PixelType::DOUBLE, 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().

Here is the caller graph for this function:

## § register_module_paths()

void ome::files::register_module_paths | ( |  | ) |

Register the OME-Files module paths with OME-Common.

This function forces path registration.

Note
  This is a hack to allow static linking to work on Windows; without this, the module object is omitted and the paths aren't automatically registered. This will no longer be required once it is built as a DLL. Its only purpose is to force object inclusion when static linking, and ensure that the registration happens independently of object static construction order to allow use prior to main() entry. You should not use this.

References register_module_paths(), and ome::common::register_module_paths().

## § removeBinData()

void ome::files::removeBinData | ( | ::ome::xml::meta::OMEXMLMetadata & | omexml | ) |

Remove all BinData elements from OME-XML metadata.

Parameters

  omexml | the OME-XML metadata store.

References ome::xml::meta::OMEXMLMetadata::getRoot(), removeBinData(), and ome::xml::meta::OMEXMLMetadata::resolveReferences().

Referenced by ome::files::out::OMETIFFWriter::close(), and removeBinData().

Here is the caller graph for this function:

## § removeChannels()

void ome::files::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.

Parameters

  omexml | the OME-XML metadata store.
  image | the image index.
  sizeC | the number of channels to retain.

References ome::xml::meta::OMEXMLMetadata::getRoot(), removeChannels(), and ome::xml::meta::OMEXMLMetadata::resolveReferences().

Referenced by ome::files::in::OMETIFFReader::cleanMetadata(), and removeChannels().

Here is the caller graph for this function:

## § removeTiffData()

void ome::files::removeTiffData | ( | ::ome::xml::meta::OMEXMLMetadata & | omexml | ) |

Remove all TiffData elements from OME-XML metadata.

Parameters

  omexml | the OME-XML metadata store.

References ome::xml::meta::OMEXMLMetadata::getRoot(), removeTiffData(), and ome::xml::meta::OMEXMLMetadata::resolveReferences().

Referenced by ome::files::out::OMETIFFWriter::close(), and removeTiffData().

Here is the caller graph for this function:

## § sanitizeXML()

std::string ome::files::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 `#`.

Parameters

  s | the string to filter.

Returns
  the filtered string.

## § setDefaultCreationDate()

void ome::files::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.

Parameters

  store | the OME-XML metadata store.
  series | the series for which to set the creation date.
  id | the filename for the series.

References defaultCreationDateEnabled(), setDefaultCreationDate(), and ome::xml::meta::MetadataStore::setImageAcquisitionDate().

Referenced by fillMetadata(), and setDefaultCreationDate().

Here is the caller graph for this function:

## § significantBitsPerPixel()

pixel_size_type ome::files::significantBitsPerPixel | ( | ::ome::xml::model::enums::PixelType | pixeltype | ) |

Get the significant (maximum bits used) size of a PixelType, in bits.

Parameters

  pixeltype | the PixelType to query.

Returns
  the size, in bits

Referenced by ome::files::tiff::getCoreMetadata(), ome::files::tiff::IFD::setBitsPerSample(), and significantPixelSize().

Here is the caller graph for this function:

## § significantPixelSize() [1/2]

storage_size_type ome::files::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.

Parameters

  meta | the metadata to use.
  series | the image series to use.

Returns
  the size (in bytes).

References significantBitsPerPixel(), and significantPixelSize().

Referenced by ome::files::out::MinimalTIFFWriter::setId(), ome::files::out::OMETIFFWriter::setId(), and significantPixelSize().

Here is the caller graph for this function:

## § significantPixelSize() [2/2]

storage_size_type ome::files::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.

Parameters

  meta | the metadata to use.

Returns
  the size (in bytes).

References pixelSize(), and significantPixelSize().

## § transformToLatestModelVersion()

std::string ome::files::transformToLatestModelVersion | ( | const std::string & | document | ) |

Transform an OME-XML document to the latest model version.

Parameters

  document | the OME-XML document.

Returns
  the transformed OME-XML document.

References transformToLatestModelVersion().

Referenced by transformToLatestModelVersion().

Here is the caller graph for this function:

## § validateModel()

bool ome::files::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.

Parameters

  meta | the metadata store.
  correct | `true` to attempt correction, `false` to leave unmodified.

Returns
  `true` if valid, `false` if invalid.

Exceptions

  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(), ome::xml::meta::MetadataStore::setPixelsSizeC(), and validateModel().

Referenced by ome::files::out::OMETIFFWriter::setId(), and validateModel().

Here is the caller graph for this function:

## § validateOMEXML()

bool ome::files::validateOMEXML | ( | const std::string & | document | ) |

Validate an OME-XML document.

Parameters

  document | the XML document source.

Returns
  `true` if valid, `false` if invalid.

References validateOMEXML(), and validateXML().

Referenced by getOMEXML(), and validateOMEXML().

Here is the caller graph for this function:

## § validateXML()

bool ome::files::validateXML | ( | const std::string & | s,
|  | const std::string & | loc = `"XML"`
| ) |  |

Validate XML in an XML string.

Parameters

  s | the string to validate.
  loc | the file location or other descriptive text for the string; used for error reporting only.

Returns
  `true` if valid, `false` if invalid.

Referenced by validateOMEXML().

Here is the caller graph for this function:

## § verifyMinimum()

void ome::files::verifyMinimum | ( | ::ome::xml::meta::MetadataRetrieve & | retrieve,
|  | dimension_size_type | series = `0U`
| ) |  |

Verify correctness of minimal amount of metadata in a series.

Parameters

  retrieve | the OME-XML metadata store.
  series | the image series to verify.

Exceptions

  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(), ome::xml::meta::MetadataStore::getRoot(), and verifyMinimum().

Referenced by ome::files::in::OMETIFFReader::isFilenameThisTypeImpl(), and verifyMinimum().

Here is the caller graph for this function: