Public Types | Public Member Functions
T2DImage< T > Class Template Reference

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 >:
C2DImage CAttributedData

Public Types

typedef C2DImage Super
 define the super class of this class for generic processing More...
 
- Public Types inherited from C2DImage
typedef C2DBounds dimsize_type
 a definition of the image dimension type for More...
 
typedef std::shared_ptr< C2DImagePointer
 2D Image pointer type More...
 

Public Member Functions

const_iterator begin () const
 forwarding function to access the underlying T2DDatafield More...
 
iterator begin ()
 forwarding function to access the underlying T2DDatafield More...
 
const_iterator begin_at (size_t x, size_t y) const
 forwarding function to access the underlying T2DDatafield More...
 
iterator begin_at (size_t x, size_t y)
 forwarding function to access the underlying T2DDatafield More...
 
range_iterator begin_range (const C2DBounds &begin, const C2DBounds &end)
 forwarding function to access the specified range of the underlying T2DDatafield More...
 
const_range_iterator begin_range (const C2DBounds &begin, const C2DBounds &end) const
 forwarding function to access the specified range of the underlying T2DDatafield More...
 
virtual C2DImageclone () const __attribute__((warn_unused_result))
 
const T2DDatafield< T > & data () const
 get direct access to the data field More...
 
const_iterator end () const
 forwarding function to access the underlying T2DDatafield More...
 
iterator end ()
 forwarding function to access the underlying T2DDatafield More...
 
range_iterator end_range (const C2DBounds &begin, const C2DBounds &end)
 forwarding function to access the specified range of the underlying T2DDatafield More...
 
const_range_iterator end_range (const C2DBounds &begin, const C2DBounds &end) const
 forwarding function to access the specified range of the underlying T2DDatafield More...
 
void get_data_line_x (size_t y, std::vector< T > &buffer) const
 forwarding function to access the underlying T2DDatafield More...
 
void get_data_line_y (size_t x, std::vector< T > &buffer) const
 forwarding function to access the underlying T2DDatafield More...
 
C2DFVector get_gradient (size_t idx) const
 
C2DFVector get_gradient (const C2DFVector &p) const
 
const_reference operator() (size_t x, size_t y) const
 forwarding function to access the underlying T2DDatafield More...
 
reference operator() (size_t x, size_t y)
 forwarding function to access the underlying T2DDatafield More...
 
const_reference operator() (const C2DBounds &l) const
 forwarding function to access the underlying T2DDatafield More...
 
reference operator() (const C2DBounds &l)
 forwarding function to access the underlying T2DDatafield More...
 
const_reference operator[] (size_t idx) const
 forwarding function to access the underlying T2DDatafield More...
 
reference operator[] (size_t idx)
 forwarding function to access the underlying T2DDatafield More...
 
void put_data_line_x (size_t y, const std::vector< T > &buffer)
 forwarding function to access the underlying T2DDatafield More...
 
void put_data_line_y (size_t x, const std::vector< T > &buffer)
 forwarding function to access the underlying T2DDatafield More...
 
size_t size () const
 forwarding function to access the underlying T2DDatafield More...
 
 T2DImage (const C2DBounds &size, const T *init_data)
 
 T2DImage (const C2DBounds &size, const typename T2DDatafield< T >::data_array &init_data)
 
 T2DImage (const C2DBounds &size, const CAttributedData &attr)
 
 T2DImage (const C2DBounds &size)
 
 T2DImage (const T2DImage &orig)
 
 T2DImage (const T2DDatafield< T > &orig)
 
 T2DImage (const T2DDatafield< T > &orig, const CAttributedData &attr)
 
 T2DImage ()
 
- Public Member Functions inherited from C2DImage
C2DFVector get_pixel_size () const
 
EPixelType get_pixel_type () const
 
const C2DBoundsget_size () const
 
void set_pixel_size (const C2DFVector &pixel)
 
virtual ~C2DImage ()
 
- Public Member Functions inherited from CAttributedData
CAttributeMap::const_iterator begin_attributes () const
 
void delete_attribute (const std::string &key)
 
CAttributeMap::const_iterator end_attributes () const
 
const PAttribute get_attribute (const std::string &key) const
 
template<typename T >
const T get_attribute_as (const std::string &key) const
 
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 More...
 
bool has_attribute (const std::string &key) const
 
CAttributedDataoperator= (const CAttributedData &org)
 Assignemt operator. More...
 
void set_attribute (const std::string &key, PAttribute attr)
 
void set_attribute (const std::string &key, const std::string &value)
 
void set_attributes (CAttributeMap::const_iterator begin, CAttributeMap::const_iterator end)
 
 CAttributedData ()
 
 CAttributedData (const CAttributedData &org)
 
 CAttributedData (PAttributeMap attr)
 

Additional Inherited Members

- Static Public Attributes inherited from C2DImage
static const char * data_descr
 
- Protected Member Functions inherited from C2DImage
 C2DImage (const C2DBounds &size, EPixelType type)
 
 C2DImage (const CAttributedData &attributes, const C2DBounds &size, EPixelType type)
 
 C2DImage ()
 

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 117 of file 2d/image.hh.

Member Typedef Documentation

template<typename T>
typedef C2DImage T2DImage< T >::Super

define the super class of this class for generic processing

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

Constructor & Destructor Documentation

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_datamust at least be of size (size.x*size.y)
template<typename T>
T2DImage< T >::T2DImage ( const C2DBounds size,
const typename T2DDatafield< T >::data_array &  init_data 
)

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

Parameters
size
init_datamust at least be of size (size.x*size.y)
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
sizeimage size
attrmeta-data to be added
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
template<typename T>
T2DImage< T >::T2DImage ( const T2DImage< T > &  orig)

Copy constructor

template<typename T>
T2DImage< T >::T2DImage ( const T2DDatafield< T > &  orig)

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

Parameters
origthe input data field
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
origthe input data field
attrthe meta data
template<typename T>
T2DImage< T >::T2DImage ( )

Member Function Documentation

template<typename T>
const_iterator T2DImage< T >::begin ( ) const
inline
template<typename T>
iterator T2DImage< T >::begin ( )
inline

forwarding function to access the underlying T2DDatafield

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

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 239 of file 2d/image.hh.

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 244 of file 2d/image.hh.

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 249 of file 2d/image.hh.

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 259 of file 2d/image.hh.

template<typename T>
virtual C2DImage* T2DImage< T >::clone ( ) const
virtual
Returns
a dynamically created copy of the image

Implements C2DImage.

template<typename T>
const T2DDatafield<T>& T2DImage< T >::data ( ) const

get direct access to the data field

Referenced by FDeformer2D::operator()().

template<typename T>
const_iterator T2DImage< T >::end ( ) const
inline

forwarding function to access the underlying T2DDatafield

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

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

template<typename T>
iterator T2DImage< T >::end ( )
inline

forwarding function to access the underlying T2DDatafield

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

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 254 of file 2d/image.hh.

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 264 of file 2d/image.hh.

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

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

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
idxlinear index into the image data
Returns
the approximated gradient
template<typename T>
C2DFVector T2DImage< T >::get_gradient ( const C2DFVector p) const

Evaluate the gradient by using linerly interpolated finite differences

Parameters
pcontinious coordinate into the image domain
Returns
gradient at position p
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 189 of file 2d/image.hh.

template<typename T>
reference T2DImage< T >::operator() ( size_t  x,
size_t  y 
)
inline

forwarding function to access the underlying T2DDatafield

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

template<typename T>
const_reference T2DImage< T >::operator() ( const C2DBounds l) const
inline

forwarding function to access the underlying T2DDatafield

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

template<typename T>
reference T2DImage< T >::operator() ( const C2DBounds l)
inline

forwarding function to access the underlying T2DDatafield

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

template<typename T>
const_reference T2DImage< T >::operator[] ( size_t  idx) const
inline

forwarding function to access the underlying T2DDatafield

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

template<typename T>
reference T2DImage< T >::operator[] ( size_t  idx)
inline

forwarding function to access the underlying T2DDatafield

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

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

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

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: