T2DImage< T > Class Template Reference
Basic data strctures and functions

This is the template version of a 2D image that is used for holding real data. More...

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

Inheritance diagram for T2DImage< T >:
[legend]
Collaboration diagram for T2DImage< T >:
[legend]

## Public Types

typedef C2DImage | Super
| define the super class of this class for generic processing
Public Types inherited from C2DImage
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

iterator | begin ()
| forwarding function to access the underlying T2DDatafield
const_iterator | begin () const
| forwarding function to access the underlying T2DDatafield
iterator | begin_at (size_t x, size_t y)
| forwarding function to access the underlying T2DDatafield
const_iterator | begin_at (size_t x, size_t y) const
| forwarding function to access the underlying T2DDatafield
range_iterator | begin_range (const C2DBounds &begin, const C2DBounds &end)
| forwarding function to access the specified range of the underlying T2DDatafield
const_range_iterator | begin_range (const C2DBounds &begin, const C2DBounds &end) const
| forwarding function to access the specified range of the underlying T2DDatafield
virtual C2DImage * | clone () const __attribute__((warn_unused_result))
const T2DDatafield< T > & | data () const
| get direct access to the data field
iterator | end ()
| forwarding function to access the underlying T2DDatafield
const_iterator | end () const
| forwarding function to access the underlying T2DDatafield
range_iterator | end_range (const C2DBounds &begin, const C2DBounds &end)
| forwarding function to access the specified range of the underlying T2DDatafield
const_range_iterator | end_range (const C2DBounds &begin, const C2DBounds &end) const
| forwarding function to access the specified range of the underlying T2DDatafield
void | get_data_line_x (size_t y, std::vector< T > &buffer) const
| forwarding function to access the underlying T2DDatafield
void | get_data_line_y (size_t x, std::vector< T > &buffer) const
| forwarding function to access the underlying T2DDatafield
C2DFVector | get_gradient (const C2DFVector &p) const
C2DFVector | get_gradient (size_t idx) const
std::pair< double, double > | get_minmax_intensity () const
void | make_single_ref () __attribute__((deprecated))
reference | operator() (const C2DBounds &l)
| forwarding function to access the underlying T2DDatafield
const_reference | operator() (const C2DBounds &l) const
| forwarding function to access the underlying T2DDatafield
reference | operator() (size_t x, size_t y)
| forwarding function to access the underlying T2DDatafield
const_reference | operator() (size_t x, size_t y) const
| forwarding function to access the underlying T2DDatafield
T2DImage< T > & | operator= (const T2DImage< T > &orig)
T2DImage< T > & | operator= (T2DImage< T > &&orig)
reference | operator[] (size_t idx)
| forwarding function to access the underlying T2DDatafield
const_reference | operator[] (size_t idx) const
| forwarding function to access the underlying T2DDatafield
void | put_data_line_x (size_t y, const std::vector< T > &buffer)
| forwarding function to access the underlying T2DDatafield
void | put_data_line_y (size_t x, const std::vector< T > &buffer)
| forwarding function to access the underlying T2DDatafield
size_t | size () const
| forwarding function to access the underlying T2DDatafield
| T2DImage ()
| T2DImage (const C2DBounds &size)
| T2DImage (const C2DBounds &size, const CAttributedData &attr)
| T2DImage (const C2DBounds &size, const std::vector< T > &init_data)
| T2DImage (const C2DBounds &size, const T *init_data)
| T2DImage (const T2DDatafield< T > &orig)
| T2DImage (const T2DDatafield< T > &orig, const CAttributedData &attr)
| T2DImage (const T2DImage &orig)
| T2DImage (T2DImage &&orig)
Public Member Functions inherited from C2DImage
C2DFVector | get_origin () const
C2DFVector | get_pixel_size () const
EPixelType | get_pixel_type () const
const C2DBounds & | get_size () const
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

## Additional Inherited Members

Static Public Attributes inherited from C2DImage
static const char * | data_descr
Protected Member Functions inherited from C2DImage
| 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

template<typename T>
class T2DImage< T >

This is the template version of a 2D image that is used for holding real data.

