OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
LaserProfile Class Reference

#include <LaserProfile.h>

Collaboration diagram for LaserProfile:
Collaboration graph
[legend]

Public Types

enum  {
  FLIPX = 1, FLIPY = 2, ROTATE90 = 4, ROTATE180 = 8,
  ROTATE270 = 16
}
 

Public Member Functions

 LaserProfile (const std::string &fileName, const std::string &imageName, double intensityCut, short flags)
 
 ~LaserProfile ()
 
void getXY (double &x, double &y)
 

Private Member Functions

unsigned short * readFile (const std::string &fileName, const std::string &imageName)
 
unsigned short * readPGMFile (const std::string &fileName)
 
unsigned short * readHDF5File (const std::string &fileName, const std::string &imageName)
 
void flipX (unsigned short *image)
 
void flipY (unsigned short *image)
 
void swapXY (unsigned short *image)
 
void filterSpikes (unsigned short *image)
 
void normalizeProfileData (double intensityCut, unsigned short *image)
 
void computeProfileStatistics (unsigned short *image)
 
void fillHistrogram (unsigned short *image)
 
void setupRNG ()
 
void printInfo ()
 
void saveData (const std::string &fname, unsigned short *image)
 
void saveHistogram ()
 
void sampleDist ()
 
unsigned short getProfileMax (unsigned short *image)
 

Private Attributes

hsize_t sizeX_m
 
hsize_t sizeY_m
 
gsl_histogram2d * hist2d_m
 
gsl_rng * rng_m
 
gsl_histogram2d_pdf * pdf_m
 
Vector_t centerMass_m
 
Vector_t standardDeviation_m
 

Detailed Description

Definition at line 23 of file LaserProfile.h.

Member Enumeration Documentation

anonymous enum
Enumerator
FLIPX 
FLIPY 
ROTATE90 
ROTATE180 
ROTATE270 

Definition at line 35 of file LaserProfile.h.

Constructor & Destructor Documentation

LaserProfile::LaserProfile ( const std::string &  fileName,
const std::string &  imageName,
double  intensityCut,
short  flags 
)
LaserProfile::~LaserProfile ( )

Definition at line 76 of file LaserProfile.cpp.

References hist2d_m, pdf_m, and rng_m.

Member Function Documentation

void LaserProfile::computeProfileStatistics ( unsigned short *  image)
private

Definition at line 257 of file LaserProfile.cpp.

References centerMass_m, sizeX_m, sizeY_m, sqrt(), and standardDeviation_m.

Referenced by LaserProfile().

Here is the call graph for this function:

void LaserProfile::fillHistrogram ( unsigned short *  image)
private

Definition at line 282 of file LaserProfile.cpp.

References hist2d_m, saveHistogram(), sizeX_m, sizeY_m, and standardDeviation_m.

Referenced by LaserProfile().

Here is the call graph for this function:

void LaserProfile::filterSpikes ( unsigned short *  image)
private

Definition at line 211 of file LaserProfile.cpp.

References sizeX_m, and sizeY_m.

Referenced by LaserProfile().

void LaserProfile::flipX ( unsigned short *  image)
private

Definition at line 166 of file LaserProfile.cpp.

References sizeX_m, and sizeY_m.

Referenced by LaserProfile().

void LaserProfile::flipY ( unsigned short *  image)
private

Definition at line 178 of file LaserProfile.cpp.

References sizeX_m, and sizeY_m.

Referenced by LaserProfile().

unsigned short LaserProfile::getProfileMax ( unsigned short *  image)
private

Definition at line 374 of file LaserProfile.cpp.

References sizeX_m, and sizeY_m.

Referenced by normalizeProfileData(), and saveData().

void LaserProfile::getXY ( double &  x,
double &  y 
)

Definition at line 368 of file LaserProfile.cpp.

References pdf_m, and rng_m.

Referenced by Distribution::generateFlattopLaserProfile(), and sampleDist().

void LaserProfile::normalizeProfileData ( double  intensityCut,
unsigned short *  image 
)
private

Definition at line 243 of file LaserProfile.cpp.

References floor(), getProfileMax(), max(), sizeX_m, and sizeY_m.

Referenced by LaserProfile().

Here is the call graph for this function:

void LaserProfile::printInfo ( )
private

Definition at line 327 of file LaserProfile.cpp.

References centerMass_m, endl(), INFOMSG, level3(), sizeX_m, sizeY_m, and standardDeviation_m.

Referenced by LaserProfile().

Here is the call graph for this function:

unsigned short * LaserProfile::readFile ( const std::string &  fileName,
const std::string &  imageName 
)
private

Definition at line 82 of file LaserProfile.cpp.

References Hypervolume::fs, readHDF5File(), and readPGMFile().

Referenced by LaserProfile().

Here is the call graph for this function:

unsigned short * LaserProfile::readHDF5File ( const std::string &  fileName,
const std::string &  imageName 
)
private

Definition at line 120 of file LaserProfile.cpp.

References sizeX_m, and sizeY_m.

Referenced by readFile().

unsigned short * LaserProfile::readPGMFile ( const std::string &  fileName)
private

Definition at line 103 of file LaserProfile.cpp.

References PortableGraymapReader::getHeight(), PortableGraymapReader::getPixel(), PortableGraymapReader::getWidth(), sizeX_m, and sizeY_m.

Referenced by readFile().

Here is the call graph for this function:

void LaserProfile::sampleDist ( )
private

Definition at line 356 of file LaserProfile.cpp.

References getXY().

Referenced by LaserProfile().

Here is the call graph for this function:

void LaserProfile::saveData ( const std::string &  fname,
unsigned short *  image 
)
private

Definition at line 336 of file LaserProfile.cpp.

References endl(), getProfileMax(), sizeX_m, and sizeY_m.

Here is the call graph for this function:

void LaserProfile::saveHistogram ( )
private

Definition at line 350 of file LaserProfile.cpp.

References hist2d_m.

Referenced by fillHistrogram(), and LaserProfile().

void LaserProfile::setupRNG ( )
private

Definition at line 315 of file LaserProfile.cpp.

References hist2d_m, pdf_m, rng_m, and T.

Referenced by LaserProfile().

void LaserProfile::swapXY ( unsigned short *  image)
private

Definition at line 191 of file LaserProfile.cpp.

References sizeX_m, and sizeY_m.

Referenced by LaserProfile().

Member Data Documentation

Vector_t LaserProfile::centerMass_m
private

Definition at line 67 of file LaserProfile.h.

Referenced by computeProfileStatistics(), and printInfo().

gsl_histogram2d* LaserProfile::hist2d_m
private

Definition at line 63 of file LaserProfile.h.

Referenced by fillHistrogram(), saveHistogram(), setupRNG(), and ~LaserProfile().

gsl_histogram2d_pdf* LaserProfile::pdf_m
private

Definition at line 65 of file LaserProfile.h.

Referenced by getXY(), setupRNG(), and ~LaserProfile().

gsl_rng* LaserProfile::rng_m
private

Definition at line 64 of file LaserProfile.h.

Referenced by getXY(), setupRNG(), and ~LaserProfile().

hsize_t LaserProfile::sizeX_m
private
hsize_t LaserProfile::sizeY_m
private
Vector_t LaserProfile::standardDeviation_m
private

Definition at line 68 of file LaserProfile.h.

Referenced by computeProfileStatistics(), fillHistrogram(), and printInfo().


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