#include "reconstructor.h"#include "ctf.h"#include "emassert.h"#include "symmetry.h"#include <cstring>#include <fstream>#include <iomanip>#include <boost/bind.hpp>#include <boost/format.hpp>#include <gsl/gsl_statistics_double.h>#include <gsl/gsl_fit.h>#include <iostream>#include <algorithm>#include <sstream>

Go to the source code of this file.
Defines | |
| #define | tw(i, j, k) tw[ i-1 + (j-1+(k-1)*iy)*ix ] |
| #define | tw(i, j, k) tw[ i-1 + (j-1+(k-1)*iy)*ix ] |
| #define | tw(i, j, k) tw[ i-1 + (j-1+(k-1)*iy)*ix ] |
| #define | tw(i, j, k) tw[ i-1 + (j-1+(k-1)*iy)*ix ] |
Enumerations | |
| enum | weighting_method { NONE, ESTIMATE, VORONOI } |
Functions | |
| template<typename T> | |
| void | checked_delete (T *&x) |
| EMData * | EMAN::padfft_slice (const EMData *const slice, const Transform &t, int npad) |
| Direct Fourier inversion Reconstructor. | |
| float | max2d (int kc, const vector< float > &pow_a) |
| float | max3d (int kc, const vector< float > &pow_a) |
| void | printImage (const EMData *line) |
| void | circumference (EMData *win) |
| void | EMAN::dump_reconstructors () |
| map< string, vector< string > > | EMAN::dump_reconstructors_list () |
| #define tw | ( | i, | |||
| j, | |||||
| k | ) | tw[ i-1 + (j-1+(k-1)*iy)*ix ] |
Definition at line 3294 of file reconstructor.cpp.
| #define tw | ( | i, | |||
| j, | |||||
| k | ) | tw[ i-1 + (j-1+(k-1)*iy)*ix ] |
Definition at line 3294 of file reconstructor.cpp.
| #define tw | ( | i, | |||
| j, | |||||
| k | ) | tw[ i-1 + (j-1+(k-1)*iy)*ix ] |
Definition at line 3294 of file reconstructor.cpp.
| #define tw | ( | i, | |||
| j, | |||||
| k | ) | tw[ i-1 + (j-1+(k-1)*iy)*ix ] |
| enum weighting_method |
| void checked_delete | ( | T *& | x | ) | [inline] |
Definition at line 64 of file reconstructor.cpp.
Referenced by EMAN::file_store::add_image(), EMAN::newfile_store::add_image(), EMAN::nnSSNR_ctfReconstructor::insert_slice(), EMAN::nn4_ctfReconstructor::insert_slice(), EMAN::nnSSNR_Reconstructor::insert_slice(), EMAN::nn4Reconstructor::insert_slice(), EMAN::padfft_slice(), EMAN::nn4_ctfReconstructor::~nn4_ctfReconstructor(), EMAN::nn4Reconstructor::~nn4Reconstructor(), EMAN::nnSSNR_ctfReconstructor::~nnSSNR_ctfReconstructor(), and EMAN::nnSSNR_Reconstructor::~nnSSNR_Reconstructor().
00065 { 00066 typedef char type_must_be_complete[ sizeof(T)? 1: -1 ]; 00067 (void) sizeof(type_must_be_complete); 00068 delete x; 00069 x = NULL; 00070 }
| void circumference | ( | EMData * | win | ) |
Definition at line 2324 of file reconstructor.cpp.
References EMAN::EMData::get_data(), EMAN::EMData::get_xsize(), EMAN::EMData::get_ysize(), EMAN::EMData::get_zsize(), and tw.
Referenced by EMAN::nn4_ctfReconstructor::finish(), EMAN::nn4Reconstructor::finish(), and EMAN::EMData::norm_pad().
02325 { 02326 float *tw = win->get_data(); 02327 // mask and subtract circumference average 02328 int ix = win->get_xsize(); 02329 int iy = win->get_ysize(); 02330 int iz = win->get_zsize(); 02331 int L2 = (ix/2)*(ix/2); 02332 int L2P = (ix/2-1)*(ix/2-1); 02333 02334 int IP = ix/2+1; 02335 int JP = iy/2+1; 02336 int KP = iz/2+1; 02337 02338 float TNR = 0.0f; 02339 size_t m = 0; 02340 for (int k = 1; k <= iz; ++k) { 02341 for (int j = 1; j <= iy; ++j) { 02342 for (int i = 1; i <= ix; ++i) { 02343 size_t LR = (k-KP)*(k-KP)+(j-JP)*(j-JP)+(i-IP)*(i-IP); 02344 if (LR<=(size_t)L2) { 02345 if(LR >= (size_t)L2P && LR <= (size_t)L2) { 02346 TNR += tw(i,j,k); 02347 ++m; 02348 } 02349 } 02350 } 02351 } 02352 } 02353 02354 TNR /=float(m); 02355 for (int k = 1; k <= iz; ++k) { 02356 for (int j = 1; j <= iy; ++j) { 02357 for (int i = 1; i <= ix; ++i) { 02358 size_t LR = (k-KP)*(k-KP)+(j-JP)*(j-JP)+(i-IP)*(i-IP); 02359 if (LR<=(size_t)L2) tw(i,j,k) -= TNR; else tw(i,j,k) = 0.0f; 02360 } 02361 } 02362 } 02363 02364 }
| float max2d | ( | int | kc, | |
| const vector< float > & | pow_a | |||
| ) |
Definition at line 2091 of file reconstructor.cpp.
Referenced by EMAN::nn4Reconstructor::finish().
02092 { 02093 float max = 0.0; 02094 for( int i=-kc; i <= kc; ++i ) { 02095 for( int j=-kc; j <= kc; ++j ) { 02096 if( i==0 && j==0 ) continue; 02097 { 02098 int c = 2*kc+1 - std::abs(i) - std::abs(j); 02099 max = max + pow_a[c]; 02100 } 02101 } 02102 } 02103 return max; 02104 }
| float max3d | ( | int | kc, | |
| const vector< float > & | pow_a | |||
| ) |
Definition at line 2106 of file reconstructor.cpp.
Referenced by EMAN::nnSSNR_ctfReconstructor::finish(), EMAN::nn4_ctfReconstructor::finish(), EMAN::nnSSNR_Reconstructor::finish(), and EMAN::nn4Reconstructor::finish().
02107 { 02108 float max = 0.0; 02109 for( int i=-kc; i <= kc; ++i ) { 02110 for( int j=-kc; j <= kc; ++j ) { 02111 for( int k=-kc; k <= kc; ++k ) { 02112 if( i==0 && j==0 && k==0 ) continue; 02113 // if( i!=0 ) 02114 { 02115 int c = 3*kc+1 - std::abs(i) - std::abs(j) - std::abs(k); 02116 max = max + pow_a[c]; 02117 // max = max + c * c; 02118 // max = max + c; 02119 } 02120 } 02121 } 02122 } 02123 return max; 02124 }
| void printImage | ( | const EMData * | line | ) |
Definition at line 2235 of file reconstructor.cpp.
References Assert, EMAN::EMData::get_value_at(), EMAN::EMData::get_xsize(), EMAN::EMData::get_ysize(), EMAN::EMData::get_zsize(), nx, and ny.
02236 { 02237 Assert( line->get_zsize()==1 ); 02238 02239 02240 int nx = line->get_xsize(); 02241 int ny = line->get_ysize(); 02242 for( int j=0; j < ny; ++j ) { 02243 for( int i=0; i < nx; ++i ) printf( "%10.3f ", line->get_value_at(i,j) ); 02244 printf( "\n" ); 02245 } 02246 }
1.5.6