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.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Score based on the mean of the absolute difference.
Interface with OpenCV Copyright 2007-2017 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 appropriate score.
A more IMP-like version of the std::vector.
IMP images for Electron Microscopy using openCV matrices Copyright 2007-2017 IMP Inventors. All rights reserved.
A smart pointer to a reference counted object.
Common base class for heavy weight IMP objects.
Various general useful macros for IMP.
#define IMP_UNUSED(variable)
Compare two classes that return a score.
Base class for all scoring functions related to em2d.
Score based on Chi^2 = ((pixels_image - 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.
IMP::Vector< RegistrationResult > RegistrationResults
std::ostream & show(Hierarchy h, std::ostream &out=std::cout)
Print the hierarchy using a given decorator to display each node.
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing lists of object pointers.
A shared base class to help in debugging and things.
Object(std::string name)
Construct an object with the given name.
double get_global_score(const RegistrationResults &RRs)
Registration results class Copyright 2007-2017 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