ome-files 0.2.2

Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Member Functions | List of all members
ome::files::tiff::ImageJMetadata Struct Reference

ImageJ metadata from IFD tags. More...

`#include <ome/files/tiff/ImageJMetadata.h>`

Collaboration diagram for ome::files::tiff::ImageJMetadata:
[legend]

## Public Member Functions
| ImageJMetadata (const IFD &ifd)
| Construct from an IFD. More...

## Static Public Member Functions
static std::map< std::string, std::string > | parse_imagedescription (const std::string &description)
| Parse the TIFF ImageDescription field content. More...

## Public Attributes
std::map< std::string, std::string > | map
| Map of key-value pairs from ImageDescription field.
std::vector< uint32_t > | counts
| Content of ImageJMetaDataByteCounts field.
std::vector< uint8_t > | data
| Content of ImageJMetaData field.
dimension_size_type | images
| Total number of images.
dimension_size_type | slices
| Slice count.
dimension_size_type | frames
| Frame count.
dimension_size_type | channels
| Channel count.
std::string | unit
| Length unit name.
double | spacing
| Z spacing distance.
double | finterval
| Frame interval time.
dimension_size_type | xorigin
| X origin.
dimension_size_type | yorigin
| Y origin.
std::string | mode
| Color mode.
bool | loop
| Loop animation(?).

## Protected Member Functions
template<typename T >
void | parse_value (const std::string &key, T &value)
| Parse a key's value into a given type. More...
void | parse_value (const std::string &key, bool &value)
| Parse a key's value into a bool. More...
void | parse_value (const std::string &key, std::string &value)
| Parse a key's value into a string. More...

## Static Protected Member Functions
static void | parse_value_error (const std::string &key, const std::string &value)
| Throw an exception on failing to parse a particular key value. More...

## Detailed Description

ImageJ metadata from IFD tags.

## Constructor & Destructor Documentation

## § ImageJMetadata()

ome::files::tiff::ImageJMetadata::ImageJMetadata | ( | const IFD & | ifd | ) |

Construct from an IFD.

Parameters

  ifd | the IFD to parse the metadata from.

Exceptions

  an | exception on parse errors.

References channels, counts, data, finterval, frames, ome::files::tiff::IFD::getField(), ome::files::tiff::IMAGEDESCRIPTION, ome::files::tiff::IMAGEJ_META_DATA, ome::files::tiff::IMAGEJ_META_DATA_BYTE_COUNTS, images, loop, map, mode, parse_imagedescription(), parse_value(), slices, spacing, unit, xorigin, and yorigin.

## Member Function Documentation

## § parse_imagedescription()

std::map< std::string, std::string > ome::files::tiff::ImageJMetadata::parse_imagedescription | ( | const std::string & | description | ) |
| static

Parse the TIFF ImageDescription field content.

Split into separate lines, then split on the first `=` symbol into key-value pairs.

Parameters

  description | the TIFF ImageDescription field content.

Returns
  a map of all the key-value pairs.

Referenced by ImageJMetadata(), and ome::files::in::TIFFReader::readIFDs().

Here is the caller graph for this function:

## § parse_value() [1/3]

template<typename T >

void ome::files::tiff::ImageJMetadata::parse_value | ( | const std::string & | key,
|  | T & | value
| ) |  |
| inlineprotected

Parse a key's value into a given type.

The string value of the given key will be parsed into the corresponding value type.

Parameters

  key | the key name.
  value | the value to store the key's parsed string value.

Exceptions

  std::runtime_error | on parse errors.

References parse_value_error().

Referenced by ImageJMetadata().

Here is the caller graph for this function:

## § parse_value() [2/3]

void ome::files::tiff::ImageJMetadata::parse_value | ( | const std::string & | key,
|  | bool & | value
| ) |  |
| protected

Parse a key's value into a bool.

The string value of the given key will be parsed into a bool type.

Parameters

  key | the key name.
  value | the value to store the key's parsed string value.

Exceptions

  std::runtime_error | on parse errors.

References map, and parse_value_error().

## § parse_value() [3/3]

void ome::files::tiff::ImageJMetadata::parse_value | ( | const std::string & | key,
|  | std::string & | value
| ) |  |
| protected

Parse a key's value into a string.

The string value of the given key will be parsed into a string type.

Parameters

  key | the key name.
  value | the value to store the key's parsed string value.

Exceptions

  std::runtime_error | on parse errors.

References map.

## § parse_value_error()

void ome::files::tiff::ImageJMetadata::parse_value_error | ( | const std::string & | key,
|  | const std::string & | value
| ) |  |
| staticprotected

Throw an exception on failing to parse a particular key value.

Parameters

  key | the key name.
  value | the value which failed to parse.

Exceptions

  std::runtime_error. |

Referenced by parse_value().

Here is the caller graph for this function:

The documentation for this struct was generated from the following files:

- ome/files/tiff/ImageJMetadata.h
- ome/files/tiff/ImageJMetadata.cpp