7 #ifndef IMPEM2D_REGISTRATION_RESULT_H
8 #define IMPEM2D_REGISTRATION_RESULT_H
10 #include "IMP/em2d/internal/rotation_helper.h"
11 #include "IMP/em2d/em2d_config.h"
21 IMPEM2D_BEGIN_NAMESPACE
42 int projection_index=0,
48 int projection_index=0,
53 inline double get_phi()
const {
return phi_;}
54 inline double get_theta()
const {
return theta_;}
55 inline double get_psi()
const {
return psi_;}
66 inline void set_projection_index(
int index) {projection_index_=index;}
79 inline double get_ccc()
const {
return ccc_;}
81 inline void set_ccc(
double ccc) {
83 is_optimized_result_ =
false;
90 void set_score(
double Score) {
92 is_optimized_result_ =
true;
98 phi_=phi; theta_=theta; psi_=psi;
109 inline void set_name(
String name) {name_=name;}
118 void write(std::ostream& out = std::cout)
const;
121 void write_comment_line(std::ostream& out = std::cout)
const;
124 void read(
const String &s);
127 void set_random_registration(
unsigned int index,
double maximum_shift);
140 bool get_is_optimized_result()
const {
return is_optimized_result_; }
142 ~RegistrationResult();
154 int projection_index_;
161 bool angles_defined_,is_optimized_result_;
180 (
unsigned int n,
double maximum_shift=5.0);
192 inline double get_random_between_zero_and_one() {
193 return (static_cast<double>(rand()) /(static_cast<double>(RAND_MAX)+1));
196 IMPEM2D_END_NAMESPACE
void set_rotation(double phi, double theta, double psi)
Rotation to apply to the model.
String get_name() const
Name of the object.
Classes and operations related with rotations.
String name_
name and index of the projection compared
int get_image_index() const
Image that has been registered.
A nullptr-initialized pointer to an IMP Object.
RegistrationResults get_evenly_distributed_registration_results(unsigned int n_projections)
#define IMP_VALUES(Name, PluralName)
Define the type for storing sets of values.
double ccc_
Cross correlation coefficient.
void set_shift(algebra::Vector2D shift)
Shift to apply to the projection to register.
RegistrationResults get_random_registration_results(unsigned int n, double maximum_shift=5.0)
Provides a set of random registration results (or parameters)
#define IMP_SHOWABLE(Name)
void set_image_index(int index)
Index of the image that is registered.
algebra::Vector2D shift_
Translation in pixels and the rows first (y rows, x columns)
Rotation3D get_rotation_from_fixed_zyz(double Rot, double Tilt, double Psi)
Generate a rotation object from Euler Angles.
void write_registration_results(String filename, const RegistrationResults &results)
Writes a set of registration results.
int image_index_
index of the image being registered
double phi_
Euler angles (ZYZ)
Simple 3D rotation class.
algebra::Rotation3D get_rotation() const
Returns the rotation for the 3 projection angles.
RegistrationResults read_registration_results(const String &filename)
Reads a set of registration results.
int get_projection_index() const
Projection that best matches the image after coarse registration.
Class to manage registration results.
std::string String
Basic string value.