OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
LaserProfile Class Reference

#include <LaserProfile.h>

Collaboration diagram for LaserProfile:
Collaboration graph

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_histogram2dhist2d_m
 
gsl_rngrng_m
 
gsl_histogram2d_pdfpdf_m
 
Vector_t< double, 3 > centerMass_m
 
Vector_t< double, 3 > standardDeviation_m
 

Detailed Description

Definition at line 22 of file LaserProfile.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
FLIPX 
FLIPY 
ROTATE90 
ROTATE180 
ROTATE270 

Definition at line 32 of file LaserProfile.h.

Constructor & Destructor Documentation

◆ LaserProfile()

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

◆ ~LaserProfile()

LaserProfile::~LaserProfile ( )

Definition at line 74 of file LaserProfile.cpp.

References gsl_histogram2d_free(), gsl_histogram2d_pdf_free(), gsl_rng_free(), hist2d_m, pdf_m, and rng_m.

Here is the call graph for this function:

Member Function Documentation

◆ computeProfileStatistics()

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

Definition at line 249 of file LaserProfile.cpp.

References centerMass_m, sizeX_m, sizeY_m, and standardDeviation_m.

Referenced by LaserProfile().

◆ fillHistrogram()

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

Definition at line 274 of file LaserProfile.cpp.

References gsl_histogram2d_accumulate(), gsl_histogram2d_alloc(), gsl_histogram2d_set_ranges_uniform(), hist2d_m, saveHistogram(), sizeX_m, sizeY_m, and standardDeviation_m.

Referenced by LaserProfile().

Here is the call graph for this function:

◆ filterSpikes()

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

Definition at line 204 of file LaserProfile.cpp.

References sizeX_m, and sizeY_m.

Referenced by LaserProfile().

◆ flipX()

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

Definition at line 161 of file LaserProfile.cpp.

References sizeX_m, and sizeY_m.

Referenced by LaserProfile().

◆ flipY()

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

Definition at line 172 of file LaserProfile.cpp.

References sizeX_m, and sizeY_m.

Referenced by LaserProfile().

◆ getProfileMax()

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

Definition at line 379 of file LaserProfile.cpp.

References sizeX_m, and sizeY_m.

Referenced by normalizeProfileData(), and saveData().

◆ getXY()

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

Definition at line 373 of file LaserProfile.cpp.

References gsl_histogram2d_pdf_sample(), gsl_rng_uniform(), pdf_m, and rng_m.

Referenced by sampleDist().

Here is the call graph for this function:

◆ normalizeProfileData()

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

Definition at line 235 of file LaserProfile.cpp.

References getProfileMax(), sizeX_m, and sizeY_m.

Referenced by LaserProfile().

Here is the call graph for this function:

◆ printInfo()

void LaserProfile::printInfo ( )
private

Definition at line 315 of file LaserProfile.cpp.

References centerMass_m, sizeX_m, sizeY_m, and standardDeviation_m.

Referenced by LaserProfile().

◆ readFile()

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

Definition at line 80 of file LaserProfile.cpp.

References readHDF5File(), and readPGMFile().

Referenced by LaserProfile().

Here is the call graph for this function:

◆ readHDF5File()

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

Definition at line 117 of file LaserProfile.cpp.

References sizeX_m, and sizeY_m.

Referenced by readFile().

◆ readPGMFile()

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

Definition at line 100 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:

◆ sampleDist()

void LaserProfile::sampleDist ( )
private

Definition at line 358 of file LaserProfile.cpp.

References Util::combineFilePath(), OpalData::getAuxiliaryOutputDirectory(), OpalData::getInstance(), and getXY().

Referenced by LaserProfile().

Here is the call graph for this function:

◆ saveData()

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

Definition at line 333 of file LaserProfile.cpp.

References Util::combineFilePath(), OpalData::getAuxiliaryOutputDirectory(), OpalData::getInstance(), getProfileMax(), sizeX_m, and sizeY_m.

Here is the call graph for this function:

◆ saveHistogram()

void LaserProfile::saveHistogram ( )
private

Definition at line 350 of file LaserProfile.cpp.

References Util::combineFilePath(), OpalData::getAuxiliaryOutputDirectory(), OpalData::getInstance(), gsl_histogram2d_fprintf(), and hist2d_m.

Referenced by fillHistrogram(), and LaserProfile().

Here is the call graph for this function:

◆ setupRNG()

void LaserProfile::setupRNG ( )
private

◆ swapXY()

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

Definition at line 184 of file LaserProfile.cpp.

References sizeX_m, and sizeY_m.

Referenced by LaserProfile().

Member Data Documentation

◆ centerMass_m

Vector_t<double, 3> LaserProfile::centerMass_m
private

Definition at line 59 of file LaserProfile.h.

Referenced by computeProfileStatistics(), and printInfo().

◆ hist2d_m

gsl_histogram2d* LaserProfile::hist2d_m
private

Definition at line 55 of file LaserProfile.h.

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

◆ pdf_m

gsl_histogram2d_pdf* LaserProfile::pdf_m
private

Definition at line 57 of file LaserProfile.h.

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

◆ rng_m

gsl_rng* LaserProfile::rng_m
private

Definition at line 56 of file LaserProfile.h.

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

◆ sizeX_m

◆ sizeY_m

◆ standardDeviation_m

Vector_t<double, 3> LaserProfile::standardDeviation_m
private

Definition at line 60 of file LaserProfile.h.

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


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