MVE - Multi-View Environment mve-devel
|
Base class for images of arbitrary type. More...
#include <image_base.h>
Public Types | |
typedef std::shared_ptr< TypedImageBase< T > const > | ConstPtr |
typedef std::vector< T > | ImageData |
typedef std::shared_ptr< TypedImageBase< T > > | Ptr |
typedef T | ValueType |
![]() | |
typedef std::shared_ptr< ImageBase const > | ConstPtr |
typedef std::shared_ptr< ImageBase > | Ptr |
Public Member Functions | |
TypedImageBase (TypedImageBase< T > const &other) | |
Copy constructor duplicates another image. | |
TypedImageBase (void)=default | |
Default constructor creates an empty image. | |
virtual | ~TypedImageBase (void)=default |
void | allocate (int64_t width, int64_t height, int64_t chans) |
Allocates new image space, clearing previous content. | |
T * | begin (void) |
Returns data pointer to beginning. | |
T const * | begin (void) const |
Returns const data pointer to beginning. | |
virtual void | clear (void) |
Clears the image data from memory. | |
virtual ImageBase::Ptr | duplicate_base (void) const |
Duplicates the image. | |
T * | end (void) |
Returns data pointer to end. | |
T const * | end (void) const |
Returns const data pointer to end. | |
void | fill (T const &value) |
Fills the data with a constant value. | |
char * | get_byte_pointer (void) |
Returns the char pointer to the data. | |
char const * | get_byte_pointer (void) const |
Returns the char pointer to the data. | |
std::size_t | get_byte_size (void) const |
Returns the size of the image in bytes (w * h * c * BPV). | |
ImageData & | get_data (void) |
Returns the data vector for the image. | |
ImageData const & | get_data (void) const |
Returns the data vector for the image. | |
T * | get_data_pointer (void) |
Returns the data pointer. | |
T const * | get_data_pointer (void) const |
Returns the data pointer. | |
int64_t | get_pixel_amount (void) const |
Returns the amount of pixels in the image (w * h). | |
virtual ImageType | get_type (void) const |
Value type information by template specialization. | |
ImageType | get_type (void) const |
Value type information. | |
ImageType | get_type (void) const |
Value type information. | |
ImageType | get_type (void) const |
Value type information. | |
ImageType | get_type (void) const |
Value type information. | |
ImageType | get_type (void) const |
Value type information. | |
ImageType | get_type (void) const |
Value type information. | |
ImageType | get_type (void) const |
Value type information. | |
ImageType | get_type (void) const |
Value type information. | |
ImageType | get_type (void) const |
Value type information. | |
ImageType | get_type (void) const |
Value type information. | |
char const * | get_type_string (void) const |
Returns a string representation of the image data type. | |
int64_t | get_value_amount (void) const |
Returns the amount of values in the image (w * h * c). | |
void | resize (int64_t width, int64_t height, int64_t chans) |
Resizes the underlying image data vector. | |
void | swap (TypedImageBase< T > &other) |
Swaps the contents of the images. | |
![]() | |
ImageBase (void)=default | |
Initializes members with 0. | |
virtual | ~ImageBase (void)=default |
int64_t | channels (void) const |
Returns the amount of channels in the image. | |
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. | |
Protected Attributes | |
ImageData | data |
![]() | |
int64_t | c = 0 |
int64_t | h = 0 |
int64_t | w = 0 |
Additional Inherited Members | |
![]() | |
static ImageType | get_type_for_string (std::string const &type_string) |
Returns the type for a valid type string, otherwise UNKNOWN. | |
Base class for images of arbitrary type.
Image values are stored in a standard STL Vector. Type information is provided. This class makes no assumptions about the image structure, i.e. it provides no pixel access methods.
Definition at line 111 of file image_base.h.
typedef std::shared_ptr<TypedImageBase<T> const> mve::TypedImageBase< T >::ConstPtr |
Definition at line 116 of file image_base.h.
typedef std::vector<T> mve::TypedImageBase< T >::ImageData |
Definition at line 117 of file image_base.h.
typedef std::shared_ptr<TypedImageBase<T> > mve::TypedImageBase< T >::Ptr |
Definition at line 115 of file image_base.h.
typedef T mve::TypedImageBase< T >::ValueType |
Definition at line 114 of file image_base.h.
|
default |
Default constructor creates an empty image.
|
inline |
Copy constructor duplicates another image.
Definition at line 297 of file image_base.h.
|
virtualdefault |
|
inline |
Allocates new image space, clearing previous content.
Definition at line 395 of file image_base.h.
|
inline |
Returns data pointer to beginning.
Definition at line 472 of file image_base.h.
|
inline |
Returns const data pointer to beginning.
Definition at line 479 of file image_base.h.
|
inlinevirtual |
Clears the image data from memory.
Definition at line 413 of file image_base.h.
|
inlinevirtual |
Duplicates the image.
Data holders need to reimplement this.
Reimplemented from mve::ImageBase.
Definition at line 304 of file image_base.h.
|
inline |
Returns data pointer to end.
Definition at line 486 of file image_base.h.
|
inline |
Returns const data pointer to end.
Definition at line 493 of file image_base.h.
|
inline |
Fills the data with a constant value.
Definition at line 423 of file image_base.h.
|
inlinevirtual |
Returns the char pointer to the data.
Reimplemented from mve::ImageBase.
Definition at line 528 of file image_base.h.
|
inlinevirtual |
Returns the char pointer to the data.
Reimplemented from mve::ImageBase.
Definition at line 521 of file image_base.h.
|
inlinevirtual |
Returns the size of the image in bytes (w * h * c * BPV).
Reimplemented from mve::ImageBase.
Definition at line 514 of file image_base.h.
|
inline |
Returns the data vector for the image.
Definition at line 440 of file image_base.h.
|
inline |
Returns the data vector for the image.
Definition at line 447 of file image_base.h.
|
inline |
Returns the data pointer.
Definition at line 463 of file image_base.h.
|
inline |
Returns the data pointer.
Definition at line 454 of file image_base.h.
|
inline |
Returns the amount of pixels in the image (w * h).
Definition at line 500 of file image_base.h.
|
inlinevirtual |
Value type information by template specialization.
Reimplemented from mve::ImageBase.
Definition at line 311 of file image_base.h.
|
inlinevirtual |
Value type information.
Returns UNKNOWN if not overwritten.
Reimplemented from mve::ImageBase.
Definition at line 318 of file image_base.h.
|
inlinevirtual |
Value type information.
Returns UNKNOWN if not overwritten.
Reimplemented from mve::ImageBase.
Definition at line 325 of file image_base.h.
|
inlinevirtual |
Value type information.
Returns UNKNOWN if not overwritten.
Reimplemented from mve::ImageBase.
Definition at line 332 of file image_base.h.
|
inlinevirtual |
Value type information.
Returns UNKNOWN if not overwritten.
Reimplemented from mve::ImageBase.
Definition at line 339 of file image_base.h.
|
inlinevirtual |
Value type information.
Returns UNKNOWN if not overwritten.
Reimplemented from mve::ImageBase.
Definition at line 346 of file image_base.h.
|
inlinevirtual |
Value type information.
Returns UNKNOWN if not overwritten.
Reimplemented from mve::ImageBase.
Definition at line 353 of file image_base.h.
|
inlinevirtual |
Value type information.
Returns UNKNOWN if not overwritten.
Reimplemented from mve::ImageBase.
Definition at line 360 of file image_base.h.
|
inlinevirtual |
Value type information.
Returns UNKNOWN if not overwritten.
Reimplemented from mve::ImageBase.
Definition at line 367 of file image_base.h.
|
inlinevirtual |
Value type information.
Returns UNKNOWN if not overwritten.
Reimplemented from mve::ImageBase.
Definition at line 374 of file image_base.h.
|
inlinevirtual |
Value type information.
Returns UNKNOWN if not overwritten.
Reimplemented from mve::ImageBase.
Definition at line 381 of file image_base.h.
|
inlinevirtual |
Returns a string representation of the image data type.
Reimplemented from mve::ImageBase.
Definition at line 388 of file image_base.h.
|
inline |
Returns the amount of values in the image (w * h * c).
Definition at line 507 of file image_base.h.
|
inline |
Resizes the underlying image data vector.
Note: This leaves the existing/remaining image data unchanged. Warning: If the image is shrunk, the data vector is resized but may still consume the original amount of memory. Use allocate() instead if the previous data is not important.
Definition at line 403 of file image_base.h.
|
inline |
Swaps the contents of the images.
Definition at line 430 of file image_base.h.
|
protected |
Definition at line 189 of file image_base.h.