IMP logo
Public Member Functions | Protected Attributes
IMP::em2d::PolarResamplingParameters Class Reference

Detailed Description

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

List of all members.

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_

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

IMP::em2d::PolarResamplingParameters::PolarResamplingParameters ( const cv::Mat &  m)

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

  \params[in] matrix Matrix that is going to be resampled

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

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

get the angular step used

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

Gets the largest radius.

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()

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

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

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

Gets the current radius employed for the ring in consideration)

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

Get the step for the radius coordinate.

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()

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()

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

Gets the initial radius of the resampling.

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

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


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

Generated on Tue May 22 2012 23:33:34 for IMP by doxygen 1.8.1