The purpouse of this class is to hold actual pixel data and provide access to it.

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

## Member Typedef Documentation

## Super

template<typename T>

typedef C2DImage T2DImage< T >::Super

define the super class of this class for generic processing

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

## Constructor & Destructor Documentation

## T2DImage() [1/9]

template<typename T>

T2DImage< T >::T2DImage | ( | const C2DBounds & | size,
|  | const T * | init_data )

Create a 2D image with the given size and initialize it with the given data

Parameters

  size |
  init_data | must at least be of size (size.x*size.y)

## T2DImage() [2/9]

template<typename T>

T2DImage< T >::T2DImage | ( | const C2DBounds & | size,
|  | const std::vector< T > & | init_data )

Create a 2D image with the given size and initialize it with the given data

Parameters

  size |
  init_data | must at least be of size (size.x*size.y)

## T2DImage() [3/9]

template<typename T>

T2DImage< T >::T2DImage | ( | const C2DBounds & | size,
|  | const CAttributedData & | attr )

Create a 2D image with thegiven size and attach the given meta-data list.

Parameters

  size | image size
  attr | meta-data to be added

## T2DImage() [4/9]

template<typename T>

T2DImage< T >::T2DImage | ( | const C2DBounds & | size | ) |

Create a 2D image with the given size and initialize it with the given data

Parameters

  size |

## T2DImage() [5/9]

template<typename T>

T2DImage< T >::T2DImage | ( | const T2DImage< T > & | orig | ) |

Copy constructor

## T2DImage() [6/9]

template<typename T>

T2DImage< T >::T2DImage | ( | T2DImage< T > && | orig | ) |

Move constructor

## T2DImage() [7/9]

template<typename T>

T2DImage< T >::T2DImage | ( | const T2DDatafield< T > & | orig | ) |

Constructor to create the image by using a 2D data field

Parameters

  orig | the input data field

## T2DImage() [8/9]

template<typename T>

T2DImage< T >::T2DImage | ( | const T2DDatafield< T > & | orig,
|  | const CAttributedData & | attr )

Constructor to create the image by using a 2D data field and a given meta data set.

Parameters

  orig | the input data field
  attr | the meta data

## T2DImage() [9/9]

template<typename T>

T2DImage< T >::T2DImage | ( |  | ) |

## Member Function Documentation

## begin() [1/2]

template<typename T>

iterator T2DImage< T >::begin | ( |  | ) |

inline

forwarding function to access the underlying T2DDatafield

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

## begin() [2/2]

template<typename T>

const_iterator T2DImage< T >::begin | ( |  | ) | const

inline

forwarding function to access the underlying T2DDatafield

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

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

## begin_at() [1/2]

template<typename T>

iterator T2DImage< T >::begin_at | ( | size_t | x,
|  | size_t | y )

inline

forwarding function to access the underlying T2DDatafield

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

## begin_at() [2/2]

template<typename T>

const_iterator T2DImage< T >::begin_at | ( | size_t | x,
|  | size_t | y ) const

inline

forwarding function to access the underlying T2DDatafield

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

## begin_range() [1/2]

template<typename T>

range_iterator T2DImage< T >::begin_range | ( | const C2DBounds & | begin,
|  | const C2DBounds & | end )

inline

forwarding function to access the specified range of the underlying T2DDatafield

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

## begin_range() [2/2]

template<typename T>

const_range_iterator T2DImage< T >::begin_range | ( | const C2DBounds & | begin,
|  | const C2DBounds & | end ) const

inline

forwarding function to access the specified range of the underlying T2DDatafield

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

## clone()

template<typename T>

virtual C2DImage * T2DImage< T >::clone | ( |  | ) | const

virtual

Returns
  a dynamically created copy of the image

Implements C2DImage.

## data()

template<typename T>

const T2DDatafield< T > & T2DImage< T >::data | ( |  | ) | const

get direct access to the data field

Referenced by FDeformer2D::operator()(), and FDeformer2D::operator()().

## end() [1/2]

template<typename T>

iterator T2DImage< T >::end | ( |  | ) |

inline

forwarding function to access the underlying T2DDatafield

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

