Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions
C2DImage Class Referenceabstract

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

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

Inheritance diagram for C2DImage:
CAttributedData T2DImage< T > T2DImage< float >

Public Types

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

virtual C2DImageclone () const __attribute__((warn_unused_result))=0
 
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)
 

Static Public Attributes

static const char * data_descr
 

Protected Member Functions

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

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

Member Typedef Documentation

a definition of the image dimension type for

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

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

2D Image pointer type

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

Constructor & Destructor Documentation

virtual C2DImage::~C2DImage ( )
virtual
C2DImage::C2DImage ( const C2DBounds size,
EPixelType  type 
)
protected

Constructor initializes the size and the pixel type

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

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

C2DImage::C2DImage ( )
protected
standard constructor initializes the size to (0,0), and the pixel type

to "unknown"

Member Function Documentation

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

returns a copy of this image Abstract method

Implemented in T2DImage< T >, and T2DImage< float >.

C2DFVector C2DImage::get_pixel_size ( ) const
Returns
the size of a pixel in real-world units
EPixelType C2DImage::get_pixel_type ( ) const
Returns
the pixel type
const C2DBounds& C2DImage::get_size ( ) const
void C2DImage::set_pixel_size ( const C2DFVector pixel)
Parameters
pixelset the pixel real world size to the given value

Field Documentation

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


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