IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform

Class to perform registration of model projections to images. More...

#include <IMP/em2d/ProjectionFinder.h>

Inheritance diagram for IMP::em2d::ProjectionFinder:

Detailed Description

Class to perform registration of model projections to images.

Definition at line 86 of file ProjectionFinder.h.

Public Member Functions

void get_coarse_registration ()
double get_coarse_registration_time () const
 Time employed for the coarse registration part.
void get_complete_registration ()
double get_fine_registration_time () const
 Time employed for the fine registration part.
double get_global_score () const
unsigned int get_number_of_projections () const
unsigned int get_number_of_subjects () const
double get_preprocessing_time () const
 Time employed for preprocessing.
RegistrationResults get_registration_results () const
bool get_save_match_images () const
virtual std::string get_type_name () const override
virtual ::IMP::VersionInfo get_version_info () const override
 Get information about the module and version of the object.
void set_fast_mode (unsigned int n)
void set_model_particles (const ParticlesTemp &ps)
 Set the particles where the em2D restraint is applied.
void set_number_of_class_averages_members (Ints n_members)
void set_projections (const em2d::Images &projections)
 Set the projections of the model to use for initial coarse correlation.
void set_save_match_images (bool x)
void set_subjects (const em2d::Images &subjects)
 Set EM images to use as restraints.
void set_variance_images (const em2d::Images &variances)
 Set the projections of the model to use for initial coarse correlation.
void setup (ScoreFunction *score_function, const Em2DRestraintParameters &params)
 Initializes the parameters to generate and match projections.
void show (std::ostream &out) const
Public Member Functions inherited from IMP::Object
CheckLevel get_check_level () const
 get_derived_object (self)
 Return this object cast to the most derived subclass.
LogLevel get_log_level () const
void set_check_level (CheckLevel l)
void set_log_level (LogLevel l)
 Set the logging level used in this object.
const std::string & get_name () const
 Get the (not necessarily unique) name of this object.
void set_name (std::string name)
void set_was_used (bool tf) const
void show (std::ostream &out=std::cout) const
virtual void clear_caches ()

Protected Member Functions

void do_preprocess_for_fast_coarse_registration (const DoubleMatrix &m, algebra::Vector2D &center, DoubleMatrix &POLAR_AUTOC)
void do_preprocess_projection (unsigned int j)
void do_preprocess_subject (unsigned int i)
void get_coarse_registrations_for_subject (unsigned int i, RegistrationResults &coarse_RRs)
 Coarse registration for one subject.
Protected Member Functions inherited from IMP::Object
 Object (std::string name)
 Construct an object with the given name.
virtual void do_destroy ()

Protected Attributes

double coarse_registration_time_
bool fast_optimization_mode_
double fine_registration_time_
MasksManagerPtr masks_manager_
ParticlesTemp model_particles_
Ints n_members_
unsigned int number_of_optimized_projections_
bool parameters_setup_
Em2DRestraintParameters params_
bool particles_set_
PolarResamplingParameters polar_params_
double preprocessing_time_
em2d::Images projections_
algebra::Vector2Ds projections_cog_
std::vector< DoubleMatrix > PROJECTIONS_POLAR_AUTOC_
bool registration_done_
RegistrationResults registration_results_
Pointer< ScoreFunction > score_function_
std::vector< DoubleMatrix > SUBJECTS_
em2d::Images subjects_
 Main parameters.
algebra::Vector2Ds subjects_cog_
std::vector< DoubleMatrix > SUBJECTS_POLAR_AUTOC_
em2d::Images variances_

Constructor & Destructor Documentation

◆ ProjectionFinder()

IMP::em2d::ProjectionFinder::ProjectionFinder ( )

Definition at line 88 of file ProjectionFinder.h.

◆ ~ProjectionFinder()

virtual IMP::em2d::ProjectionFinder::~ProjectionFinder ( )
virtual

Definition at line 176 of file ProjectionFinder.h.

Member Function Documentation

◆ do_preprocess_for_fast_coarse_registration()

void IMP::em2d::ProjectionFinder::do_preprocess_for_fast_coarse_registration ( const DoubleMatrix & m,
algebra::Vector2D & center,
DoubleMatrix & POLAR_AUTOC )
protected

