CFEL - ASG Software Suite
2.5.0
CASS
|
find connected pixels, coalesce them and store them in a list More...
#include <hitfinder.h>
Public Member Functions | |
pp209 (const name_t &name) | |
constructor More... | |
virtual void | process (const CASSEvent &, result_t &) |
process event More... | |
virtual void | loadSettings (size_t) |
load the settings of 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... | |
virtual void | processCommand (std::string command) |
process command in pp 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 | |
enum | ColumnNames { Integral = 0, CentroidColumn = 1, CentroidRow = 2, MaxADU = 3, Index = 4, Column = 5, Row = 6, MaxColumn = 7, MinColumn = 8, ColumnSize = 9, MaxRow = 10, MinRow = 11, RowSize = 12, NbrOfPixels = 13, nbrOf } |
enum describing the contents of the resulting table More... | |
typedef result_t::storage_t | table_t |
definition of the table More... | |
typedef result_t::storage_t::value_type | pixelval_t |
define the type of the pixel in image More... | |
typedef int64_t | index_t |
define the index in the image More... | |
typedef std::pair< index_t, index_t > | shape_t |
define the shape of the image More... | |
typedef std::vector< index_t > | neighbourList_t |
define the list of neighbours More... | |
Protected Attributes | |
shared_pointer | _imagePP |
processor containing the image More... | |
shared_pointer | _threshPP |
processor containing the threshold for each pixel of the image More... | |
shape_t | _imageShape |
size of the incomming image More... | |
neighbourList_t | _neighbourOffsets |
the list of offsets to next neighbours More... | |
pixelval_t | _factor |
the factor that the pixelwise threshold is multuplied with 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... | |
![]() | |
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... | |
find connected pixels, coalesce them and store them in a list
Processor/%name%/{ImageName}
the processor name that contain the 2d histogram. Default is "Unknown".
Processor/%name%/{Threshold}
name of the processor that contains the pixelwise thresholds. Must be the same dimension as the image.
Processor/%name%/{Factor}
Factor to multiply the pixelwise threshold with, so that one can use a noise map as a threshold. Default is 1.
Definition at line 590 of file hitfinder.h.
|
protected |
define the index in the image
Definition at line 610 of file hitfinder.h.
|
protected |
define the list of neighbours
Definition at line 616 of file hitfinder.h.
|
protected |
define the type of the pixel in image
Definition at line 607 of file hitfinder.h.
|
protected |
define the shape of the image
Definition at line 613 of file hitfinder.h.
|
protected |
definition of the table
Definition at line 604 of file hitfinder.h.
|
protected |
enum describing the contents of the resulting table
Enumerator | |
---|---|
Integral | |
CentroidColumn | |
CentroidRow | |
MaxADU | |
Index | |
Column | |
Row | |
MaxColumn | |
MinColumn | |
ColumnSize | |
MaxRow | |
MinRow | |
RowSize | |
NbrOfPixels | |
nbrOf |
Definition at line 619 of file hitfinder.h.
pp209::pp209 | ( | const name_t & | name | ) |
|
virtual |
load the settings of this pp
get references to the input results
get the shape of the input results
check if the input processors have the correct type
set up the neighbouroffset list
Create the result output
log what the user was requesting
Reimplemented from cass::Processor.
Definition at line 1156 of file hitfinder.cpp.
References cass::Processor::_condition, _factor, _imagePP, _imageShape, _neighbourOffsets, _threshPP, cass::Log::add(), QSettings::beginGroup(), cass::Processor::createHistList(), QString::fromStdString(), cass::Log::INFO, cass::Processor::name(), nbrOf, cass::Processor::setupCondition(), cass::Processor::setupDependency(), cass::Processor::setupGeneral(), cass::toString(), and QSettings::value().
Referenced by pp209().
process event
clear the resulting table to fill it with the values of this image
get a table row that we can later add to the table
set up a mask that we can see which pixels have been treated
get iterators for the mask and the image with which we can iterate through the image, also rember which linearized index we are working on right now, to be able to retrieve the column and row that the current pixel corresponsed to.
check if pixel should be treated, when it has been treated before continue with the next pixel
if it wasn't checked, then its checked now
check if pixel is above the pixelwise threshold, which is increased by the user provided factor, this allows to check the pixels using a noise map.
from the pixel look around and see which pixels are also above the threshold. If a neighbour is found, mask it such that one does not use it twice.
Create a list that should contain the indizes of the pixels that are part of the peak. Go through that list and check for each found neighbour whether it also has a neighbour. If so add it to the list, but only if its above the threshold
check if the neighbour is within the image shape
check if neighbour was already treated
when the checks have passed it will be treated
check whether its above the threshold, if so add it to the pixellist
now that we found all the pixels that are connected to the starting pixel, go through all pixels in the list and centroid them.
get the pixel parameters
calculate the peak properties
find the maximum pixel
find min and max col and row
set the peak's properties and add peak to the list of found peaks
tell that only the result of one event (image) is present in the table
Reimplemented from cass::Processor.
Definition at line 1223 of file hitfinder.cpp.
References _factor, _imagePP, _imageShape, _neighbourOffsets, _threshPP, cass::Result< T >::appendRows(), cass::Result< T >::begin(), CentroidColumn, CentroidRow, Column, ColumnSize, cass::Result< T >::datasize(), cass::CASSEvent::id(), Index, cass::ACQIRIS::integral, Integral, cass::Result< T >::lock, MaxADU, MaxColumn, MaxRow, MinColumn, MinRow, nbrOf, NbrOfPixels, cass::Result< T >::resetTable(), Row, RowSize, and cass::Result< T >::size().
|
protected |
the factor that the pixelwise threshold is multuplied with
Definition at line 652 of file hitfinder.h.
Referenced by loadSettings(), and process().
|
protected |
processor containing the image
Definition at line 640 of file hitfinder.h.
Referenced by loadSettings(), and process().
|
protected |
size of the incomming image
Definition at line 646 of file hitfinder.h.
Referenced by loadSettings(), and process().
|
protected |
the list of offsets to next neighbours
Definition at line 649 of file hitfinder.h.
Referenced by loadSettings(), and process().
|
protected |
processor containing the threshold for each pixel of the image
Definition at line 643 of file hitfinder.h.
Referenced by loadSettings(), and process().