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

find connected pixels, coalesce them and store them in a list More...

#include <hitfinder.h>

+ Inheritance diagram for cass::pp209:
+ Collaboration diagram for cass::pp209:

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...
 
- 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...
 
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_tshape_t
 define the shape of the image More...
 
typedef std::vector< index_tneighbourList_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...
 
- 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...
 
- 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...
 

Detailed Description

find connected pixels, coalesce them and store them in a list

Available PostProcessors:
"209": cluster connected pixels and store them in list
See also
Processor for a list of all commonly available cass.ini settings.
User definable Parameters:

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.

Author
Lutz Foucar

Definition at line 590 of file hitfinder.h.

Member Typedef Documentation

typedef int64_t cass::pp209::index_t
protected

define the index in the image

Definition at line 610 of file hitfinder.h.

typedef std::vector<index_t> cass::pp209::neighbourList_t
protected

define the list of neighbours

Definition at line 616 of file hitfinder.h.

typedef result_t::storage_t::value_type cass::pp209::pixelval_t
protected

define the type of the pixel in image

Definition at line 607 of file hitfinder.h.

typedef std::pair<index_t,index_t> cass::pp209::shape_t
protected

define the shape of the image

Definition at line 613 of file hitfinder.h.

definition of the table

Definition at line 604 of file hitfinder.h.

Member Enumeration Documentation

enum cass::pp209::ColumnNames
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.

Constructor & Destructor Documentation

pp209::pp209 ( const name_t name)

constructor

Definition at line 1150 of file hitfinder.cpp.

References loadSettings().

Member Function Documentation

void pp209::loadSettings ( size_t  )
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().

void pp209::process ( const CASSEvent evt,
result_t result 
)
virtual

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().

Member Data Documentation

pixelval_t cass::pp209::_factor
protected

the factor that the pixelwise threshold is multuplied with

Definition at line 652 of file hitfinder.h.

Referenced by loadSettings(), and process().

shared_pointer cass::pp209::_imagePP
protected

processor containing the image

Definition at line 640 of file hitfinder.h.

Referenced by loadSettings(), and process().

shape_t cass::pp209::_imageShape
protected

size of the incomming image

Definition at line 646 of file hitfinder.h.

Referenced by loadSettings(), and process().

neighbourList_t cass::pp209::_neighbourOffsets
protected

the list of offsets to next neighbours

Definition at line 649 of file hitfinder.h.

Referenced by loadSettings(), and process().

shared_pointer cass::pp209::_threshPP
protected

processor containing the threshold for each pixel of the image

Definition at line 643 of file hitfinder.h.

Referenced by loadSettings(), and process().


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