MVE - Multi-View Environment mve-devel
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
mve::ImageBase Class Reference

Base class for images without type information. More...

#include <image_base.h>

Public Types

typedef std::shared_ptr< ImageBase const > ConstPtr
 
typedef std::shared_ptr< ImageBasePtr
 

Public Member Functions

 ImageBase (void)=default
 Initializes members with 0.
 
virtual ~ImageBase (void)=default
 
int64_t channels (void) const
 Returns the amount of channels in the image.
 
virtual ImageBase::Ptr duplicate_base (void) const
 Duplicates the image.
 
virtual char * get_byte_pointer (void)
 Pointer to image data.
 
virtual char const * get_byte_pointer (void) const
 Pointer to image data.
 
virtual std::size_t get_byte_size (void) const
 Generic byte size information.
 
virtual ImageType get_type (void) const
 Value type information.
 
virtual char const * get_type_string (void) const
 Returns a string representation of the image data type.
 
int64_t height (void) const
 Returns the height of the image.
 
bool reinterpret (int64_t new_w, int64_t new_h, int64_t new_c)
 Re-interprets the dimensions of the image.
 
bool valid (void) const
 Returns false if one of width, height or channels is 0.
 
int64_t width (void) const
 Returns the width of the image.
 

Static Public Member Functions

static ImageType get_type_for_string (std::string const &type_string)
 Returns the type for a valid type string, otherwise UNKNOWN.
 

Protected Attributes

int64_t c = 0
 
int64_t h = 0
 
int64_t w = 0
 

Detailed Description

Base class for images without type information.

This class basically provides width, height and channel information and a framework for type information and data access.

Definition at line 52 of file image_base.h.

Member Typedef Documentation

◆ ConstPtr

typedef std::shared_ptr<ImageBase const> mve::ImageBase::ConstPtr

Definition at line 56 of file image_base.h.

◆ Ptr

typedef std::shared_ptr<ImageBase> mve::ImageBase::Ptr

Definition at line 55 of file image_base.h.

Constructor & Destructor Documentation

◆ ImageBase()

mve::ImageBase::ImageBase ( void  )
default

Initializes members with 0.

◆ ~ImageBase()

virtual mve::ImageBase::~ImageBase ( void  )
virtualdefault

Member Function Documentation

◆ channels()

int64_t mve::ImageBase::channels ( void  ) const
inline

Returns the amount of channels in the image.

Definition at line 213 of file image_base.h.

◆ duplicate_base()

ImageBase::Ptr mve::ImageBase::duplicate_base ( void  ) const
inlinevirtual

Duplicates the image.

Data holders need to reimplement this.

Reimplemented in mve::TypedImageBase< T >.

Definition at line 195 of file image_base.h.

◆ get_byte_pointer() [1/2]

char * mve::ImageBase::get_byte_pointer ( void  )
inlinevirtual

Pointer to image data.

Returns 0 if not overwritten.

Reimplemented in mve::TypedImageBase< T >.

Definition at line 249 of file image_base.h.

◆ get_byte_pointer() [2/2]

char const * mve::ImageBase::get_byte_pointer ( void  ) const
inlinevirtual

Pointer to image data.

Returns 0 if not overwritten.

Reimplemented in mve::TypedImageBase< T >.

Definition at line 243 of file image_base.h.

◆ get_byte_size()

std::size_t mve::ImageBase::get_byte_size ( void  ) const
inlinevirtual

Generic byte size information.

Returns 0 if not overwritten.

Reimplemented in mve::TypedImageBase< T >.

Definition at line 237 of file image_base.h.

◆ get_type()

ImageType mve::ImageBase::get_type ( void  ) const
inlinevirtual

◆ get_type_for_string()

ImageType mve::ImageBase::get_type_for_string ( std::string const &  type_string)
inlinestatic

Returns the type for a valid type string, otherwise UNKNOWN.

Definition at line 267 of file image_base.h.

◆ get_type_string()

char const * mve::ImageBase::get_type_string ( void  ) const
inlinevirtual

Returns a string representation of the image data type.

Reimplemented in mve::TypedImageBase< T >.

Definition at line 261 of file image_base.h.

◆ height()

int64_t mve::ImageBase::height ( void  ) const
inline

Returns the height of the image.

Definition at line 207 of file image_base.h.

◆ reinterpret()

bool mve::ImageBase::reinterpret ( int64_t  new_w,
int64_t  new_h,
int64_t  new_c 
)
inline

Re-interprets the dimensions of the image.

This will fail and return false if the total image size does not match the old image.

Definition at line 225 of file image_base.h.

◆ valid()

bool mve::ImageBase::valid ( void  ) const
inline

Returns false if one of width, height or channels is 0.

Definition at line 219 of file image_base.h.

◆ width()

int64_t mve::ImageBase::width ( void  ) const
inline

Returns the width of the image.

Definition at line 201 of file image_base.h.

Member Data Documentation

◆ c

int64_t mve::ImageBase::c = 0
protected

Definition at line 99 of file image_base.h.

◆ h

int64_t mve::ImageBase::h = 0
protected

Definition at line 98 of file image_base.h.

◆ w

int64_t mve::ImageBase::w = 0
protected

Definition at line 97 of file image_base.h.


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