The Machine Perception Toolbox

[Introduction]- [News]- [Download]- [Screenshots]- [Manual (pdf)]- [Forums]- [API Reference]- [Repository ]

 

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

TImage Class Template Reference

#include <integralimage.h>

Inheritance diagram for TImage:

Inheritance graph
[legend]
List of all members.

Public Member Functions

void deleteArray ()
virtual T * getArray ()
void print (const int m) const
void print () const
void setSize (const int width_, const int height_)
 TImage ()
 TImage (const TImage &other)
 TImage (const int, const int, T)
 TImage (const int, const int)
 TImage (const T *array, const int, const int)
virtual ~TImage ()

Protected Attributes

T * array
int height
int my_memory
int numpixels
int width

template<class T>
class TImage< T >


Constructor & Destructor Documentation

TImage const T *  array,
const   int,
const   int
[inline]
 

Definition at line 62 of file integralimage.h.

References array, height, my_memory, numpixels, and width.

00063 {
00064         width = width_;
00065         height = height_;
00066         numpixels = width * height;
00067         array = const_cast<T *>(array_);
00068         my_memory = 0;
00069 }

TImage const   int,
const   int
[inline]
 

Definition at line 74 of file integralimage.h.

References setSize().

00075 {
00076         setSize(width_,height_);
00077 }

Here is the call graph for this function:

TImage const   int,
const   int,
[inline]
 

Definition at line 82 of file integralimage.h.

References setSize(), and y.

00083 {
00084         setSize(width_,height_);
00085         T *ptr = array;
00086         for(int y=0; y <height_; y++)
00087                 for(int x=0; x <width_; x++)    
00088                         *(ptr++) = val; 
00089 }

Here is the call graph for this function:

TImage const TImage< T > &  other  )  [inline]
 

Definition at line 32 of file integralimage.h.

00032                                     {
00033                 width = other.width;
00034                 height = other.height;
00035                 numpixels = other.numpixels;
00036                 array = other.array;
00037         }

TImage  )  [inline]
 

Definition at line 38 of file integralimage.h.

00038 {};

~TImage  )  [inline, virtual]
 

Definition at line 94 of file integralimage.h.

00095 {
00096         if(my_memory)
00097                 delete [] array;
00098 }


Member Function Documentation

void deleteArray  )  [inline]
 

Definition at line 47 of file integralimage.h.

00047                                  {
00048                 delete [] array;
00049         }

virtual T* getArray  )  [inline, virtual]
 

Definition at line 53 of file integralimage.h.

Referenced by HypothesesPerScale::makezero(), MPColorFeatSearch::searchFeature(), and TIntegral< double >::setToMinLog().

00053 {return array;}

void print const int  m  )  const
 

Definition at line 116 of file integralimage.h.

References height, m, min(), width, and y.

00117 {
00118         for(int y = 0; y < min(m,height); y++) {
00119                 for(int x = 0; x < min(m,width); x++) {
00120                         cout << getPixel(x,y) << " ";
00121                 }
00122                 cout << endl;
00123         }
00124 }

Here is the call graph for this function:

void print  )  const
 

Definition at line 103 of file integralimage.h.

References y.

00104 {
00105         for(int y = 0; y < height; y++) {
00106                 for(int x = 0; x < width; x++) {
00107                         cout << getPixel(x,y) << " ";
00108                 }
00109                 cout << endl;
00110         }
00111 }

void setSize const int  width_,
const int  height_
[inline]
 

Reimplemented in TIntegral, and TIntegral< double >.

Definition at line 39 of file integralimage.h.

Referenced by TIntegral< double >::setSize(), and TImage().

00039                                                                 {
00040                 width = width_;
00041                 height = height_;
00042                 numpixels = width * height;
00043                 array = new T[numpixels];
00044                 memset(array,0,sizeof(T)*numpixels);
00045                 my_memory = 1;
00046         }


Member Data Documentation

T* array [protected]
 

Definition at line 22 of file integralimage.h.

Referenced by TImage(), and TImage< double >::TImage().

int height [protected]
 

Definition at line 24 of file integralimage.h.

Referenced by print(), TImage(), and TImage< double >::TImage().

int my_memory [protected]
 

Definition at line 26 of file integralimage.h.

Referenced by TImage().

int numpixels [protected]
 

Definition at line 25 of file integralimage.h.

Referenced by TImage(), and TImage< double >::TImage().

int width [protected]
 

Definition at line 23 of file integralimage.h.

Referenced by print(), TImage(), and TImage< double >::TImage().


The documentation for this class was generated from the following file:
Generated on Mon Nov 8 17:08:42 2004 for MPT by  doxygen 1.3.9.1