IMP logo
IMP Reference Guide  develop.d36d3deffb,2026/11/09
The Integrative Modeling Platform
IMP::em2d::PolarResamplingParameters Class Reference

#include <IMP/em2d/PolarResamplingParameters.h>

Detailed Description

Class to manage the parameters required for the polar resampling in the rotational_alignment function

Definition at line 24 of file PolarResamplingParameters.h.

Public Member Functions

 PolarResamplingParameters (unsigned int rows, unsigned int cols)
 
 PolarResamplingParameters (const DoubleMatrix &m)
 
void create_maps_for_resampling ()
 
double get_angle_step () const
 get the angular step used More...
 
double get_ending_radius () const
 Gets the largest radius. More...
 
bool get_is_setup () const
 
unsigned int get_number_of_angles () const
 
unsigned int get_number_of_rings () const
 Get the number of rings (that is, the number of radius values considered) More...
 
double get_radius (unsigned int n_ring) const
 Gets the current radius employed for the ring in consideration) More...
 
double get_radius_step () const
 Get the step for the radius coordinate. More...
 
void get_resampling_map (internal::RowMajorArray< float > &m1) const
 Get the map of the (row, column) coordinates of each sample. More...
 
double get_starting_radius () const
 Gets the initial radius of the resampling. More...
 
void set_estimated_number_of_angles (unsigned int aprox_value)
 
void setup (unsigned int rows, unsigned int cols)
 
void show (std::ostream &out) const
 

Protected Attributes

double angle_step_
 
double ending_radius_
 
unsigned int matrix_cols_
 
unsigned int matrix_rows_
 
unsigned int n_angles_
 
unsigned int n_rings_
 
bool parameters_set_
 
internal::RowMajorArray< float > polar_map_
 
double radius_step_
 
double starting_radius_
 

Constructor & Destructor Documentation

IMP::em2d::PolarResamplingParameters::PolarResamplingParameters ( unsigned int  rows,
unsigned int  cols 
)

Compute the parameters for a polar resampling from the dimensions of a matrix

Definition at line 33 of file PolarResamplingParameters.h.

IMP::em2d::PolarResamplingParameters::PolarResamplingParameters ( const DoubleMatrix &  m)

Compute the parameters for a polar resampling getting the dimensions from the matrix

Parameters
[in]mMatrix that is going to be resampled

Definition at line 42 of file PolarResamplingParameters.h.

Member Function Documentation

void IMP::em2d::PolarResamplingParameters::create_maps_for_resampling ( )

After the number of radius and angles values are set, this function Builds a map of resampling coordinates. This map is very useful for speeding up the resampling (see do_resample_polar())

double IMP::em2d::PolarResamplingParameters::get_angle_step ( ) const

get the angular step used

Definition at line 110 of file PolarResamplingParameters.h.

double IMP::em2d::PolarResamplingParameters::get_ending_radius ( ) const

Gets the largest radius.

Definition at line 76 of file PolarResamplingParameters.h.

unsigned int IMP::em2d::PolarResamplingParameters::get_number_of_angles ( ) const

Gets the number of points that are sampled for the angles remember that this number is usually different to the approximated value that you provide to the function set_estimated_number_of_angles()

Definition at line 107 of file PolarResamplingParameters.h.

unsigned int IMP::em2d::PolarResamplingParameters::get_number_of_rings ( ) const

Get the number of rings (that is, the number of radius values considered)

Definition at line 91 of file PolarResamplingParameters.h.

double IMP::em2d::PolarResamplingParameters::get_radius ( unsigned int  n_ring) const

Gets the current radius employed for the ring in consideration)

Definition at line 82 of file PolarResamplingParameters.h.

double IMP::em2d::PolarResamplingParameters::get_radius_step ( ) const

Get the step for the radius coordinate.

Definition at line 113 of file PolarResamplingParameters.h.

void IMP::em2d::PolarResamplingParameters::get_resampling_map ( internal::RowMajorArray< float > &  m1) const

Get the map of the (row, column) coordinates of each sample.

The coordinates are stored as pairs of floats.

Note
For internal use.

Definition at line 131 of file PolarResamplingParameters.h.

double IMP::em2d::PolarResamplingParameters::get_starting_radius ( ) const

Gets the initial radius of the resampling.

Definition at line 70 of file PolarResamplingParameters.h.

void IMP::em2d::PolarResamplingParameters::set_estimated_number_of_angles ( unsigned int  aprox_value)

You give an approximated number of values that you want to use for the resampling, and the function computes the optimal number for an FFT based on this approximated number

Definition at line 99 of file PolarResamplingParameters.h.

+ Here is the call graph for this function:

void IMP::em2d::PolarResamplingParameters::setup ( unsigned int  rows,
unsigned int  cols 
)

Initialize the internal parameters to generate all the values The class uses a number of radius values for resampling that is optimal to perform FFT during the rotational alignment. The first guess is half the rows and columns

Definition at line 52 of file PolarResamplingParameters.h.

+ Here is the call graph for this function:


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