IMP  2.1.1
The Integrative Modeling Platform
IMP::em2d::PolarResamplingParameters Class Reference

#include <IMP/em2d/PolarResamplingParameters.h>

Public Member Functions

 PolarResamplingParameters (unsigned int rows, unsigned int cols)
 
 PolarResamplingParameters (const cv::Mat &m)
 
void create_maps_for_resampling ()
 
double get_angle_step () const
 get the angular step used
 
double get_ending_radius () const
 Gets the largest radius.
 
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)
 
double get_radius (unsigned int n_ring) const
 Gets the current radius employed for the ring in consideration)
 
double get_radius_step () const
 Get the step for the radius coordinate.
 
void get_resampling_map (cv::Mat &m1) const
 
void get_resampling_maps (cv::Mat &m1, cv::Mat &m2) const
 
double get_starting_radius () const
 Gets the initial radius of the resampling.
 
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_
 
cv::Mat map_16SC2_
 
cv::Mat map_16UC1_
 
unsigned int matrix_cols_
 
unsigned int matrix_rows_
 
unsigned int n_angles_
 
unsigned int n_rings_
 
bool parameters_set_
 
cv::Mat polar_map_
 
double radius_step_
 
double starting_radius_
 

Detailed Description

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

Definition at line 23 of file PolarResamplingParameters.h.

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 cv::Mat &  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

Definition at line 127 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.

void IMP::em2d::PolarResamplingParameters::get_resampling_map ( cv::Mat &  m1) const

Obtain the resampling map of type CV_32FC2 (floats, slower that those obtained with get_resampling_maps()

Definition at line 162 of file PolarResamplingParameters.h.

void IMP::em2d::PolarResamplingParameters::get_resampling_maps ( cv::Mat &  m1,
cv::Mat &  m2 
) const

Get the samplings maps of type CV_16SC2 and CV_16UC1 (this map combination is faster for remapping. See OpenCV hel for remap()

Definition at line 155 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.

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

Initalize 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 gess is half the rows and columns

Definition at line 52 of file PolarResamplingParameters.h.


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