CFEL - ASG Software Suite
2.5.0
CASS
|
Single particle hit. More...
#include <hitrate.h>
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... | |
![]() | |
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_t & | result (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_t & | dependencies () |
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... | |
![]() | |
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... | |
![]() | |
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 | |
![]() | |
typedef std::tr1::shared_ptr< Processor > | shared_pointer |
a shared pointer of this More... | |
typedef std::string | name_t |
define the name type More... | |
typedef std::list< name_t > | names_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... | |
Single particle hit.
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;
|
protected |
pp300::pp300 | ( | const name_t & | name | ) |
|
virtual |
virtual destructor
Definition at line 32 of file hitrate.cpp.
|
protectedvirtual |
Definition at line 153 of file hitrate.cpp.
References startNewTraining().
|
virtual |
load the settings for this pp
Reimplemented from cass::Processor.
Definition at line 100 of file hitrate.cpp.
References cass::Processor::_condition, _cov, _covI, _mean, _nFeatures, _nTrainingSetSize, _pHist, _readTraining, _saveTraining, _trainingFile, _variationFeatures, _xend, _xstart, _yend, _ystart, QSettings::beginGroup(), QSettings::contains(), cass::Processor::createHistList(), QString::fromStdString(), cass::Processor::name(), printTrainingMatrices(), readTrainingMatrices(), cass::Processor::setupCondition(), cass::Processor::setupDependency(), cass::Processor::setupGeneral(), startNewTraining(), trainingFinished(), and QSettings::value().
Referenced by pp300().
|
protected |
Definition at line 77 of file hitrate.cpp.
Referenced by loadSettings(), and process().
check if image specified in settings contains a single particle hit
Reimplemented from cass::Processor.
Definition at line 173 of file hitrate.cpp.
References _cov, _covI, _mean, _mutex, _nFeatures, _nTrainingSetSize, _pHist, _reTrain, _saveTraining, _trainingSetsInserted, _variationFeatures, _xend, _xstart, _yend, _ystart, cass::CASSEvent::id(), cass::Result< T >::lock, printTrainingMatrices(), saveTrainingMatrices(), cass::Result< T >::setValue(), cass::Result< T >::shape(), startNewTraining(), VERBOSEOUT, and cass::ACQIRIS::y.
|
protectedvirtual |
process command in pp
overwrite this function in pp. can do whatever it wants to do as a reaction on command.
command | the command string transmitted |
Reimplemented from cass::Processor.
Definition at line 159 of file hitrate.cpp.
References saveTrainingMatrices(), and startNewTraining().
|
protected |
Definition at line 48 of file hitrate.cpp.
References _covI, _mean, and _trainingFile.
Referenced by loadSettings().
|
protected |
Definition at line 56 of file hitrate.cpp.
References _covI, _mean, and cass::ACQIRIS::time.
Referenced by process(), and processCommand().
|
protected |
Definition at line 42 of file hitrate.cpp.
References _reTrain, and _trainingSetsInserted.
Referenced by clearHistogramEvent(), loadSettings(), process(), and processCommand().
|
protected |
Definition at line 36 of file hitrate.cpp.
References _nTrainingSetSize, _reTrain, and _trainingSetsInserted.
Referenced by loadSettings().
|
protected |
Definition at line 126 of file hitrate.h.
Referenced by loadSettings(), and process().
|
protected |
Definition at line 127 of file hitrate.h.
Referenced by loadSettings(), printTrainingMatrices(), process(), readTrainingMatrices(), and saveTrainingMatrices().
|
protected |
Definition at line 124 of file hitrate.h.
Referenced by loadSettings(), printTrainingMatrices(), process(), readTrainingMatrices(), and saveTrainingMatrices().
|
protected |
|
protected |
Definition at line 112 of file hitrate.h.
Referenced by loadSettings(), and process().
|
protected |
Definition at line 111 of file hitrate.h.
Referenced by loadSettings(), process(), and trainingFinished().
|
protected |
the histogram to work on
Definition at line 106 of file hitrate.h.
Referenced by loadSettings(), and process().
|
protected |
if filename is given in settings, load instead of calculate
Definition at line 118 of file hitrate.h.
Referenced by loadSettings().
|
protected |
Definition at line 129 of file hitrate.h.
Referenced by process(), startNewTraining(), and trainingFinished().
|
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().
|
protected |
optional user-setting: filename to read training from
Definition at line 121 of file hitrate.h.
Referenced by loadSettings(), and readTrainingMatrices().
|
protected |
Definition at line 128 of file hitrate.h.
Referenced by process(), startNewTraining(), and trainingFinished().
|
protected |
Definition at line 123 of file hitrate.h.
Referenced by loadSettings(), and process().
|
protected |
xend - ROI for calculations
Definition at line 100 of file hitrate.h.
Referenced by loadSettings(), and process().
|
protected |
xstart - ROI for calculations
Definition at line 94 of file hitrate.h.
Referenced by loadSettings(), and process().
|
protected |
yend - ROI for calculations
Definition at line 103 of file hitrate.h.
Referenced by loadSettings(), and process().
|
protected |
ystart - ROI for calculations
Definition at line 97 of file hitrate.h.
Referenced by loadSettings(), and process().