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

RImage Class Template Reference

#include <rimage.h>

Inheritance diagram for RImage:

Inheritance graph
[legend]
List of all members.

Public Member Functions

void deleteArray ()
void deleteArray ()
void deleteArray ()
void deleteArray ()
virtual T getPixel (const int index) const
virtual T getPixel (const int x, const int y) const
virtual T getPixel (const int index) const
virtual T getPixel (const int x, const int y) const
virtual T getPixel (const int index) const
virtual T getPixel (const int x, const int y) const
virtual T getPixel (const int index) const
virtual T getPixel (const int x, const int y) const
void print (const int m) const
void print () const
void print (const int m) const
void print () const
void print (const int m) const
void print () const
void print (const int m) const
void print () const
 RImage ()
 RImage (const RImage &other)
 RImage (const int, const int, T)
 RImage (const int, const int)
 RImage (const T *array, const int, const int)
 RImage ()
 RImage (const RImage &other)
 RImage (const int, const int, T)
 RImage (const int, const int)
 RImage (const T *array, const int, const int)
 RImage ()
 RImage (const RImage &other)
 RImage (const int, const int, T)
 RImage (const int, const int)
 RImage (const T *array, const int, const int)
 RImage ()
 RImage (const RImage &other)
 RImage (const int, const int, T)
 RImage (const int, const int)
 RImage (const T *array, const int, const int)
void setPixel (const int index, const T &value)
void setPixel (const int x, const int y, const T &value)
void setPixel (const int index, const T &value)
void setPixel (const int x, const int y, const T &value)
void setPixel (const int index, const T &value)
void setPixel (const int x, const int y, const T &value)
void setPixel (const int index, const T &value)
void setPixel (const int x, const int y, const T &value)
void setSize (const int width_, const int height_)
void setSize (const int width_, const int height_)
void setSize (const int width_, const int height_)
void setSize (const int width_, const int height_)
virtual ~RImage ()
virtual ~RImage ()
virtual ~RImage ()
virtual ~RImage ()

Public Attributes

T * array
T * array
T * array
T * array
int height
int my_memory
 my_memory keeps track of use of the image.
int numpixels
int width

template<class T>
class RImage< T >


Constructor & Destructor Documentation

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

Definition at line 78 of file mac/build/mpisearch.framework/Headers/rimage.h.

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

00079 {
00080   width = width_;
00081   height = height_;
00082   numpixels = width * height;
00083   array = const_cast<T *>(array_);
00084   my_memory = 0;
00085 }

RImage const   int,
const   int
[inline]
 

Definition at line 88 of file mac/build/mpisearch.framework/Headers/rimage.h.

References setSize().

00089 {
00090         setSize(width_,height_);
00091 }

Here is the call graph for this function:

RImage const   int,
const   int,
[inline]
 

Definition at line 94 of file mac/build/mpisearch.framework/Headers/rimage.h.

References setSize(), and y.

00095 {
00096     setSize(width_,height_);
00097     T *ptr = array;
00098     for(int y=0; y <height_; y++)
00099       for(int x=0; x <width_; x++)      
00100            *(ptr++) = val; 
00101 }

Here is the call graph for this function:

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

Definition at line 43 of file mac/build/mpisearch.framework/Headers/rimage.h.

00043                                     {
00044                 width = other.width;
00045                 height = other.height;
00046                 numpixels = other.numpixels;
00047                 array = other.array;
00048         }

RImage  )  [inline]
 

Definition at line 49 of file mac/build/mpisearch.framework/Headers/rimage.h.

00049 {};

~RImage  )  [inline, virtual]
 

Definition at line 104 of file mac/build/mpisearch.framework/Headers/rimage.h.

00105 {
00106   if(my_memory){
00107     //cout << "RImage::~RImage(): deleting" << endl;
00108     delete [] array;
00109   }
00110 }

RImage const T *  array,
const   int,
const   int
 

RImage const   int,
const   int
 

RImage const   int,
const   int,
 

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

Definition at line 43 of file mac/build/mpisearch.framework/Versions/A/Headers/rimage.h.

00043                                     {
00044                 width = other.width;
00045                 height = other.height;
00046                 numpixels = other.numpixels;
00047                 array = other.array;
00048         }

RImage  )  [inline]
 

Definition at line 49 of file mac/build/mpisearch.framework/Versions/A/Headers/rimage.h.

00049 {};

virtual ~RImage  )  [virtual]
 

RImage const T *  array,
const   int,
const   int
 

RImage const   int,
const   int
 

RImage const   int,
const   int,
 

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

Definition at line 43 of file mac/build/mpisearch.framework/Versions/Current/Headers/rimage.h.

00043                                     {
00044                 width = other.width;
00045                 height = other.height;
00046                 numpixels = other.numpixels;
00047                 array = other.array;
00048         }

RImage  )  [inline]
 

Definition at line 49 of file mac/build/mpisearch.framework/Versions/Current/Headers/rimage.h.

00049 {};

virtual ~RImage  )  [virtual]
 

RImage const T *  array,
const   int,
const   int
 

RImage const   int,
const   int
 

