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
41 int image_index = 0,
String name =
"");
45 int projection_index = 0,
int image_index = 0,
48 inline double get_phi()
const {
return phi_; }
49 inline double get_theta()
const {
return theta_; }
50 inline double get_psi()
const {
return psi_; }
61 inline void set_projection_index(
int index) { projection_index_ = index; }
74 inline double get_ccc()
const {
return ccc_; }
76 inline void set_ccc(
double ccc) {
78 is_optimized_result_ =
false;
85 void set_score(
double Score) {
87 is_optimized_result_ =
true;
104 inline void set_name(
String name) { name_ = name; }
113 void write(std::ostream &out = std::cout)
const;
116 void write_comment_line(std::ostream &out = std::cout)
const;
119 void read(
const String &s);
122 void set_random_registration(
unsigned int index,
double maximum_shift);
133 bool get_is_optimized_result()
const {
return is_optimized_result_; }
135 ~RegistrationResult();
147 int projection_index_;
154 bool angles_defined_, is_optimized_result_;
182 IMPEM2D_DEPRECATED_FUNCTION_DECL(2.5)
183 inline
double get_random_between_zero_and_one() {
184 IMPEM2D_DEPRECATED_FUNCTION_DEF(2.5,
"Use Boost::random instead");
185 return (static_cast<double>(rand()) / (static_cast<double>(RAND_MAX) + 1));
188 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.
RegistrationResults get_evenly_distributed_registration_results(unsigned int n_projections)
double ccc_
Cross correlation coefficient.
#define IMP_SHOWABLE(Name)
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_VALUES(Name, PluralName)
Define the type for storing sets of values.
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.
A nullptr-initialized pointer to an IMP Object.
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.