10 #ifndef _IMAGEMANIPULATION_H__
11 #define _IMAGEMANIPULATION_H__
15 #include <tr1/functional>
44 Rotor(
char cc,
char cr,
char rc,
char rr)
113 typedef std::tr1::function<size_t(size_t, size_t, const std::pair<size_t,size_t>&)>
func_t;
665 temp_t
Rad(
const double lambda,
const double D,
double _np_m
the size of one pixel in m
GeometryInfo::lookupTable_t _lookupTable
the lookup table
std::string _filename
filename of the geometry file
const size_t _nx
nbr bins in x of asic
std::pair< size_t, size_t > _size
the size of the original histogram
Create a radial average of q values from a raw detector image.
Event to store all LCLS Data.
pp1600(const name_t &)
constructor
virtual void process(const CASSEvent &evt, result_t &)
process event
pp55(const name_t &)
constructor
shared_pointer _one
pp containing 2d histogram
virtual void process(const CASSEvent &evt, result_t &)
process event
result_t::axe_t _axis
the axis of the result
float value_t
the values of this container
virtual void loadSettings(size_t unused)
load the settings of this pp
const Rotor _TBRL
the rotation matrix if x of src goes from (T)op to (B)ottom in dest and y of the src goes from (R)igh...
double _wavelength
the wavelength in case its fixed
float _badPixVal
value of the bad pixels
std::map< std::string, std::pair< func_t, bool > > _functions
container for all functions
std::string _operation
the user chosen operation
uint64_t id_t
define the id type
func_t _pixIdx
function that will calc the corresponding bin
std::vector< pos_t > conversion_t
define the conversion table type
convert cspad 2d histogram into cheetah layout
std::tr1::function< temp_t(const double, const double, const result_t::value_t &, const GeometryInfo::pos_t &)> _getBin
function to map the pixel to histogram bin, value and fill flag
double _detdist
the detector distance in case its fixed
const Rotor _LRTB
the rotation matrix if x of src goes from (L)eft to (R)ight in dest and y of the src goes from (T)op ...
Axis< double > axe_t
the axis descriptions of this container
combine the position in the lab into a struct
std::tr1::function< double(const CASSEvent::id_t &)> _getDetectorDistance
function that gets the detectordistance
const size_t _nx
nbr bins in x of asic
char incDestRowPerSrcCol
steps to increase in the dest row when src column is increased by one
float _backgroundValue
the value with wich the background should be filled
temp_t Rad(const double lambda, const double D, const result_t::value_t &pixval, const GeometryInfo::pos_t &pixpos)
get the bin when the radius of the pixel is asked
bool _convertCheetahToCASSLayout
flag whether to convert the positions in the src from cheetah to cass layout
virtual void loadSettings(size_t unused)
load the settings of this pp
shared_pointer _imagePP
pp containing 2d histogram
base class for processors.
virtual void process(const CASSEvent &evt, result_t &)
process event
temp_t R(const double lambda, const double D, const result_t::value_t &pixval, const GeometryInfo::pos_t &pixpos)
get the bin when the resolution value of the pixel is asked
virtual void loadSettings(size_t unused)
load the settings of this pp
define the table row of a single output
Rotor(char cc, char cr, char rc, char rr)
contructor
pp90(const name_t &)
constructor
pp1602(const name_t &)
constructor
const size_t _ny
nbr bins in y of asic
pp1601(const name_t &)
constructor
char incDestColPerSrcRow
steps to increase in the dest columns when src row is increased by one
std::vector< temp_t > tempArray_t
define the matrix
GeometryInfo::conversion_t _pixPositions_m
the pixel positions
class to parse and retrieve info from geom files.
file contains processors baseclass declaration
char incDestRowPerSrcRow
steps to increase in the dest row when src row is increased by one
std::tr1::function< size_t(size_t, size_t, const std::pair< size_t, size_t > &)> func_t
functions to calc the index of source from the indizes of the destination
std::vector< result_t::value_t > normfactors_t
define the normalization factors
convert cspad data into laboratory frame using crystfel geometry files
std::string _filename
filename of the geometry file
double wlFromConstant(const CASSEvent::id_t &)
retrieve the constant wavelength
void setup(const result_t &srcImageHist)
generate the lookup table by parsing the geom file
combine info needed for the lookuptable
virtual void process(const CASSEvent &evt, result_t &)
process event
const Rotor _RLBT
the rotation matrix if x of src goes from (R)ight to (L)eft in dest and y of the src goes from (B)ott...
rotate, transpose, invert axis on 2d result.
std::tr1::shared_ptr< SegmentCopier > _copyMatrixSegment
virtual void loadSettings(size_t unused)
load the settings of this pp
bool _convertCheetahToCASSLayout
flag whether to convert the positions in the src from cheetah to cass layout
shared_pointer _one
pp containing 2d histogram
char incDestColPerSrcCol
steps to increase in the dest columns when src column is increased by one
const size_t _na
magic cheetah number
virtual void loadSettings(size_t)
load the settings of this pp
virtual void process(const CASSEvent &evt, result_t &)
process event
double ddFromProcessor(const CASSEvent::id_t &id)
retrieve the detector distance from the processor
shared_pointer _imagePP
pp containing 2d histogram
shared_pointer _wavelengthPP
pp containing wavelength in case its not fixed
std::string name_t
define the name type
shared_pointer _one
pp containing 2d histogram
std::tr1::shared_ptr< Processor > shared_pointer
a shared pointer of this
convert cspad 2d histogram into a quasi oriented layout
temp_t Q(const double lambda, const double D, const result_t::value_t &pixval, const GeometryInfo::pos_t &pixpos)
get the bin when the q-value of the pixel is asked
shared_pointer _detdistPP
pp containing detector distance in case its not fixed
std::tr1::function< double(const CASSEvent::id_t &)> _getWavelength
function that gets the wavelength
double wlFromProcessor(const CASSEvent::id_t &id)
retrieve the wavelength from the processor
const size_t _ny
nbr bins in y of asic
double ddFromConstant(const CASSEvent::id_t &)
retrieve the constant detector distance
const Rotor _BTLR
the rotation matrix if x of src goes from (B)ottom to (T)op in dest and y of the src goes from (L)eft...