CFEL - ASG Software Suite  2.5.0
CASS
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
cass::pp300 Class Reference

Single particle hit. More...

#include <hitrate.h>

+ Inheritance diagram for cass::pp300:
+ Collaboration diagram for cass::pp300:

Public Member Functions

 pp300 (const name_t &)
 constructor More...
 
virtual ~pp300 ()
 virtual destructor More...
 
virtual void process (const CASSEvent &, result_t &)
 check if image specified in settings contains a single particle hit More...
 
virtual void loadSettings (size_t)
 load the settings for this pp More...
 
- Public Member Functions inherited from cass::Processor
 Processor (const name_t &name)
 constructor More...
 
virtual ~Processor ()
 virtual destructor More...
 
virtual void processEvent (const CASSEvent &event)
 process the event More...
 
virtual const result_tresult (const CASSEvent::id_t eventid=0)
 retrieve a result for a given id. More...
 
virtual void releaseEvent (const CASSEvent &event)
 tell the list that the result for event can be overwritten More...
 
result_t::shared_pointer resultCopy (const uint64_t eventid)
 retrieve histogram for id More...
 
virtual void load ()
 load the general settings More...
 
virtual void aboutToQuit ()
 function that will be called when the processor is about to be deleted More...
 
const names_tdependencies ()
 Define all processors keys a processor depends on. More...
 
void clearDependencies ()
 clear the dependenies More...
 
void clearHistograms ()
 clear the histograms More...
 
const name_t name () const
 retrieve the name of this processor More...
 
bool hide () const
 retrieve the hide flag of this processor More...
 
const std::string & comment () const
 retrieve the comment of this processor More...
 

Protected Types

typedef vigra::Matrix< double > matrixType
 

Protected Member Functions

void trainingFinished ()
 
void startNewTraining ()
 
void readTrainingMatrices ()
 
void saveTrainingMatrices ()
 
void printTrainingMatrices ()
 
virtual void clearHistogramEvent ()
 
virtual void processCommand (std::string command)
 process command in pp More...
 
- Protected Member Functions inherited from cass::Processor
virtual void createHistList (result_t::shared_pointer result)
 create result list. More...
 
void setupGeneral ()
 general setup of the processor More...
 
bool setupCondition (bool defaultConditionType=true)
 setup the condition. More...
 
shared_pointer setupDependency (const std::string &depVarName, const name_t &name="")
 setup the dependecy. More...
 

Protected Attributes

int _xstart
 xstart - ROI for calculations More...
 
int _ystart
 ystart - ROI for calculations More...
 
int _xend
 xend - ROI for calculations More...
 
int _yend
 yend - ROI for calculations More...
 
shared_pointer _pHist
 the histogram to work on More...
 
int _nTrainingSetSize
 
int _nFeatures
 
int _saveTraining
 user setting: do (default) or don't save training matrices to file More...
 
int _readTraining
 if filename is given in settings, load instead of calculate More...
 
std::string _trainingFile
 optional user-setting: filename to read training from More...
 
matrixType _variationFeatures
 
matrixType _mean
 
matrixType _cov
 
matrixType _covI
 
int _trainingSetsInserted
 
int _reTrain
 
QMutex _mutex
 mutex to lock the processing part since only one can be processed at a time More...
 
- Protected Attributes inherited from cass::Processor
const name_t _name
 the processors name More...
 
bool _hide
 flag to tell whether this pp should be hidden in the dropdown list More...
 
std::string _comment
 optional comment that one can add to a processor. More...
 
CachedList _resultList
 the list of results More...
 
names_t _dependencies
 the list of dependencies More...
 
shared_pointer _condition
 pointer to the processor that will contain the condition More...
 

Additional Inherited Members

- Public Types inherited from cass::Processor
typedef std::tr1::shared_ptr< Processorshared_pointer
 a shared pointer of this More...
 
typedef std::string name_t
 define the name type More...
 
typedef std::list< name_tnames_t
 define the list of names More...
 
typedef CachedList::item_type result_t
 define the results More...
 
typedef CachedList::item_sp resultsp_t
 define the shared pointer to the result More...
 

Detailed Description

Single particle hit.

Available PostProcessors:
"300": detect Single Particle hits.
See also
Processor for a list of all commonly available cass.ini settings.
User definable Parameters:

Processor/%name%/{ImageName}
processor name containing the histogram in which hits should be detected.

Processor/%name%/{xstart}
ROI for calculations. First pixel = 0 (default).

Processor/%name%/{ystart}
ROI for calculations. First pixel = 0 (default).

Processor/%name%/{xend}
ROI for calculations. Last pixel = -1 (default).

Processor/%name%/{yend}
ROI for calculations. Last pixel = -1 (default).

Processor/%name%/{TrainingSetSize}
How many images should be included in training phase. default = 200.

Processor/%name%/{saveTraining}
optional. If true (default), save Training matrices to files with automaic names in currend directory.

