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

Base class for 3D volumes (pitched memory). More...

#include <volume.h>

Inheritance diagram for iu::Volume:
iu::VolumeCpu< PixelType, Allocator > iu::VolumeGpu< PixelType, Allocator >

Public Member Functions

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

Friends

std::ostream & operator<< (std::ostream &out, Volume const &volume)
 

Detailed Description

Base class for 3D volumes (pitched memory).

Constructor & Destructor Documentation

iu::Volume::Volume ( )
inline

Constructor.

virtual iu::Volume::~Volume ( )
inlinevirtual

Destructor.

iu::Volume::Volume ( unsigned int  width,
unsigned int  height,
unsigned int  depth 
)
inline

Special constructor.

Parameters
widthWidth of the Volume
heightHeight of the Volume
depthDepth of the Volume
iu::Volume::Volume ( const iu::Size< 3 > &  size)
inline

Special constructor.

Parameters
sizeSize of the Volume

Member Function Documentation

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

Returns the bit depth of the data pointer.

Reimplemented in iu::VolumeGpu< PixelType, Allocator >, and iu::VolumeCpu< PixelType, Allocator >.

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

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

Reimplemented in iu::VolumeGpu< PixelType, Allocator >, and iu::VolumeCpu< PixelType, Allocator >.

unsigned int iu::Volume::depth ( ) const
inline

Get the depth of the Volume

Returns
Depth of the Volume
unsigned int iu::Volume::height ( ) const
inline

Get the height of the Volume

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

Returns the number of pixels in the Volume.

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

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

Reimplemented in iu::VolumeGpu< PixelType, Allocator >, and iu::VolumeCpu< PixelType, Allocator >.

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

Returns the distance in bytes between starts of consecutive rows.

Reimplemented in iu::VolumeGpu< PixelType, Allocator >, and iu::VolumeCpu< PixelType, Allocator >.

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

Compares the Volume type to a target Volume.

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

Get the size of the Volume

Returns
Size of the Volume
virtual size_t iu::Volume::slice_stride ( ) const
inlinevirtual

Returns the distance in pixels between starts of consecutive slices.

Reimplemented in iu::VolumeGpu< PixelType, Allocator >, and iu::VolumeCpu< PixelType, Allocator >.

virtual size_t iu::Volume::stride ( ) const
inlinevirtual

Returns the distance in pixels between starts of consecutive rows.

Reimplemented in iu::VolumeGpu< PixelType, Allocator >, and iu::VolumeCpu< PixelType, Allocator >.

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

Get the width of the Volume

Returns
Width of the Volume

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
Volume const &  volume 
)
friend

Operator<< overloading. Output of Volume class.


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