7 #ifndef IMPEM2D_SCORES_2D_H
8 #define IMPEM2D_SCORES_2D_H
10 #include "IMP/em2d/em2d_config.h"
18 IMPEM2D_BEGIN_NAMESPACE
23 const RegistrationResult &rr2);
27 const RegistrationResult &rr2);
29 IMPEM2DEXPORT
double get_average_rotation_error(
33 IMPEM2DEXPORT
double get_average_shift_error(
62 return get_private_score(image, projection);
65 void set_variance_image(
Image *var) { set_variance_image_private(var); }
71 unsigned int n_members_;
74 virtual double get_private_score(
Image *image,
Image *projection)
const = 0;
75 virtual void set_variance_image_private(
Image *image) {
88 double get_private_score(
Image *,
Image *)
const;
89 void set_variance_imag_private(
Image *var) { variance_ = var; }
100 double get_private_score(
Image *image,
Image *projection)
const {
113 double get_private_score(
Image *image,
Image *projection)
const;
121 :
public std::binary_function<T, T, bool>
125 bool operator()(
const T &a,
const T &b)
const {
126 return a.get_ccc() >= b.get_ccc();
128 void show(std::ostream &)
const {}
135 :
public std::binary_function<T, T, bool>
139 bool operator()(
const T &a,
const T &b)
const {
return a.second < b.second; }
140 void show(std::ostream &)
const {}
147 :
public std::binary_function<T, T, bool>
151 bool operator()(
const T &a,
const T &b)
const {
152 return a.get_score() < b.get_score();
154 void show(std::ostream &)
const {}
157 IMPEM2D_END_NAMESPACE
double get_shift_error(const RegistrationResult &rr1, const RegistrationResult &rr2)
Distance between the two in-plane translations.
Score based on the mean of the absolute difference.
#define IMP_UNUSED(variable)
A smart pointer to a reference counted object.
inteface with OpenCV Copyright 2007-2014 IMP Inventors. All rights reserved.
double get_rotation_error(const RegistrationResult &rr1, const RegistrationResult &rr2)
double get_score(Image *image, Image *projection) const
Given an image and a projection, returns the appropiate score.
IMP images for Electron Microscopy using openCV matrices Copyright 2007-2014 IMP Inventors. All rights reserved.
Compare two classes that return a score.
Object(std::string name)
Construct an object with the given name.
IMP::base::Vector< RegistrationResult > RegistrationResults
Various general useful macros for IMP.
Base class for all scoring functions related to em2d.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Score based on Chi^2 = ((pixels_iamge - pixels_projection)/stddev_image)^2.
Comparison by value of the ccc.
double get_cross_correlation_coefficient(Image *im1, Image *im2)
Cross correlation between two images.
Common base class for heavy weight IMP objects.
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing sets of objects.
void show(Hierarchy h, std::ostream &out=std::cout)
Print out a molecular hierarchy.
double get_global_score(const RegistrationResults &RRs)
A shared base class to help in debugging and things.
Registration results class Copyright 2007-2014 IMP Inventors. All rights reserved.
Comparison of pairs by checking the second element.
double get_cross_correlation_coefficient(const cv::Mat &m1, const cv::Mat &m2)
Computes the cross-correlation coefficient between to matrices.
2D Electron Microscopy images in IMP