Processor/%name%/{readTrainingFile}
optional filename to read training matrices from. If setting doesn't exist, training is not read but calculated on "loadSettings".

(good ROI for single particle in pnCCD images: xstart=402;xend=485; ystart=402;yend=485;

Author
Stephan Kassemeyer

Definition at line 55 of file hitrate.h.

Member Typedef Documentation

typedef vigra::Matrix<double> cass::pp300::matrixType
protected

Definition at line 109 of file hitrate.h.

Constructor & Destructor Documentation

pp300::pp300 ( const name_t name)

constructor

Definition at line 26 of file hitrate.cpp.

References loadSettings().

pp300::~pp300 ( )
virtual

virtual destructor

Definition at line 32 of file hitrate.cpp.

Member Function Documentation

void pp300::clearHistogramEvent ( )
protectedvirtual

Definition at line 153 of file hitrate.cpp.

References startNewTraining().

void pp300::loadSettings ( size_t  )
virtual
void pp300::printTrainingMatrices ( )
protected

Definition at line 77 of file hitrate.cpp.

References _covI, and _mean.

Referenced by loadSettings(), and process().

void pp300::process ( const CASSEvent evt,
result_t result 
)
virtual
void pp300::processCommand ( std::string  command)
protectedvirtual

process command in pp

overwrite this function in pp. can do whatever it wants to do as a reaction on command.

Parameters
commandthe command string transmitted

Reimplemented from cass::Processor.

Definition at line 159 of file hitrate.cpp.

References saveTrainingMatrices(), and startNewTraining().

void pp300::readTrainingMatrices ( )
protected

Definition at line 48 of file hitrate.cpp.

References _covI, _mean, and _trainingFile.

Referenced by loadSettings().

void pp300::saveTrainingMatrices ( )
protected

Definition at line 56 of file hitrate.cpp.

References _covI, _mean, and cass::ACQIRIS::time.

Referenced by process(), and processCommand().

void pp300::startNewTraining ( )
protected

Definition at line 42 of file hitrate.cpp.

References _reTrain, and _trainingSetsInserted.

Referenced by clearHistogramEvent(), loadSettings(), process(), and processCommand().

void pp300::trainingFinished ( )
protected

Definition at line 36 of file hitrate.cpp.

References _nTrainingSetSize, _reTrain, and _trainingSetsInserted.

Referenced by loadSettings().

Member Data Documentation

matrixType cass::pp300::_cov
protected

Definition at line 126 of file hitrate.h.

Referenced by loadSettings(), and process().

matrixType cass::pp300::_covI
protected
matrixType cass::pp300::_mean
protected
QMutex cass::pp300::_mutex
protected

mutex to lock the processing part since only one can be processed at a time

Definition at line 132 of file hitrate.h.

Referenced by process().

int cass::pp300::_nFeatures
protected

Definition at line 112 of file hitrate.h.

Referenced by loadSettings(), and process().

int cass::pp300::_nTrainingSetSize
protected

Definition at line 111 of file hitrate.h.

Referenced by loadSettings(), process(), and trainingFinished().

shared_pointer cass::pp300::_pHist
protected

the histogram to work on

Definition at line 106 of file hitrate.h.

Referenced by loadSettings(), and process().

int cass::pp300::_readTraining
protected

if filename is given in settings, load instead of calculate

Definition at line 118 of file hitrate.h.

Referenced by loadSettings().

int cass::pp300::_reTrain
protected

Definition at line 129 of file hitrate.h.

Referenced by process(), startNewTraining(), and trainingFinished().

int cass::pp300::_saveTraining
protected

user setting: do (default) or don't save training matrices to file

Definition at line 115 of file hitrate.h.

Referenced by loadSettings(), and process().

std::string cass::pp300::_trainingFile
protected

optional user-setting: filename to read training from

Definition at line 121 of file hitrate.h.

Referenced by loadSettings(), and readTrainingMatrices().

int cass::pp300::_trainingSetsInserted
protected

Definition at line 128 of file hitrate.h.

Referenced by process(), startNewTraining(), and trainingFinished().

matrixType cass::pp300::_variationFeatures
protected

Definition at line 123 of file hitrate.h.

Referenced by loadSettings(), and process().

int cass::pp300::_xend
protected

xend - ROI for calculations

Definition at line 100 of file hitrate.h.

Referenced by loadSettings(), and process().

int cass::pp300::_xstart
protected

xstart - ROI for calculations

Definition at line 94 of file hitrate.h.

Referenced by loadSettings(), and process().

int cass::pp300::_yend
protected

yend - ROI for calculations

Definition at line 103 of file hitrate.h.

Referenced by loadSettings(), and process().

int cass::pp300::_ystart
protected

ystart - ROI for calculations

Definition at line 97 of file hitrate.h.

Referenced by loadSettings(), and process().


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