32#ifndef eman__polardata_h__
33#define eman__polardata_h__
53 printf(
"Welcome to UnevenMatrix\n");
60 printf(
"Destructor of UnevenMatrix...\n");
97 void print_UnevenMatrix() {
98 printf(
"print function in UnevenMatrix\n");
116 LOGERR(
"x dimension error ... x0(%d) > x1(%d)",
x0,
x1);
139 PolarData() {printf(
"Welcome to PolarData class... \n");}
150 printf(
"Destructor of PolarData...\n");
156 printf(
"PolarData class is a specialized image class for storing the \n");
157 printf(
"results of a transform from EMData to polar coordinates, currently \n");
158 printf(
"support 2D only. Data on x dimension may be variable size, which \n");
159 printf(
"is defined in map< int, Xdim > desc_data\n");
162 int test_init_desc_data();
175 vector<int>
Numrinit(
int first_ring,
int last_ring,
int skip,
string mode);
186 vector<float>
ringwe( vector<int> numr,
string mode );
EMData stores an image's data and defines core image processing routines.
a specialized image class for storing the results of a transform from EMData to polar coordinates,...
vector< float > ringwe(vector< int > numr, string mode)
calculate ring weights for rotational alignment
map< int, float > weight
the ring weights for each radius r
int log2(int n)
Returns the smallet power by which 2 has to be raised to obtain an integer kess equal n.
vector< int > Numrinit(int first_ring, int last_ring, int skip, string mode)
calculate the number of element for each ring
a general data structure for a matrix with variable x dim size for different y
int get_size()
get the total size of the data block
float * data
store all data in one dimension float array for cache efficiency, we calculate the offset for x,...
void alloc_data()
allocation memory for data array
int get_xmin(int y)
get the minimal x dim value for a given y
int get_xmax(int y)
get the maximal x dim value for a given y, note: x1 is one out of the max
int tot_size
the total size of the data
map< int, Xdim > desc_data
describe for each y, the x dimension's size and range
int get_xsize(int y)
get the x dim size for a given y
#define InvalidValueException(val, desc)
struct to define x dimension size for each y, x0 is inclusive, x1 is one after the maximum,...