#include <stack>#include "ctf.h"#include "emdata.h"#include <iostream>#include <cmath>#include <cstring>#include <gsl/gsl_sf_bessel.h>#include <gsl/gsl_errno.h>#include <vector>#include <boost/shared_ptr.hpp>Include dependency graph for emdata_sparx.cpp:

Go to the source code of this file.
Classes | |
| class | ctf_store |
| class | ctf_store_new |
Defines | |
| #define | rdata(i, j, k) rdata[(i-1)+((j-1)+(k-1)*ny)*(size_t)nx] |
| #define | square(x) ((x)*(x)) |
| #define | proj(ix, iy, iz) proj[ix-1+(iy-1+(iz-1)*ny)*(size_t)nx] |
| #define | pnewimg(ix, iy, iz) pnewimg[ix-1+(iy-1+(iz-1)*ny)*(size_t)nx] |
| #define | in(i, j, k) in[i+(j+(k*ny))*(size_t)nx] |
| #define | in(i, j, k) in[i+(j+(k*ny))*(size_t)nx] |
| #define | QUADPI 3.141592653589793238462643383279502884197 |
| #define | DGR_TO_RAD QUADPI/180 |
| #define | rdata(i, j, k) rdata[(i-1)+((j-1)+(k-1)*ny)*(size_t)nx] |
| #define | X(i) X[i-1] |
| #define | Y(j) Y[j-1] |
| #define | Z(k) Z[k-1] |
| #define | avagadro (6.023*(double)pow(10.0,23.0)) |
| #define | density_protein (1.36) |
| #define | R (0.61803399f) |
| #define | C (1.f-R) |
| #define | QUADPI 3.141592653589793238462643383279502884197 |
| #define | DGR_TO_RAD QUADPI/180 |
| #define | fint(i, j, k) fint[(i-1) + ((j-1) + (k-1)*ny)*(size_t)lsd] |
| #define | fout(i, j, k) fout[(i-1) + ((j-1) + (k-1)*nyn)*(size_t)lsdn] |
| #define | fint(jx, jy, jz) fint[jx + (jy + jz*ny)*(size_t)nox] |
| #define | fint(jx, jy, jz) fint[jx + (jy + jz*ny)*(size_t)nx] |
| #define | fout(jx, jy, jz) fout[jx + (jy + jz*ny)*(size_t)nx] |
Functions | |
| float | dist (int lnlen, const float *line_1, const float *line_2) |
| float | dist_r (int lnlen, const float *line_1, const float *line_2) |
| void | swapx (float *a, float *b, float *temp, size_t nbytes) |
| Helper function for EMData::fft_shuffle, below. | |
| ostream & | operator<< (ostream &os, const Pixel &peak) |
| float | circumference (EMData *emdata, int npixel) |
|
|
Definition at line 5971 of file emdata_sparx.cpp. |
|
|
Definition at line 5974 of file emdata_sparx.cpp. Referenced by EMAN::EMData::find_3d_threshold(), EMAN::EMData::phase_cog(), and EMAN::Util::TwoDTestFunc(). |
|
|
Definition at line 5972 of file emdata_sparx.cpp. |
|
|
Definition at line 6268 of file emdata_sparx.cpp. |
|
|
Definition at line 6268 of file emdata_sparx.cpp. Referenced by EMAN::Util::CANG(). |
|
|
Definition at line 7216 of file emdata_sparx.cpp. |
|
|
Definition at line 7216 of file emdata_sparx.cpp. |
|
|
Definition at line 7216 of file emdata_sparx.cpp. Referenced by EMAN::EMData::filter_by_image(), EMAN::EMData::Four_ds(), EMAN::EMData::Four_shuf_ds_cen_us(), EMAN::EMData::FourInterpol(), EMAN::EMData::FourTruncate(), and EMAN::EMData::replace_amplitudes(). |
|
|
Definition at line 7217 of file emdata_sparx.cpp. |
|
|
Definition at line 7217 of file emdata_sparx.cpp. Referenced by EMAN::EMData::Four_ds(), EMAN::EMData::Four_shuf_ds_cen_us(), EMAN::EMData::FourInterpol(), EMAN::EMData::FourTruncate(), and EMAN::EMData::replace_amplitudes(). |
|
|
Definition at line 2779 of file emdata_sparx.cpp. |
|
|
|
Definition at line 1005 of file emdata_sparx.cpp. Referenced by EMAN::EMData::average_circ_sub(). |
|
|
|
Definition at line 6267 of file emdata_sparx.cpp. |
|
|
Definition at line 6267 of file emdata_sparx.cpp. |
|
|
Definition at line 5973 of file emdata_sparx.cpp. Referenced by EMAN::EMData::find_3d_threshold(), EMAN::Transform::orthogonalize(), EMAN::NewLowpassGaussProcessor::process_inplace(), and EMAN::Util::triquad(). |
|
|
Definition at line 5836 of file emdata_sparx.cpp. |
|
|
Definition at line 5836 of file emdata_sparx.cpp. |
|
|
|
Definition at line 5837 of file emdata_sparx.cpp. Referenced by EMAN::SVDAnalyzer::analyze(), Derivatives(), Derivatives_G(), EMAN::EMData::phase_cog(), Steepda(), Steepda_G(), EMAN::Util::svdcmp(), Utilit2(), and Utilit2_G(). |
|
|
Definition at line 5838 of file emdata_sparx.cpp. Referenced by Derivatives(), Derivatives_G(), EMAN::EMData::phase_cog(), Steepda(), Steepda_G(), Utilit2(), Utilit2_G(), and EMAN::Util::WTF(). |
|
|
Definition at line 5839 of file emdata_sparx.cpp. Referenced by EMAN::EMData::phase_cog(). |
|
||||||||||||
|
Definition at line 6465 of file emdata_sparx.cpp. References Assert, data, EMAN::EMData::get_data(), EMAN::EMData::get_xsize(), EMAN::EMData::get_ysize(), EMAN::EMData::get_zsize(), nx, and ny. Referenced by EMAN::EMData::norm_pad(). 06466 {
06467 int nx = emdata->get_xsize();
06468 int ny = emdata->get_ysize();
06469 int nz = emdata->get_zsize();
06470
06471 float* data = emdata->get_data();
06472 if( ny==1 && nz==1 ) {
06473 // 1d case
06474 float sumf=0.0;
06475 int sumn=0;
06476 for( int i=0; i < npixel; ++i ) {
06477 sumf += data[i];
06478 sumf += data[nx-1-i];
06479 sumn += 2;
06480 }
06481 return sumf/sumn;
06482 }
06483
06484 if( nz==1 ) {
06485 float sumf=0.0;
06486 int sumn=0;
06487 int id=0;
06488 for( int iy=0; iy < ny; ++iy ) {
06489 for( int ix=0; ix < nx; ++ix ) {
06490 if( iy<npixel || iy>ny-1-npixel || ix<npixel || ix>nx-1-npixel ) {
06491 sumf += data[id];
06492 sumn += 1;
06493 }
06494 id++;
06495 }
06496 }
06497
06498 Assert( id==nx*ny );
06499 Assert( sumn == nx*ny - (nx-2*npixel)*(ny-2*npixel) );
06500 return sumf/sumn;
06501 }
06502
06503 // 3d cases;
06504
06505 float sumf = 0.0;
06506 size_t sumn = 0;
06507 size_t id = 0;
06508 for( int iz=0; iz < nz; ++iz) {
06509 for( int iy=0; iy < ny; ++iy) {
06510 for( int ix=0; ix < nx; ++ix ) {
06511 if( iz<npixel||iz>nz-1-npixel||iy<npixel||iy>ny-1-npixel||ix<npixel||ix>nx-1-npixel) {
06512 sumf += data[id];
06513 sumn += 1;
06514 }
06515 id++;
06516 }
06517 }
06518 }
06519
06520
06521 Assert( id==(size_t)nx*ny*nz);
06522 Assert( sumn==(size_t)nx*ny*nz-(size_t)(nx-2*npixel)*(ny-2*npixel)*(nz-2*npixel) );
06523 return sumf/sumn;
06524 }
|
|
||||||||||||||||
|
Definition at line 474 of file emdata_sparx.cpp. Referenced by EMAN::EMData::cm_euc(), EMAN::Quaternion::normalize(), EMAN::MakeRadiusProcessor::process_dist_pixel(), EMAN::MaskGaussInvProcessor::process_dist_pixel(), EMAN::MaskGaussProcessor::process_dist_pixel(), EMAN::MaskNoiseProcessor::process_dist_pixel(), EMAN::MaskEdgeMeanProcessor::process_dist_pixel(), EMAN::MaskSharpProcessor::process_dist_pixel(), EMAN::RotationalSubstractProcessor::process_inplace(), EMAN::RotationalAverageProcessor::process_inplace(), EMAN::MaskGaussNonuniformProcessor::process_pixel(), EMAN::CircularMaskProcessor::process_pixel(), EMAN::PointArray::set_from_density_map(), trmesh_(), and EMAN::Util::trmsh3_(). 00475 {
00476 float dis2=0.0;
00477 for( int i=0; i < lnlen; ++i) {
00478 float tmp = line_1[i] - line_2[i];
00479 dis2 += tmp*tmp;
00480 }
00481 //return static_cast<float>(std::sqrt(dis2));
00482 return dis2;
00483 }
|
|
||||||||||||||||
|
Definition at line 485 of file emdata_sparx.cpp. References sqrt(). 00486 {
00487 double dis2 = 0.0;
00488 for( int i=0; i < lnlen; ++i ) {
00489 float tmp = line_1[lnlen-1-i] - line_2[i];
00490 dis2 += tmp*tmp;
00491 }
00492 return static_cast<float>(std::sqrt(dis2));
00493 }
|
|
||||||||||||
|
Definition at line 4998 of file emdata_sparx.cpp. References EMAN::Pixel::value, EMAN::Pixel::x, EMAN::Pixel::y, and EMAN::Pixel::z.
|
|
||||||||||||||||||||
|
Helper function for EMData::fft_shuffle, below.
Definition at line 4034 of file emdata_sparx.cpp. References b. Referenced by EMAN::EMData::fft_shuffle(). 04034 {
04035 memcpy(temp, a, nbytes);
04036 memcpy(a, b, nbytes);
04037 memcpy(b, temp, nbytes);
04038 }
|
1.3.9.1