IMP  2.0.0
The Integrative Modeling Platform
IMP::em2d::ProjectionFinder Class Reference

class to perform registration of model projections to images images

#include <IMP/em2d/ProjectionFinder.h>

+ Inheritance diagram for IMP::em2d::ProjectionFinder:

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
 
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. More...
 
void show (std::ostream &out) const
 
- Public Member Functions inherited from IMP::base::Object
virtual void clear_caches ()
 
virtual IMP::base::VersionInfo get_version_info () const =0
 Get information about the module and version of the object.
 
void set_check_level (CheckLevel l)
 
void set_log_level (LogLevel l)
 Set the logging level used in this object. More...
 
void set_was_used (bool tf) const
 
void show (std::ostream &out=std::cout) const
 
const std::string & get_name () const
 
void set_name (std::string name)
 

Protected Member Functions

void do_preprocess_for_fast_coarse_registration (const cv::Mat &m, algebra::Vector2D &center, cv::Mat &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::base::Object
 Object (std::string name)
 Construct an object with the given name. More...
 

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< cv::Mat > PROJECTIONS_POLAR_AUTOC_
 
bool registration_done_
 
RegistrationResults registration_results_
 
Pointer< ScoreFunctionscore_function_
 
em2d::Images subjects_
 Main parameters.
 
std::vector< cv::Mat > SUBJECTS_
 
algebra::Vector2Ds subjects_cog_
 
std::vector< cv::Mat > SUBJECTS_POLAR_AUTOC_
 
em2d::Images variances_
 

Related Functions

(Note that these are not member functions.)

typedef IMP::base::Vector
< IMP::base::WeakPointer
< ProjectionFinder > > 
ProjectionFindersTemp
 

Detailed Description

Definition at line 78 of file ProjectionFinder.h.

Member Function Documentation

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

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

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
void IMP::em2d::ProjectionFinder::get_complete_registration ( )

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

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

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

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

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

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 increased it for get more chances of finding the best projection

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 137 of file ProjectionFinder.h.

void IMP::em2d::ProjectionFinder::setup ( ScoreFunction score_function,
const Em2DRestraintParameters &  params 
)
Parameters
[in]resolutionto employ to generate projections for matching with the EM images. Default is the maximum possible, 1.
[in]coarse_registration_methodMethod for 1st step of projection finding, the 2D alignment: 0 => FFT alignment no preprocessing. 1 => FFT alignment with preprocessing (Default and recommended). 2 => FFT alginment and centers of gravity (fast, but only works for low noise) during testing.
[in]optimizationsteps to use by the simplex optimizer. The default value is the one found during the benchmark to perform well
[in]simplex_initial_lengthInitial value to start the simplex search The default value is based on the benchmark results
[in]Valueof the simplex length stop the search. The smaller, the more accurate the finder, but slower

Definition at line 102 of file ProjectionFinder.h.

+ Here is the call graph for this function:

Friends And Related Function Documentation

Pass a set of objects.

Definition at line 243 of file ProjectionFinder.h.

Member Data Documentation

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

MasksManager masks_manager_;

Definition at line 240 of file ProjectionFinder.h.


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