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

MPGridScan Class Reference

#include <MPGridScan.h>

List of all members.

Public Member Functions

int get_gridScanX ()
int get_gridScanY ()
 MPGridScan ()
int next (int &gridX, int &gridY, int &incr)
void UpdateVars (const int &imgWidth, const int &imgHeight, const int &downsample)

Private Attributes

double m_dh
int m_downsample
double m_dw
int m_gridScanX
int m_gridScanY
int m_imgHeight
int m_imgWidth
int m_maxSamplePoints
int m_scanHeight
int m_scanLength
int m_scanX
int m_scanY


Constructor & Destructor Documentation

MPGridScan  )  [inline]
 

Definition at line 37 of file MPGridScan.h.

00037                      {
00038                 m_downsample = 1;//DOWNSAMPLE;
00039                 m_scanX = 0;
00040                 m_scanY = 0;
00041         }


Member Function Documentation

int get_gridScanX  )  [inline]
 

Definition at line 56 of file MPGridScan.h.

00056                                    {
00057                 return m_gridScanX;
00058         }

int get_gridScanY  )  [inline]
 

Definition at line 60 of file MPGridScan.h.

00060                                    {
00061                 return m_gridScanY;
00062         }

int next int &  gridX,
int &  gridY,
int &  incr
[inline]
 

Definition at line 64 of file MPGridScan.h.

00064                                                            {
00065                 static int iPixel = 0;
00066                 if (iPixel == m_maxSamplePoints) {
00067                         iPixel = 0;
00068                         return (0);
00069                 }
00070                 static const float oneoverdiv = 1.0/m_gridScanX;
00071                 gridY = (int)( iPixel * oneoverdiv );
00072                 gridX = (int)( iPixel % m_gridScanX );
00073                 int yCoord = m_scanY + m_dh*gridY;
00074                 int xCoord = m_scanX + m_dw*gridX;
00075                 incr = m_imgWidth * yCoord + xCoord;
00076                 iPixel++;
00077                 return (1);
00078         }

void UpdateVars const int &  imgWidth,
const int &  imgHeight,
const int &  downsample
[inline]
 

Definition at line 43 of file MPGridScan.h.

00043                                                                                                     {
00044                 m_downsample = downsample;
00045                 m_imgWidth = imgWidth;
00046                 m_imgHeight = imgHeight;
00047                 m_gridScanX = m_imgWidth / m_downsample;
00048                 m_gridScanY = m_imgHeight / m_downsample;
00049                 m_maxSamplePoints = m_gridScanX*m_gridScanY;
00050                 m_scanLength = m_imgWidth;
00051                 m_scanHeight = m_imgHeight;
00052                 m_dh = m_downsample; // (double) m_scanHeight/m_gridScanY;
00053                 m_dw = m_downsample; // (double) m_scanLength/m_gridScanX;
00054         }


Member Data Documentation

double m_dh [private]
 

Definition at line 33 of file MPGridScan.h.

int m_downsample [private]
 

Definition at line 23 of file MPGridScan.h.

double m_dw [private]
 

Definition at line 34 of file MPGridScan.h.

int m_gridScanX [private]
 

Definition at line 24 of file MPGridScan.h.

int m_gridScanY [private]
 

Definition at line 25 of file MPGridScan.h.

int m_imgHeight [private]
 

Definition at line 32 of file MPGridScan.h.

int m_imgWidth [private]
 

Definition at line 31 of file MPGridScan.h.

int m_maxSamplePoints [private]
 

Definition at line 26 of file MPGridScan.h.

int m_scanHeight [private]
 

Definition at line 30 of file MPGridScan.h.

int m_scanLength [private]
 

Definition at line 29 of file MPGridScan.h.

int m_scanX [private]
 

Definition at line 27 of file MPGridScan.h.

int m_scanY [private]
 

Definition at line 28 of file MPGridScan.h.


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