## end() [2/2]

template<typename T>

const_iterator T2DImage< T >::end | ( |  | ) | const

inline

forwarding function to access the underlying T2DDatafield

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

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

## end_range() [1/2]

template<typename T>

range_iterator T2DImage< T >::end_range | ( | const C2DBounds & | begin,
|  | const C2DBounds & | end )

inline

forwarding function to access the specified range of the underlying T2DDatafield

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

## end_range() [2/2]

template<typename T>

const_range_iterator T2DImage< T >::end_range | ( | const C2DBounds & | begin,
|  | const C2DBounds & | end ) const

inline

forwarding function to access the specified range of the underlying T2DDatafield

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

## get_data_line_x()

template<typename T>

void T2DImage< T >::get_data_line_x | ( | size_t | y,
|  | std::vector< T > & | buffer ) const

forwarding function to access the underlying T2DDatafield

## get_data_line_y()

template<typename T>

void T2DImage< T >::get_data_line_y | ( | size_t | x,
|  | std::vector< T > & | buffer ) const

forwarding function to access the underlying T2DDatafield

## get_gradient() [1/2]

template<typename T>

C2DFVector T2DImage< T >::get_gradient | ( | const C2DFVector & | p | ) | const

Evaluate the gradient by using linerly interpolated finite differences

Parameters

  p | continious coordinate into the image domain

Returns
  gradient at position p

## get_gradient() [2/2]

template<typename T>

C2DFVector T2DImage< T >::get_gradient | ( | size_t | idx | ) | const

evaluate the image gradient afthe given grid position by using centered finite differences

Parameters

  idx | linear index into the image data

Returns
  the approximated gradient

## get_minmax_intensity()

template<typename T>

std::pair< double, double > T2DImage< T >::get_minmax_intensity | ( |  | ) | const

virtual

Returns
  a pair (minimum, maximum) pixel intensity

Implements C2DImage.

## make_single_ref()

template<typename T>

void T2DImage< T >::make_single_ref | ( |  | ) |

virtual

Implements C2DImage.

## operator()() [1/4]

template<typename T>

reference T2DImage< T >::operator() | ( | const C2DBounds & | l | ) |

inline

forwarding function to access the underlying T2DDatafield

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

## operator()() [2/4]

template<typename T>

const_reference T2DImage< T >::operator() | ( | const C2DBounds & | l | ) | const

inline

forwarding function to access the underlying T2DDatafield

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

## operator()() [3/4]

template<typename T>

reference T2DImage< T >::operator() | ( | size_t | x,
|  | size_t | y )

inline

forwarding function to access the underlying T2DDatafield

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

## operator()() [4/4]

template<typename T>

const_reference T2DImage< T >::operator() | ( | size_t | x,
|  | size_t | y ) const

inline

forwarding function to access the underlying T2DDatafield

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

## operator=() [1/2]

template<typename T>

T2DImage< T > & T2DImage< T >::operator= | ( | const T2DImage< T > & | orig | ) |

Copy operator

## operator=() [2/2]

template<typename T>

T2DImage< T > & T2DImage< T >::operator= | ( | T2DImage< T > && | orig | ) |

Move operator

## operator[]() [1/2]

template<typename T>

reference T2DImage< T >::operator[] | ( | size_t | idx | ) |

inline

forwarding function to access the underlying T2DDatafield

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

## operator[]() [2/2]

template<typename T>

const_reference T2DImage< T >::operator[] | ( | size_t | idx | ) | const

inline

forwarding function to access the underlying T2DDatafield

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

## put_data_line_x()

template<typename T>

void T2DImage< T >::put_data_line_x | ( | size_t | y,
|  | const std::vector< T > & | buffer )

forwarding function to access the underlying T2DDatafield

## put_data_line_y()

template<typename T>

void T2DImage< T >::put_data_line_y | ( | size_t | x,
|  | const std::vector< T > & | buffer )

forwarding function to access the underlying T2DDatafield

## size()

template<typename T>

size_t T2DImage< T >::size | ( |  | ) | const

forwarding function to access the underlying T2DDatafield

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

- 2d/image.hh