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>
20 #include <cereal/access.hpp>
22 IMPEM2D_BEGIN_NAMESPACE
42 int image_index = 0,
String name =
"");
46 int projection_index = 0,
int image_index = 0,
49 inline double get_phi()
const {
return phi_; }
50 inline double get_theta()
const {
return theta_; }
51 inline double get_psi()
const {
return psi_; }
62 inline void set_projection_index(
int index) { projection_index_ = index; }
75 inline double get_ccc()
const {
return ccc_; }
77 inline void set_ccc(
double ccc) {
79 is_optimized_result_ =
false;
86 void set_score(
double Score) {
88 is_optimized_result_ =
true;
105 inline void set_name(
String name) { name_ = name; }
114 void write(std::ostream &out = std::cout)
const;
117 void write_comment_line(std::ostream &out = std::cout)
const;
120 void read(
const String &s);
123 void set_random_registration(
unsigned int index,
double maximum_shift);
134 bool get_is_optimized_result()
const {
return is_optimized_result_; }
136 ~RegistrationResult();
148 int projection_index_;
154 bool is_optimized_result_;
157 friend class cereal::access;
159 template<
class Archive>
void serialize(Archive &ar) {
160 ar(shift_, ccc_, Score_, name_, projection_index_, image_index_,
161 phi_, theta_, psi_, R_, is_optimized_result_);
190 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.
Represent a rotation in 2D space.
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)
A more IMP-like version of the std::vector.
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.