RImage const   int,
const   int,
 

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

Definition at line 43 of file src/rimage.h.

00043                                 {
00044       width = other.width;
00045       height = other.height;
00046       numpixels = other.numpixels;
00047       array = other.array;
00048     }

RImage  )  [inline]
 

Definition at line 49 of file src/rimage.h.

00049 {};

virtual ~RImage  )  [virtual]
 


Member Function Documentation

void deleteArray  )  [inline]
 

Definition at line 63 of file src/rimage.h.

00063                              {
00064       delete [] array;
00065     }

void deleteArray  )  [inline]
 

Definition at line 58 of file mac/build/mpisearch.framework/Versions/Current/Headers/rimage.h.

00058                                  {
00059                 delete [] array;
00060         }

void deleteArray  )  [inline]
 

Definition at line 58 of file mac/build/mpisearch.framework/Versions/A/Headers/rimage.h.

00058                                  {
00059                 delete [] array;
00060         }

void deleteArray  )  [inline]
 

Definition at line 58 of file mac/build/mpisearch.framework/Headers/rimage.h.

00058                                  {
00059                 delete [] array;
00060         }

virtual T getPixel const int  index  )  const [virtual]
 

Reimplemented in RIntegral, RIntegral, RIntegral, and RIntegral.

virtual T getPixel const int  x,
const int  y
const [virtual]
 

Reimplemented in FFImage, RIntegral, RIntegral, RIntegral, RIntegral, and FFImage.

virtual T getPixel const int  index  )  const [virtual]
 

Reimplemented in RIntegral, RIntegral, RIntegral, and RIntegral.

virtual T getPixel const int  x,
const int  y
const [virtual]
 

Reimplemented in FFImage, RIntegral, RIntegral, RIntegral, RIntegral, and FFImage.

virtual T getPixel const int  index  )  const [virtual]
 

Reimplemented in RIntegral, RIntegral, RIntegral, and RIntegral.

virtual T getPixel const int  x,
const int  y
const [virtual]
 

Reimplemented in FFImage, RIntegral, RIntegral, RIntegral, RIntegral, and FFImage.

T getPixel const int  index  )  const [inline, virtual]
 

Reimplemented in RIntegral, RIntegral, RIntegral, and RIntegral.

Definition at line 126 of file mac/build/mpisearch.framework/Headers/rimage.h.

References array.

00127 {
00128   if((index >= 0) && (index < numpixels ))
00129     return array[index];
00130   else
00131 #ifdef WIN32
00132         return array[0];
00133 #else
00134     return 0;
00135 #endif
00136 }

T getPixel const int  x,
const int  y
const [inline, virtual]
 

Reimplemented in FFImage, RIntegral, RIntegral, RIntegral, RIntegral, and FFImage.

Definition at line 113 of file mac/build/mpisearch.framework/Headers/rimage.h.

References array, width, and y.

Referenced by MPBlink::get_eyes(), RIntegral::integrate(), and print().

00114 {
00115   if(x >= 0 && y >= 0 && x < width && y < height)
00116     return array[width * y + x]; 
00117   else 
00118 #ifdef WIN32
00119         return array[0];
00120 #else
00121     return 0;
00122 #endif
00123 }

void print const int  m  )  const
 

void print  )  const
 

void print const int  m  )  const
 

void print  )  const
 

void print const int  m  )  const
 

void print  )  const
 

void print const int  m  )  const
 

Definition at line 164 of file mac/build/mpisearch.framework/Headers/rimage.h.

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

00165 {
00166   for(int y = 0; y < min(m,height); y++) {
00167     for(int x = 0; x < min(m,width); x++) {
00168       cout << getPixel(x,y) << " ";
00169     }
00170     cout << endl;
00171   }
00172 }

Here is the call graph for this function:

void print  )  const
 

Definition at line 153 of file mac/build/mpisearch.framework/Headers/rimage.h.

References getPixel(), and y.

00154 {
00155   for(int y = 0; y < height; y++) {
00156     for(int x = 0; x < width; x++) {
00157       cout << getPixel(x,y) << " ";
00158     }
00159     cout << endl;
00160   }
00161 }

Here is the call graph for this function:

void setPixel const int  index,
const T &  value
 

void setPixel const int  x,
const int  y,
const T &  value
 

void setPixel const int  index,
const T &  value
 

void setPixel const int  x,
const int  y,
const T &  value
 

void setPixel const int  index,
const T &  value
 

void setPixel const int  x,
const int  y,
const T &  value
 

void setPixel const int  index,
const T &  value
[inline]
 

Definition at line 146 of file mac/build/mpisearch.framework/Headers/rimage.h.

References array.

00147 {
00148   if((index >= 0) && (index < numpixels ))
00149     array[index] = value;
00150 }

void setPixel const int  x,
const int  y,
const T &  value
[inline]
 

Definition at line 139 of file mac/build/mpisearch.framework/Headers/rimage.h.

References array, width, and y.

Referenced by cvHistWrapper::update_back_project().

00140 {
00141   if(x >= 0 && y >= 0 && x < width && y < height)
00142     array[width * y + x] = value;
00143 }

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