Computes the weighted centroid and the FFT of the polar-resampled autocorrelation.

◆ get_coarse_registration()

void IMP::em2d::ProjectionFinder::get_coarse_registration ( )

Coarse registration of all the images using the projections Based in 2D alignments of the images

Note
Given that this registration is based on 2D alignment maximizing the cross correlation, the a better score is the best correlation

◆ get_coarse_registration_time()

double IMP::em2d::ProjectionFinder::get_coarse_registration_time ( ) const

Time employed for the coarse registration part.

◆ get_coarse_registrations_for_subject()

void IMP::em2d::ProjectionFinder::get_coarse_registrations_for_subject ( unsigned int i,
RegistrationResults & coarse_RRs )
protected

Coarse registration for one subject.

◆ get_complete_registration()

void IMP::em2d::ProjectionFinder::get_complete_registration ( )

Performs complete registration of projections against the images. This means the coarse registration followed by simplex optimization

◆ get_fine_registration_time()

double IMP::em2d::ProjectionFinder::get_fine_registration_time ( ) const

Time employed for the fine registration part.

◆ get_global_score()

double IMP::em2d::ProjectionFinder::get_global_score ( ) const

Get the em2d score for a model after the registration performed: coarse or complete.

◆ get_number_of_projections()

unsigned int IMP::em2d::ProjectionFinder::get_number_of_projections ( ) const

Definition at line 174 of file ProjectionFinder.h.

◆ get_number_of_subjects()

unsigned int IMP::em2d::ProjectionFinder::get_number_of_subjects ( ) const

Definition at line 168 of file ProjectionFinder.h.

◆ get_preprocessing_time()

double IMP::em2d::ProjectionFinder::get_preprocessing_time ( ) const

Time employed for preprocessing.

◆ get_registration_results()

RegistrationResults IMP::em2d::ProjectionFinder::get_registration_results ( ) const

Recover the registration results. Only works if a registration has been done previously

◆ get_save_match_images()

bool IMP::em2d::ProjectionFinder::get_save_match_images ( ) const

Definition at line 129 of file ProjectionFinder.h.

◆ get_type_name()

virtual std::string IMP::em2d::ProjectionFinder::get_type_name ( ) const
overridevirtual

Reimplemented from IMP::Object.

Definition at line 176 of file ProjectionFinder.h.

◆ get_version_info()

virtual ::IMP::VersionInfo IMP::em2d::ProjectionFinder::get_version_info ( ) const
overridevirtual

Get information about the module and version of the object.

Reimplemented from IMP::Object.

Definition at line 176 of file ProjectionFinder.h.

◆ set_fast_mode()

void IMP::em2d::ProjectionFinder::set_fast_mode ( unsigned int n)

With this fast mode, only the first number n of best scoring projections during the coarse search are refined. Saves vast times of computation time with some loss of accuracy. Try starting with 1 (risky) or 2, and increase it to get more chances of finding the best projection

◆ set_model_particles()

void IMP::em2d::ProjectionFinder::set_model_particles ( const ParticlesTemp & ps)

Set the particles where the em2D restraint is applied.

◆ set_number_of_class_averages_members()

void IMP::em2d::ProjectionFinder::set_number_of_class_averages_members ( Ints n_members)

Definition at line 170 of file ProjectionFinder.h.

◆ set_projections()

void IMP::em2d::ProjectionFinder::set_projections ( const em2d::Images & projections)

Set the projections of the model to use for initial coarse correlation.

◆ set_save_match_images()

void IMP::em2d::ProjectionFinder::set_save_match_images ( bool x)

The projections of the model that best match the subject EM images are saved.

Their name will be: coarse-match-i.spi for coarse registration and fine_match-i.spi for full registration.

Definition at line 127 of file ProjectionFinder.h.

◆ set_subjects()

void IMP::em2d::ProjectionFinder::set_subjects ( const em2d::Images & subjects)

Set EM images to use as restraints.

◆ set_variance_images()

void IMP::em2d::ProjectionFinder::set_variance_images ( const em2d::Images & variances)

Set the projections of the model to use for initial coarse correlation.

◆ setup()

void IMP::em2d::ProjectionFinder::setup ( ScoreFunction * score_function,
const Em2DRestraintParameters & params )

