EMAN2
|
BoxingTools is class for encapsulating common boxing operations that may become expensive if they are implemented in python. More...
#include <boxingtools.h>
Public Types | |
enum | CmpMode { SWARM_DIFFERENCE , SWARM_RATIO , SWARM_AVERAGE_RATIO } |
Public Member Functions | |
BoxingTools () | |
~BoxingTools () | |
Static Public Member Functions | |
static vector< float > | get_min_delta_profile (const EMData *const image, int x, int y, int radius) |
Gets a pixel minimum delta radial profile about some pixel focal point. More... | |
static bool | is_local_maximum (const EMData *const image, int x, int y, int radius, EMData *const exclusion_map) |
Determines if a given pixel is the maximum in local radial neighborhood Useful for automated correlation-based boxing. More... | |
static vector< IntPoint > | auto_correlation_pick (const EMData *const image, float threshold, int radius, const vector< float > &profile, EMData *const exclusion, const int cradius, int mode=1) |
static bool | hi_brid (const EMData *const image, int x, int y, int radius, EMData *const exclusion_map, vector< float > &profile) |
static void | set_radial_non_zero (EMData *const exclusion, int x, int y, int radius) |
static IntPoint | find_radial_max (const EMData *const map, int x, int y, int radius) |
static map< unsigned int, unsigned int > | classify (const vector< vector< float > > &data, const unsigned int &classes=4) |
static Vec3f | get_color (const unsigned int index) |
static void | set_region (EMData *const image, const EMData *const mask, const int x, const int y, const float &val) |
static void | set_mode (const CmpMode m) |
Static Private Attributes | |
static vector< Vec3f > | colors = vector<Vec3f>() |
static CmpMode | mode = SWARM_AVERAGE_RATIO |
BoxingTools is class for encapsulating common boxing operations that may become expensive if they are implemented in python.
Definition at line 56 of file boxingtools.h.
Enumerator | |
---|---|
SWARM_DIFFERENCE | |
SWARM_RATIO | |
SWARM_AVERAGE_RATIO |
Definition at line 102 of file boxingtools.h.
|
inline |
Definition at line 59 of file boxingtools.h.
|
inline |
Definition at line 60 of file boxingtools.h.
|
static |
Definition at line 608 of file boxingtools.cpp.
References hi_brid(), InvalidValueException, mode, and set_radial_non_zero().
|
static |
Definition at line 850 of file boxingtools.cpp.
References EMAN::BoxSVDClassifier::colorMappingByClassSize(), and EMAN::BoxSVDClassifier::go().
Definition at line 779 of file boxingtools.cpp.
|
static |
|
static |
Gets a pixel minimum delta radial profile about some pixel focal point.
Useful for automated correlation-based boxing.
image | the image containing the interesting pixels values (typically a correlation image) |
x | the x coordinate of the pixel focal point |
y | the y coordinate of the pixel focal point |
radius | the constraining radius of the minimum delta profile |
Definition at line 498 of file boxingtools.cpp.
References mode, SWARM_AVERAGE_RATIO, SWARM_DIFFERENCE, SWARM_RATIO, x, and y.
|
static |
Definition at line 673 of file boxingtools.cpp.
References mode, set_radial_non_zero(), SWARM_AVERAGE_RATIO, SWARM_DIFFERENCE, SWARM_RATIO, x, and y.
Referenced by auto_correlation_pick().
|
static |
Determines if a given pixel is the maximum in local radial neighborhood Useful for automated correlation-based boxing.
image | the image containing the interesting pixels values (typically a correlation image) |
x | the x coordinate of the candidate pixel maximum |
y | the y coordinate of the candidate pixel maximum |
radius | the constraining radius of the local neighborhood |
exclusion_map | an EMData object with the same dimensions as the main image. If a local maximum is found, the pixels in the radial neighborhood that was queried are set to 0. This can be exploited by the calling function to minimize queries. |
Definition at line 579 of file boxingtools.cpp.
References set_radial_non_zero(), x, and y.
|
inlinestatic |
|
static |
Definition at line 760 of file boxingtools.cpp.
Referenced by auto_correlation_pick(), hi_brid(), and is_local_maximum().
|
static |
Definition at line 814 of file boxingtools.cpp.
Definition at line 112 of file boxingtools.h.
Referenced by get_color().
|
staticprivate |
Definition at line 113 of file boxingtools.h.
Referenced by auto_correlation_pick(), get_min_delta_profile(), hi_brid(), and set_mode().