Reimplemented in FFImage.

Definition at line 50 of file src/rimage.h.

00050                                                             {
00051       width = width_;
00052       height = height_;
00053       numpixels = width * height;
00054       array = new T[numpixels];
00055       my_memory = 1;
00056       // keeps track of use of the image. The destructor will only
00057       //erase the image if my_memory == 0
00058       
00059       //  cout << "RImage<T>:
00060       //allocated RImage with width = " << width << " height = " <<
00061       //height << endl;
00062     }

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

Reimplemented in FFImage.

Definition at line 50 of file mac/build/mpisearch.framework/Versions/Current/Headers/rimage.h.

00050                                                             {
00051       width = width_;
00052       height = height_;
00053       numpixels = width * height;
00054       array = new T[numpixels];
00055       my_memory = 1;
00056       //cout << "RImage<T>: allocated RImage with width = " << width << " height = " << height << endl;
00057     }

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

Reimplemented in FFImage.

Definition at line 50 of file mac/build/mpisearch.framework/Versions/A/Headers/rimage.h.

00050                                                             {
00051       width = width_;
00052       height = height_;
00053       numpixels = width * height;
00054       array = new T[numpixels];
00055       my_memory = 1;
00056       //cout << "RImage<T>: allocated RImage with width = " << width << " height = " << height << endl;
00057     }

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

Reimplemented in FFImage.

Definition at line 50 of file mac/build/mpisearch.framework/Headers/rimage.h.

Referenced by MPColorTracker::DoSearch(), FindFacesInGWorld::InitializeStreamWithWidth:Height:, RImage(), RIntegral::RIntegral(), FilterInterface::runInterface(), and cvHistWrapper::update_back_project().

00050                                                             {
00051       width = width_;
00052       height = height_;
00053       numpixels = width * height;
00054       array = new T[numpixels];
00055       my_memory = 1;
00056       //cout << "RImage<T>: allocated RImage with width = " << width << " height = " << height << endl;
00057     }


Member Data Documentation

T* array
 

Definition at line 74 of file src/rimage.h.

T* array
 

Definition at line 69 of file mac/build/mpisearch.framework/Versions/Current/Headers/rimage.h.

T* array
 

Definition at line 69 of file mac/build/mpisearch.framework/Versions/A/Headers/rimage.h.

T* array
 

Definition at line 69 of file mac/build/mpisearch.framework/Headers/rimage.h.

Referenced by SingleShotColorSearch::displayResults(), MPColorTracker::DoSearch(), MPColorTools::DrawRGBBox(), FindFacesInGWorld::FindFaces:, MPBlink::get_eyes(), getPixel(), GreyScaleFlipVideo(), FilterInterface::GreyScaleFlipVideo(), RIntegral::integrate(), MPISearchObjectDetector::integrateImages(), mexFunction(), MPColorTracker::MPIUpdate(), RImage(), RImage< RGBTRIPLE >::RImage(), SingleShotColorSearch::Search(), setPixel(), MPColorTracker::ShowProbs(), SingleShotColorSearch::SingleShotColorSearch(), and MPColorTracker::WriteBitmap().

int height
 

Definition at line 77 of file src/rimage.h.

Referenced by SingleShotColorSearch::displayResults(), MPColorTracker::DoSearch(), MPColorTools::DrawRGBBox(), MPBlink::findBlinks(), sampleGrabber::grab(), mexFunction(), MPColorTracker::MPIUpdate(), print(), ProbColorSearch::probSearch(), RImage(), RImage< RGBTRIPLE >::RImage(), RIntegral::RIntegral(), MPISearchThread::Search(), MPISearchObjectDetector::search(), SingleShotColorSearch::Search(), MPColorTracker::ShowProbs(), SingleShotColorSearch::SingleShotColorSearch(), cvHistWrapper::update_back_project(), and MPColorTracker::WriteBitmap().

int my_memory
 

my_memory keeps track of use of the image.

The destructor will only erase the image if my_memory == 0

Definition at line 82 of file src/rimage.h.

Referenced by RImage().

int numpixels
 

Definition at line 78 of file src/rimage.h.

Referenced by RImage(), and RImage< RGBTRIPLE >::RImage().

int width
 

Definition at line 76 of file src/rimage.h.

Referenced by SingleShotColorSearch::displayResults(), MPColorTracker::DoSearch(), MPColorTools::DrawRGBBox(), MPBlink::findBlinks(), getPixel(), sampleGrabber::grab(), RIntegral::integrate(), MPISearchObjectDetector::integrateImages(), mexFunction(), MPColorTracker::MPIUpdate(), print(), ProbColorSearch::probSearch(), RImage(), RImage< RGBTRIPLE >::RImage(), RIntegral::RIntegral(), MPISearchThread::Search(), MPISearchObjectDetector::search(), SingleShotColorSearch::Search(), setPixel(), MPColorTracker::ShowProbs(), SingleShotColorSearch::SingleShotColorSearch(), cvHistWrapper::update_back_project(), and MPColorTracker::WriteBitmap().


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