C2DImage Class Referenceabstract
Basic data strctures and functions

This is the base class for 2D images that can hold generic pixel data. More...

`#include <mia/2d/image.hh>`

Inheritance diagram for C2DImage:
[legend]
Collaboration diagram for C2DImage:
[legend]

## Public Types

typedef C2DBounds | dimsize_type
| a definition of the image dimension type for
typedef std::shared_ptr< C2DImage > | Pointer
| 2D Image pointer type

## Public Member Functions

virtual C2DImage * | clone () const __attribute__((warn_unused_result))=0
virtual std::pair< double, double > | get_minmax_intensity () const =0
C2DFVector | get_origin () const
C2DFVector | get_pixel_size () const
EPixelType | get_pixel_type () const
const C2DBounds & | get_size () const
virtual void | make_single_ref () __attribute__((deprecated))=0
void | set_origin (const C2DFVector &origin)
void | set_pixel_size (const C2DFVector &pixel)
virtual | ~C2DImage ()
| CAttributedData ()
| CAttributedData (const CAttributedData &org)
| CAttributedData (PAttributeMap attr)
CAttributedData & | operator= (const CAttributedData &org)
| Assignemt operator.
const PAttribute | get_attribute (const std::string &key) const
CAttributeMap::const_iterator | begin_attributes () const
CAttributeMap::const_iterator | end_attributes () const
void | set_attribute (const std::string &key, PAttribute attr)
void | set_attributes (CAttributeMap::const_iterator begin, CAttributeMap::const_iterator end)
void | set_attribute (const std::string &key, const std::string &value)
template<typename T>
void | set_attribute (const std::string &key, const T &value)
void | set_attribute (const std::string &key, const char *value)
const std::string | get_attribute_as_string (const std::string &key) const
| returns the requested attribute as string, returns an empty string if attribute doesn't exist
template<typename T>
const T | get_attribute_as (const std::string &key) const
template<typename T>
const T | get_attribute_as (const std::string &key, T default_value) const
void | delete_attribute (const std::string &key)
bool | has_attribute (const std::string &key) const
void | print (std::ostream &os) const

## Static Public Attributes

static const char * | data_descr

## Protected Member Functions

| C2DImage ()
| C2DImage (C2DImage &&other)
| C2DImage (const C2DBounds &size, EPixelType type)
| C2DImage (const C2DImage &other)=default
| C2DImage (const CAttributedData &attributes, const C2DBounds &size, EPixelType type)
C2DImage & | operator= (C2DImage &&other)
C2DImage & | operator= (const C2DImage &other)=default

## Detailed Description

This is the base class for 2D images that can hold generic pixel data.

This class is the abstract base class for 2D images that can be passed around without the program knowing, what actual pixel type an image holds. It provides access to the image size and the pixel type, and it also is a container for generic attributes.

Definition at line 47 of file 2d/image.hh.

## Member Typedef Documentation

## dimsize_type

typedef C2DBounds C2DImage::dimsize_type

a definition of the image dimension type for

Definition at line 55 of file 2d/image.hh.

## Pointer

typedef std::shared_ptr<C2DImage > C2DImage::Pointer

2D Image pointer type

Definition at line 58 of file 2d/image.hh.

## Constructor & Destructor Documentation

## ~C2DImage()

virtual C2DImage::~C2DImage | ( |  | ) |

virtual

## C2DImage() [1/5]

C2DImage::C2DImage | ( | C2DImage && | other | ) |

protected

References C2DImage().

Referenced by C2DImage(), C2DImage(), C2DImage(), C2DImage(), C2DImage(), clone(), T2DImage< bool >::clone(), operator=(), and operator=().

## C2DImage() [2/5]

C2DImage::C2DImage | ( | const C2DImage & | other | ) |

protected default

References C2DImage().

## C2DImage() [3/5]

C2DImage::C2DImage | ( | const C2DBounds & | size,
|  | EPixelType | type )

protected

Constructor initializes the size and the pixel type

References C2DImage().

## C2DImage() [4/5]

C2DImage::C2DImage | ( | const CAttributedData & | attributes,
|  | const C2DBounds & | size,
|  | EPixelType | type )

protected

Constructor initializes from the attributes, the size and the pixel type

References C2DImage(), and CAttributedData::CAttributedData().

## C2DImage() [5/5]

C2DImage::C2DImage | ( |  | ) |

protected

standard constructor initializes the size to (0,0), and the pixel type to "unknown"

References C2DImage().

## Member Function Documentation

## clone()

virtual C2DImage * C2DImage::clone | ( |  | ) | const

pure virtual

returns a copy of this image Abstract method

Implemented in T2DImage< T >, T2DImage< bool >, T2DImage< double >, T2DImage< float >, T2DImage< int16_t >, T2DImage< int32_t >, T2DImage< int64_t >, T2DImage< int8_t >, T2DImage< uint16_t >, T2DImage< uint32_t >, T2DImage< uint64_t >, and T2DImage< uint8_t >.

References C2DImage().

## get_minmax_intensity()

virtual std::pair< double, double > C2DImage::get_minmax_intensity | ( |  | ) | const

pure virtual

Implemented in T2DImage< T >, T2DImage< bool >, T2DImage< double >, T2DImage< float >, T2DImage< int16_t >, T2DImage< int32_t >, T2DImage< int64_t >, T2DImage< int8_t >, T2DImage< uint16_t >, T2DImage< uint32_t >, T2DImage< uint64_t >, and T2DImage< uint8_t >.

References get_minmax_intensity().

Referenced by get_minmax_intensity().

## get_origin()

C2DFVector C2DImage::get_origin | ( |  | ) | const

Returns
  the origin in real-world units

## get_pixel_size()

C2DFVector C2DImage::get_pixel_size | ( |  | ) | const

Returns
  the size of a pixel in real-world units

## get_pixel_type()

EPixelType C2DImage::get_pixel_type | ( |  | ) | const

Returns
  the pixel type

## get_size()

const C2DBounds & C2DImage::get_size | ( |  | ) | const

Returns
  the size of the image

Referenced by multiply< T2DImage< T > >::apply(), FConvert2DImageToPixeltypeO< float >::operator()(), FDeformer2D::operator()(), and FDeformer2D::operator()().

## make_single_ref()

virtual void C2DImage::make_single_ref | ( |  | ) |

pure virtual

Implemented in T2DImage< T >, T2DImage< bool >, T2DImage< double >, T2DImage< float >, T2DImage< int16_t >, T2DImage< int32_t >, T2DImage< int64_t >, T2DImage< int8_t >, T2DImage< uint16_t >, T2DImage< uint32_t >, T2DImage< uint64_t >, and T2DImage< uint8_t >.

References make_single_ref().

Referenced by make_single_ref().

## operator=() [1/2]

C2DImage & C2DImage::operator= | ( | C2DImage && | other | ) |

protected

References C2DImage().

## operator=() [2/2]

C2DImage & C2DImage::operator= | ( | const C2DImage & | other | ) |

protected default

References C2DImage().

## set_origin()

void C2DImage::set_origin | ( | const C2DFVector & | origin | ) |

Parameters

  origin | set the origin in world coordinates

## set_pixel_size()

void C2DImage::set_pixel_size | ( | const C2DFVector & | pixel | ) |

Parameters

  pixel | set the pixel real world size to the given value

## Field Documentation

## data_descr

const char* C2DImage::data_descr

static

The type description provides information about the data type that is used by the plug-in system

Definition at line 52 of file 2d/image.hh.

The documentation for this class was generated from the following file:

- 2d/image.hh