EMAN2
|
XYZCmp is a cmp template for defining new cmps. More...
#include <cmp_template.h>
Public Member Functions | |
float | cmp (EMData *image, EMData *with) const |
To compare 'image' with another image passed in through its parameters. More... | |
string | get_name () const |
Get the Cmp's name. More... | |
string | get_desc () const |
TypeDict | get_param_types () const |
Add your cmp parameter names and types in get_param_types(). More... | |
Public Member Functions inherited from EMAN::Cmp | |
virtual | ~Cmp () |
virtual Dict | get_params () const |
Get the Cmp parameters in a key/value dictionary. More... | |
virtual void | set_params (const Dict &new_params) |
Set the Cmp parameters using a key/value dictionary. More... | |
Static Public Member Functions | |
static Cmp * | NEW () |
Static Public Attributes | |
static const string | NAME = "middle" |
Additional Inherited Members | |
Protected Member Functions inherited from EMAN::Cmp | |
void | validate_input_args (const EMData *image, const EMData *with) const |
Protected Attributes inherited from EMAN::Cmp | |
Dict | params |
XYZCmp is a cmp template for defining new cmps.
Please add your own code at the proper place.
1) Replace all 'XYZ' with your new cmp name. 2) Define the cmp parameter names and types in get_param_types(). 3) Implement the cmp in XYZCmp::cmp().
Definition at line 48 of file cmp_template.h.
To compare 'image' with another image passed in through its parameters.
An optional transformation may be used to transform the 2 images.
image | The first image to be compared. |
with | The second image to be comppared. |
Implements EMAN::Cmp.
Definition at line 40 of file cmp_template.cpp.
References EMAN::Cmp::params, and EMAN::Cmp::validate_input_args().
|
inlinevirtual |
Implements EMAN::Cmp.
Definition at line 58 of file cmp_template.h.
|
inlinevirtual |
|
inlinevirtual |
Add your cmp parameter names and types in get_param_types().
For available parameter types, please refer class EMObject.
As an example, XYZCmp has 3 parameters: EMData *with; int param1; float param2;
Implements EMAN::Cmp.
Definition at line 77 of file cmp_template.h.
References EMAN::EMObject::FLOAT, EMAN::EMObject::INT, and EMAN::TypeDict::put().
|
inlinestatic |
Definition at line 63 of file cmp_template.h.
|
static |
Definition at line 85 of file cmp_template.h.
Referenced by get_name().