Conversions.H File Reference

#include "Util/Assert.H"
#include "Image/Image.H"
#include <vector>
Include dependency graph for Conversions.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<class T >
Image< T > vectorToImage (const std::vector< std::vector< T > > &A)
 Conversion assigment operator.
template<class T >
Image< T > vectorToImage (const std::vector< std::vector< T > * > &A)
template<class T >
Image< T > vectorToImage (const std::vector< std::vector< T * > > &A)
template<class T >
void getVector (const Image< T > &src, std::vector< std::vector< T > > *V)
 return a double nested vector that represents data (see also =operator)
template<class T >
void getVector (const Image< T > &src, std::vector< std::vector< T * > > *V)
 return a double nested vector that represents data (see also =operator)
template<class T >
void getVectorRow (const Image< T > &src, std::vector< T > *V, int row)
 return a single row of an image as a vector
template<class T >
void getVectorRow (const Image< T > &src, std::vector< T * > *V, int row)
 return a single row of an image as a vector
template<class T >
void getVectorColumn (const Image< T > &src, std::vector< T > *V, int column)
 return a single column of an image as a vector
template<class T >
void getVectorColumn (const Image< T > &src, std::vector< T * > *V, int column)
 return a single column of an image as a vector

Detailed Description

convert between Image and other types (e.g. std::vector)

Definition in file Conversions.H.


Function Documentation

template<class T >
void getVector ( const Image< T > &  src,
std::vector< std::vector< T * > > *  V 
) [inline]

return a double nested vector that represents data (see also =operator)

Definition at line 180 of file Conversions.H.

References ASSERT, Image< T >::begin(), Image< T >::getHeight(), and Image< T >::getWidth().

template<class T >
void getVector ( const Image< T > &  src,
std::vector< std::vector< T > > *  V 
) [inline]

return a double nested vector that represents data (see also =operator)

Definition at line 162 of file Conversions.H.

References ASSERT, Image< T >::begin(), Image< T >::getHeight(), and Image< T >::getWidth().

template<class T >
void getVectorColumn ( const Image< T > &  src,
std::vector< T * > *  V,
int  column 
) [inline]

return a single column of an image as a vector

Definition at line 244 of file Conversions.H.

References ASSERT, Image< T >::begin(), Image< T >::getHeight(), and Image< T >::getWidth().

template<class T >
void getVectorColumn ( const Image< T > &  src,
std::vector< T > *  V,
int  column 
) [inline]

return a single column of an image as a vector

Definition at line 229 of file Conversions.H.

References ASSERT, Image< T >::begin(), Image< T >::getHeight(), and Image< T >::getWidth().

template<class T >
void getVectorRow ( const Image< T > &  src,
std::vector< T * > *  V,
int  row 
) [inline]

return a single row of an image as a vector

Definition at line 213 of file Conversions.H.

References ASSERT, Image< T >::begin(), and Image< T >::getWidth().

template<class T >
void getVectorRow ( const Image< T > &  src,
std::vector< T > *  V,
int  row 
) [inline]

return a single row of an image as a vector

Definition at line 198 of file Conversions.H.

References ASSERT, Image< T >::begin(), and Image< T >::getWidth().

template<class T >
Image< T > vectorToImage ( const std::vector< std::vector< T > > &  A  )  [inline]

Conversion assigment operator.

e.g.:

  Image<byte> im1; std::vector im2; vectorToImage(im2, im1);

Definition at line 101 of file Conversions.H.

References NO_INIT, and Image< PixRGB< byte > >::size().

Generated on Sun May 8 08:42:41 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3