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

ImageJ metadata from IFD tags. More...

#include <ome/bioformats/tiff/ImageJMetadata.h>

+ Collaboration diagram for ome::bioformats::tiff::ImageJMetadata:

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

ome::bioformats::tiff::ImageJMetadata::ImageJMetadata ( const IFD ifd)

Member Function Documentation

std::map< std::string, std::string > ome::bioformats::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
descriptionthe TIFF ImageDescription field content.
Returns
a map of all the key-value pairs.

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

+ Here is the caller graph for this function:

template<typename T >
void ome::bioformats::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
keythe key name.
valuethe value to store the key's parsed string value.
Exceptions
std::runtime_erroron parse errors.

References parse_value_error().

Referenced by ImageJMetadata().

+ Here is the caller graph for this function:

void ome::bioformats::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
keythe key name.
valuethe value to store the key's parsed string value.
Exceptions
std::runtime_erroron parse errors.

References map, and parse_value_error().

void ome::bioformats::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
keythe key name.
valuethe value to store the key's parsed string value.
Exceptions
std::runtime_erroron parse errors.

References map.

void ome::bioformats::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
keythe key name.
valuethe 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: