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 >:
[legend]
Collaboration diagram for T2DImage< T >:
[legend]

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
 
std::pair< double, double > get_minmax_intensity () const
 
void make_single_ref () __attribute__((deprecated))
 
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...
 
T2DImage< T > & operator= (T2DImage< T > &&orig)
 
T2DImage< T > & operator= (const T2DImage< T > &orig)
 
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 std::vector< T > &init_data)
 
 T2DImage (const C2DBounds &size, const CAttributedData &attr)
 
 T2DImage (const C2DBounds &size)
 
 T2DImage (const T2DImage &orig)
 
 T2DImage (T2DImage &&orig)
 
 T2DImage (const T2DDatafield< T > &orig)
 
 T2DImage (const T2DDatafield< T > &orig, const CAttributedData &attr)
 
 T2DImage ()
 
- Public Member Functions inherited from C2DImage
C2DFVector get_origin () const
 
C2DFVector get_pixel_size () const
 
EPixelType get_pixel_type () const
 
const C2DBoundsget_size () const
 
void set_origin (const C2DFVector &origin)
 
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
 
template<typename T >
const T get_attribute_as (const std::string &key, T default_value) 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 print (std::ostream &os) const
 
void set_attribute (const std::string &key, PAttribute attr)
 
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)
 
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 (C2DImage &&other)
 
 C2DImage (const C2DImage &other)=default
 
 C2DImage (const C2DBounds &size, EPixelType type)
 
 C2DImage (const CAttributedData &attributes, const C2DBounds &size, EPixelType type)
 
 C2DImage ()
 
C2DImageoperator= (C2DImage &&other)
 
C2DImageoperator= (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 138 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 141 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_datamust 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_datamust 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
sizeimage size
attrmeta-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
origthe 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
origthe input data field
attrthe meta data

◆ T2DImage() [9/9]

template<typename T>
T2DImage< T >::T2DImage ( )

Member Function Documentation

◆ begin() [1/2]

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

◆ begin() [2/2]

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

forwarding function to access the underlying T2DDatafield

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

◆ begin_at() [1/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 281 of file 2d/image.hh.

◆ begin_at() [2/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 286 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 291 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 301 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()().

◆ end() [1/2]

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

forwarding function to access the underlying T2DDatafield

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

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

◆ end() [2/2]

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

forwarding function to access the underlying T2DDatafield

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

◆ 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 296 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 306 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 ( 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

◆ get_gradient() [2/2]

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

◆ 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>
const_reference T2DImage< T >::operator() ( size_t  x,
size_t  y 
) const
inline

forwarding function to access the underlying T2DDatafield

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

◆ operator()() [2/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 236 of file 2d/image.hh.

◆ operator()() [3/4]

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

forwarding function to access the underlying T2DDatafield

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

◆ operator()() [4/4]

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

forwarding function to access the underlying T2DDatafield

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

◆ operator=() [1/2]

template<typename T>
T2DImage<T>& T2DImage< T >::operator= ( T2DImage< T > &&  orig)

Move operator

◆ operator=() [2/2]

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

Copy operator

◆ operator[]() [1/2]

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

forwarding function to access the underlying T2DDatafield

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

◆ operator[]() [2/2]

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

forwarding function to access the underlying T2DDatafield

Definition at line 246 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: