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

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
 
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 C2DBoundsget_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 ()
 
- 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)
 

Static Public Attributes

static const char * data_descr
 

Protected Member Functions

 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

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

a definition of the image dimension type for

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

◆ Pointer

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

2D Image pointer type

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

Constructor & Destructor Documentation

◆ ~C2DImage()

virtual C2DImage::~C2DImage ( )
virtual

◆ C2DImage() [1/5]

C2DImage::C2DImage ( C2DImage &&  other)
protected

◆ C2DImage() [2/5]

C2DImage::C2DImage ( const C2DImage other)
protecteddefault

◆ C2DImage() [3/5]

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

Constructor initializes the size and the pixel type

◆ 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

◆ C2DImage() [5/5]

C2DImage::C2DImage ( )
protected

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

Member Function Documentation

◆ clone()

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

returns a copy of this image Abstract method

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

◆ get_minmax_intensity()

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

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

◆ 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

◆ make_single_ref()

virtual void C2DImage::make_single_ref ( )
pure virtual

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

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ set_origin()

void C2DImage::set_origin ( const C2DFVector origin)
Parameters
originset the origin in world coordinates

◆ set_pixel_size()

void C2DImage::set_pixel_size ( const C2DFVector pixel)
Parameters
pixelset 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 51 of file 2d/image.hh.


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