EMAN2
|
Cmp class defines image comparison method. More...
#include <cmp.h>
Public Member Functions | |
virtual | ~Cmp () |
virtual float | cmp (EMData *image, EMData *with) const =0 |
To compare 'image' with another image passed in through its parameters. More... | |
virtual string | get_name () const =0 |
Get the Cmp's name. More... | |
virtual string | get_desc () const =0 |
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... | |
virtual TypeDict | get_param_types () const =0 |
Get Cmp parameter information in a dictionary. More... | |
Protected Member Functions | |
void | validate_input_args (const EMData *image, const EMData *with) const |
Protected Attributes | |
Dict | params |
Cmp class defines image comparison method.
Using default arguments, smaller values indicate more similar images.
Cmp class is the base comparison class. Each specific comparison class is a subclass of Cmp, and must have a unique name. The name is used to create a new Cmp instance or call a Cmp.
All Cmp classes in EMAN are managed by a Factory pattern. So each Cmp class must define: - a unique name to idenfity itself in the factory. - a static method to register itself in the factory.
Typical usage of Cmp:
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. |
Implemented in EMAN::CccCmp, EMAN::LodCmp, EMAN::SqEuclideanCmp, EMAN::DotCmp, EMAN::TomoCccCmp, EMAN::TomoWedgeCccCmp, EMAN::TomoWedgeFscCmp, EMAN::TomoFscCmp, EMAN::QuadMinDotCmp, EMAN::OptSubCmp, EMAN::OptVarianceCmp, EMAN::PhaseCmp, EMAN::FRCCmp, EMAN::VerticalCmp, and EMAN::XYZCmp.
Referenced by refalifn(), refalifn3dquat(), symquat(), EMAN::RT3DGridAligner::xform_align_nbest(), EMAN::RT3DSphereAligner::xform_align_nbest(), and EMAN::RT3DSymmetryAligner::xform_align_nbest().
|
pure virtual |
|
pure virtual |
Get the Cmp's name.
Each Cmp is identified by a unique name.
Implemented in EMAN::CccCmp, EMAN::LodCmp, EMAN::SqEuclideanCmp, EMAN::DotCmp, EMAN::TomoCccCmp, EMAN::TomoWedgeCccCmp, EMAN::TomoWedgeFscCmp, EMAN::TomoFscCmp, EMAN::QuadMinDotCmp, EMAN::OptSubCmp, EMAN::OptVarianceCmp, EMAN::PhaseCmp, EMAN::FRCCmp, EMAN::VerticalCmp, and EMAN::XYZCmp.
|
pure virtual |
Get Cmp parameter information in a dictionary.
Each parameter has one record in the dictionary. Each record contains its name, data-type, and description.
Implemented in EMAN::CccCmp, EMAN::LodCmp, EMAN::SqEuclideanCmp, EMAN::DotCmp, EMAN::TomoCccCmp, EMAN::TomoWedgeCccCmp, EMAN::TomoWedgeFscCmp, EMAN::TomoFscCmp, EMAN::QuadMinDotCmp, EMAN::OptSubCmp, EMAN::OptVarianceCmp, EMAN::PhaseCmp, EMAN::FRCCmp, EMAN::VerticalCmp, and EMAN::XYZCmp.
|
inlinevirtual |
|
inlinevirtual |
Definition at line 81 of file cmp.cpp.
References ImageFormatException, EMAN::EMUtil::is_same_size(), and NullPointerException.
Referenced by EMAN::CccCmp::cmp(), EMAN::LodCmp::cmp(), EMAN::SqEuclideanCmp::cmp(), EMAN::DotCmp::cmp(), EMAN::QuadMinDotCmp::cmp(), EMAN::OptSubCmp::cmp(), EMAN::OptVarianceCmp::cmp(), EMAN::FRCCmp::cmp(), and EMAN::XYZCmp::cmp().
|
mutableprotected |
Definition at line 132 of file cmp.h.
Referenced by EMAN::CccCmp::cmp(), EMAN::LodCmp::cmp(), EMAN::SqEuclideanCmp::cmp(), EMAN::DotCmp::cmp(), EMAN::TomoCccCmp::cmp(), EMAN::TomoWedgeCccCmp::cmp(), EMAN::TomoWedgeFscCmp::cmp(), EMAN::TomoFscCmp::cmp(), EMAN::QuadMinDotCmp::cmp(), EMAN::OptSubCmp::cmp(), EMAN::OptVarianceCmp::cmp(), EMAN::PhaseCmp::cmp(), EMAN::FRCCmp::cmp(), EMAN::XYZCmp::cmp(), get_params(), and set_params().