CUV  0.9.201304091348
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | Static Public Attributes | List of all members
cuv::interleaved_image< NumChannels, __value_type, __memory_space_type > Class Template Reference

a wrapper around a tensor to provide an interleaved (e.g. More...

#include <image.hpp>

Public Types

typedef cuv::tensor
< __value_type,
__memory_space_type, row_major
tensor_type
 the type of the wrapped tensor: Row-major and strided!
typedef tensor_type::index_type index_type
 the index type
typedef tensor_type::reference_type reference_type
 the type of returned references

Public Member Functions

 interleaved_image (unsigned int h, unsigned int w, unsigned int c=1)
 construct an interleaved image based on dimensions
 interleaved_image (const interleaved_image &o)
 copy-construct an interleaved_image
index_type width () const
index_type height () const
index_type channels () const
const tensor_typetens () const
reference_type operator() (index_type i, index_type j, index_type c=0)
 element access
const reference_type operator() (index_type i, index_type j, index_type c=0) const
 const element access
interleaved_imageoperator= (const interleaved_image &o)
 assignment operator

Static Public Attributes

static const int num_channels = NumChannels

Detailed Description

template<int NumChannels, class __value_type, class __memory_space_type>
class cuv::interleaved_image< NumChannels, __value_type, __memory_space_type >

a wrapper around a tensor to provide an interleaved (e.g.

RGBRGBRGB...) image

the internal tensor is a strided tensor.

Definition at line 50 of file image.hpp.

Constructor & Destructor Documentation

template<int NumChannels, class __value_type, class __memory_space_type>
cuv::interleaved_image< NumChannels, __value_type, __memory_space_type >::interleaved_image ( unsigned int  h,
unsigned int  w,
unsigned int  c = 1 
)
inline

construct an interleaved image based on dimensions

Parameters
hheight
wwidth
cnumber of channels

Definition at line 72 of file image.hpp.

template<int NumChannels, class __value_type, class __memory_space_type>
cuv::interleaved_image< NumChannels, __value_type, __memory_space_type >::interleaved_image ( const interleaved_image< NumChannels, __value_type, __memory_space_type > &  o)
inline

copy-construct an interleaved_image

Parameters
osource image

Definition at line 82 of file image.hpp.

Member Function Documentation

template<int NumChannels, class __value_type, class __memory_space_type>
index_type cuv::interleaved_image< NumChannels, __value_type, __memory_space_type >::channels ( ) const
inline
Returns
the number of channels

Definition at line 94 of file image.hpp.

template<int NumChannels, class __value_type, class __memory_space_type>
index_type cuv::interleaved_image< NumChannels, __value_type, __memory_space_type >::height ( ) const
inline
Returns
the height of the image

Definition at line 92 of file image.hpp.

template<int NumChannels, class __value_type, class __memory_space_type>
reference_type cuv::interleaved_image< NumChannels, __value_type, __memory_space_type >::operator() ( index_type  i,
index_type  j,
index_type  c = 0 
)
inline

element access

Parameters
iindex along height
jindex along width
cindex of channel

Definition at line 107 of file image.hpp.

template<int NumChannels, class __value_type, class __memory_space_type>
const reference_type cuv::interleaved_image< NumChannels, __value_type, __memory_space_type >::operator() ( index_type  i,
index_type  j,
index_type  c = 0 
) const
inline

const element access

Parameters
iindex along height
jindex along width
cindex of channel

Definition at line 119 of file image.hpp.

template<int NumChannels, class __value_type, class __memory_space_type>
interleaved_image& cuv::interleaved_image< NumChannels, __value_type, __memory_space_type >::operator= ( const interleaved_image< NumChannels, __value_type, __memory_space_type > &  o)
inline

assignment operator

Parameters
osource image

Definition at line 129 of file image.hpp.

template<int NumChannels, class __value_type, class __memory_space_type>
const tensor_type& cuv::interleaved_image< NumChannels, __value_type, __memory_space_type >::tens ( ) const
inline
Returns
the wrapped tensor

Definition at line 97 of file image.hpp.

template<int NumChannels, class __value_type, class __memory_space_type>
index_type cuv::interleaved_image< NumChannels, __value_type, __memory_space_type >::width ( ) const
inline
Returns
the width of the image

Definition at line 90 of file image.hpp.


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