Initializes the parameters to generate and match projections.

Definition at line 94 of file ProjectionFinder.h.

Member Data Documentation

◆ coarse_registration_time_

double IMP::em2d::ProjectionFinder::coarse_registration_time_
protected

Definition at line 179 of file ProjectionFinder.h.

◆ fast_optimization_mode_

bool IMP::em2d::ProjectionFinder::fast_optimization_mode_
protected

Definition at line 203 of file ProjectionFinder.h.

◆ fine_registration_time_

double IMP::em2d::ProjectionFinder::fine_registration_time_
protected

Definition at line 180 of file ProjectionFinder.h.

◆ masks_manager_

MasksManagerPtr IMP::em2d::ProjectionFinder::masks_manager_
protected

MasksManager masks_manager_;

Definition at line 219 of file ProjectionFinder.h.

◆ model_particles_

ParticlesTemp IMP::em2d::ProjectionFinder::model_particles_
protected

Definition at line 198 of file ProjectionFinder.h.

◆ n_members_

Ints IMP::em2d::ProjectionFinder::n_members_
protected

Definition at line 199 of file ProjectionFinder.h.

◆ number_of_optimized_projections_

unsigned int IMP::em2d::ProjectionFinder::number_of_optimized_projections_
protected

Definition at line 205 of file ProjectionFinder.h.

◆ parameters_setup_

bool IMP::em2d::ProjectionFinder::parameters_setup_
protected

Definition at line 202 of file ProjectionFinder.h.

◆ params_

Em2DRestraintParameters IMP::em2d::ProjectionFinder::params_
protected

Definition at line 215 of file ProjectionFinder.h.

◆ particles_set_

bool IMP::em2d::ProjectionFinder::particles_set_
protected

Definition at line 202 of file ProjectionFinder.h.

◆ polar_params_

PolarResamplingParameters IMP::em2d::ProjectionFinder::polar_params_
protected

Definition at line 213 of file ProjectionFinder.h.

◆ preprocessing_time_

double IMP::em2d::ProjectionFinder::preprocessing_time_
protected

Definition at line 179 of file ProjectionFinder.h.

◆ projections_

em2d::Images IMP::em2d::ProjectionFinder::projections_
protected

Definition at line 196 of file ProjectionFinder.h.

◆ projections_cog_

algebra::Vector2Ds IMP::em2d::ProjectionFinder::projections_cog_
protected

Definition at line 212 of file ProjectionFinder.h.

◆ PROJECTIONS_POLAR_AUTOC_

std::vector<DoubleMatrix> IMP::em2d::ProjectionFinder::PROJECTIONS_POLAR_AUTOC_
protected

Definition at line 210 of file ProjectionFinder.h.

◆ registration_done_

bool IMP::em2d::ProjectionFinder::registration_done_
protected

Definition at line 202 of file ProjectionFinder.h.

◆ registration_results_

RegistrationResults IMP::em2d::ProjectionFinder::registration_results_
protected

Definition at line 197 of file ProjectionFinder.h.

◆ score_function_

Pointer<ScoreFunction> IMP::em2d::ProjectionFinder::score_function_
protected

Definition at line 200 of file ProjectionFinder.h.

◆ SUBJECTS_

std::vector<DoubleMatrix> IMP::em2d::ProjectionFinder::SUBJECTS_
protected

Definition at line 207 of file ProjectionFinder.h.

◆ subjects_

em2d::Images IMP::em2d::ProjectionFinder::subjects_
protected

Main parameters.

Definition at line 194 of file ProjectionFinder.h.

◆ subjects_cog_

algebra::Vector2Ds IMP::em2d::ProjectionFinder::subjects_cog_
protected

Definition at line 211 of file ProjectionFinder.h.

◆ SUBJECTS_POLAR_AUTOC_

std::vector<DoubleMatrix> IMP::em2d::ProjectionFinder::SUBJECTS_POLAR_AUTOC_
protected

Definition at line 209 of file ProjectionFinder.h.

◆ variances_

em2d::Images IMP::em2d::ProjectionFinder::variances_
protected

Definition at line 195 of file ProjectionFinder.h.


The documentation for this class was generated from the following file: