Image Utilities (IU)
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Friends Groups Pages
Public Member Functions | Protected Attributes | Friends
iu::Image Class Reference

Base class for 2D images (pitched memory). More...

#include <image.h>

Inheritance diagram for iu::Image:
iu::ImageCpu< PixelType, Allocator > iu::ImageGpu< PixelType, Allocator >

Public Member Functions

 Image ()
 
virtual ~Image ()
 
 Image (unsigned int width, unsigned int height)
 
 Image (const iu::Size< 2 > &size)
 
iu::Size< 2 > size () const
 
unsigned int width () const
 
unsigned int height () const
 
bool sameType (const Image &from)
 
size_t numel () const
 
virtual size_t bytes () const
 
virtual size_t pitch () const
 
virtual size_t stride () const
 
virtual unsigned int bitDepth () const
 
virtual bool onDevice () const
 

Protected Attributes

iu::Size< 2 > size_
 

Friends

std::ostream & operator<< (std::ostream &out, Image const &image)
 

Detailed Description

Base class for 2D images (pitched memory).

Constructor & Destructor Documentation

iu::Image::Image ( )
inline

Constructor.

virtual iu::Image::~Image ( )
inlinevirtual

Destructor.

iu::Image::Image ( unsigned int  width,
unsigned int  height 
)
inline

Special constructor.

Parameters
widthWidth of the Image
heightHeight of the Image
iu::Image::Image ( const iu::Size< 2 > &  size)
inline

Special constructor.

Parameters
sizeSize of the Image

Member Function Documentation

virtual unsigned int iu::Image::bitDepth ( ) const
inlinevirtual

Returns the bit depth of the data pointer.

Reimplemented in iu::ImageCpu< PixelType, Allocator >, and iu::ImageGpu< PixelType, Allocator >.

virtual size_t iu::Image::bytes ( ) const
inlinevirtual

Returns the total amount of bytes saved in the data buffer.

Reimplemented in iu::ImageCpu< PixelType, Allocator >, and iu::ImageGpu< PixelType, Allocator >.

unsigned int iu::Image::height ( ) const
inline

Get the height of the Image.

Returns
Height of the Image
size_t iu::Image::numel ( ) const
inline

Returns the number of pixels in the Image.

virtual bool iu::Image::onDevice ( ) const
inlinevirtual

Returns flag if the image data resides on the device/GPU (TRUE) or host/GPU (FALSE)

Reimplemented in iu::ImageCpu< PixelType, Allocator >, and iu::ImageGpu< PixelType, Allocator >.

virtual size_t iu::Image::pitch ( ) const
inlinevirtual

Returns the distance in bytes between starts of consecutive rows.

Reimplemented in iu::ImageCpu< PixelType, Allocator >, and iu::ImageGpu< PixelType, Allocator >.

bool iu::Image::sameType ( const Image from)
inline

Compares the Image type to a target Image.

Parameters
fromTarget Image.
Returns
Returns true if target class is of the same type (using RTTI).
iu::Size<2> iu::Image::size ( ) const
inline

Get the size of the Image

Returns
Size of the Image
virtual size_t iu::Image::stride ( ) const
inlinevirtual

Returns the distance in pixels between starts of consecutive rows.

Reimplemented in iu::ImageCpu< PixelType, Allocator >, and iu::ImageGpu< PixelType, Allocator >.

unsigned int iu::Image::width ( ) const
inline

Get the width of the Image.

Returns
Width of the Image

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
Image const &  image 
)
friend

Operator<< overloading. Output of Image class.

Field Documentation

iu::Size<2> iu::Image::size_
protected

Size of the Image.


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