Image Utilities (IU)
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Friends Groups Pages
Public Member Functions | Static Public Member Functions | Protected Attributes | Friends
iu::VectorBase< PixelType, Ndim > Class Template Reference

Base class for N-dimensional vectors. More...

#include <vector.h>

Inheritance diagram for iu::VectorBase< PixelType, Ndim >:
iu::Vector< PixelType, Ndim >

Public Member Functions

 VectorBase ()
 
 VectorBase (const PixelType &value)
 
 VectorBase (std::initializer_list< PixelType > list)
 
virtual ~VectorBase ()
 
PixelType operator[] (unsigned int i) const
 
PixelType & operator[] (unsigned int i)
 
void fill (const PixelType &value)
 

Static Public Member Functions

static unsigned int ndim ()
 

Protected Attributes

PixelType data_ [Ndim]
 

Friends

template<typename T = std::ostream>
std::enable_if<(Ndim==1), T & >
::type 
operator<< (std::ostream &out, VectorBase< PixelType, Ndim > const &v)
 
template<typename T = std::ostream>
std::enable_if<(Ndim > 1), T & >
::type 
operator<< (std::ostream &out, VectorBase< PixelType, Ndim > const &v)
 

Detailed Description

template<typename PixelType, unsigned int Ndim>
class iu::VectorBase< PixelType, Ndim >

Base class for N-dimensional vectors.

Constructor & Destructor Documentation

template<typename PixelType, unsigned int Ndim>
iu::VectorBase< PixelType, Ndim >::VectorBase ( )
inline

Constructor.

template<typename PixelType, unsigned int Ndim>
iu::VectorBase< PixelType, Ndim >::VectorBase ( const PixelType &  value)
inline

Special Constructor. Init all elements of the vector with a special value.

Parameters
valuevalue to initialize vector elements.
template<typename PixelType, unsigned int Ndim>
iu::VectorBase< PixelType, Ndim >::VectorBase ( std::initializer_list< PixelType >  list)
inline

Special Constructor. Init all elements of the vector with a initializer list.

Parameters
listInitializer list, e.g. {1,2,3}.
template<typename PixelType, unsigned int Ndim>
virtual iu::VectorBase< PixelType, Ndim >::~VectorBase ( )
inlinevirtual

Destructor.

Member Function Documentation

template<typename PixelType, unsigned int Ndim>
void iu::VectorBase< PixelType, Ndim >::fill ( const PixelType &  value)
inline

Fill the vector with a specific value.

template<typename PixelType, unsigned int Ndim>
static unsigned int iu::VectorBase< PixelType, Ndim >::ndim ( )
inlinestatic

Get number of dimensions.

template<typename PixelType, unsigned int Ndim>
PixelType iu::VectorBase< PixelType, Ndim >::operator[] ( unsigned int  i) const
inline

Overload [] to access the size elements.

template<typename PixelType, unsigned int Ndim>
PixelType& iu::VectorBase< PixelType, Ndim >::operator[] ( unsigned int  i)
inline

Overload [] to access the size elements.

Friends And Related Function Documentation

template<typename PixelType, unsigned int Ndim>
template<typename T = std::ostream>
std::enable_if<(Ndim == 1), T&>::type operator<< ( std::ostream &  out,
VectorBase< PixelType, Ndim > const &  v 
)
friend

Operator<< overloading for Ndim==1. Output of VectorBase class.

template<typename PixelType, unsigned int Ndim>
template<typename T = std::ostream>
std::enable_if<(Ndim > 1), T&>::type operator<< ( std::ostream &  out,
VectorBase< PixelType, Ndim > const &  v 
)
friend

Operator<< overloading for Ndim>1. Output of VectorBase class.

Field Documentation

template<typename PixelType, unsigned int Ndim>
PixelType iu::VectorBase< PixelType, Ndim >::data_[Ndim]
protected

data buffer


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