FourierPixelInserter3DMode5 - encapsulates "method 5" for inserting a 2D Fourier slice into a 3D volume See comments in FourierPixelInserter3D for explanations.
More...
#include <reconstructor_tools.h>
|
static const string | NAME = "gauss_5" |
|
FourierPixelInserter3DMode5 - encapsulates "method 5" for inserting a 2D Fourier slice into a 3D volume See comments in FourierPixelInserter3D for explanations.
Definition at line 294 of file reconstructor_tools.h.
◆ FourierInserter3DMode5() [1/2]
EMAN::FourierInserter3DMode5::FourierInserter3DMode5 |
( |
| ) |
|
|
inline |
◆ ~FourierInserter3DMode5()
virtual EMAN::FourierInserter3DMode5::~FourierInserter3DMode5 |
( |
| ) |
|
|
inlinevirtual |
◆ FourierInserter3DMode5() [2/2]
◆ get_desc()
virtual string EMAN::FourierInserter3DMode5::get_desc |
( |
| ) |
const |
|
inlinevirtual |
Get a clear, concise description of this class.
- Returns
- a clear, concise description of this class
Implements EMAN::FactoryBase.
Definition at line 324 of file reconstructor_tools.h.
326 return "Fourier pixel insertion mode 5";
◆ get_name()
virtual string EMAN::FourierInserter3DMode5::get_name |
( |
| ) |
const |
|
inlinevirtual |
◆ insert_pixel()
bool FourierInserter3DMode5::insert_pixel |
( |
const float & |
xx, |
|
|
const float & |
yy, |
|
|
const float & |
zz, |
|
|
const std::complex< float > |
dt, |
|
|
const float & |
weight = 1.0 |
|
) |
| |
|
virtual |
Insert a complex pixel [dt[0]+dt[1]i] at (float) coordinate [xx,yy,zz] with weighting into a discrete 3D volume.
- Parameters
-
xx | the floating point x coordinate |
yy | the floating point y coordinate |
zz | the floating point z coordinate |
dt | the complex pixel value (dt[0] is real, dt[1] is imaginary) |
weight | the weight to given to this complex pixel |
- Returns
- A boolean that indicates the pixel has been inserted (or not)
Implements EMAN::FourierPixelInserter3D.
Definition at line 315 of file reconstructor_tools.cpp.
317 int x0 = (int) floor(xx-2.5);
318 int y0 = (int) floor(yy-2.5);
319 int z0 = (int) floor(zz-2.5);
322 if (x0<-
nx2-4 || y0<-
ny2-4 || z0<-nz2-4 || x0>
nx2+3 || y0>
ny2+3 || z0>
nz2+3 )
return false;
347 for (
int k = z0 ; k <= z1; k++) {
348 for (
int j = y0 ; j <= y1; j++) {
349 for (
int i = x0; i <= x1; i ++) {
357 off=
data->add_complex_at_fast(i,j,k,dt*gg*w);
362 std::complex<double> v1=dt*gg*w,v2=gg*w;
364 if (k<5 && j<5&& i<5&& k>=0 && j>=0 && i>=0) {
365 int idx=i*2+j*10+k*50;
366 ddata[idx]+=v1.real();
367 ddata[idx+1]+=v1.imag();
368 dnorm[idx]+=v2.real();
369 dnorm[idx+1]+=v2.imag();
377 printf(
"region writing not supported in mode 5\n");
EMData * data
A pointer to the constructor argument real_data.
float * norm
A pointer to the constructor argument normalize_values.
static int hypot3sq(int x, int y, int z)
Euclidean distance function squared in 3D: f(x,y,z) = (x*x + y*y + z*z);.
static float fast_exp(const float &f)
Returns an approximate of exp(x) using a cached table uses actual exp(x) outside the cached range.
References EMAN::FourierPixelInserter3D::data, EMAN::Util::fast_exp(), EMAN::Util::hypot3sq(), EMAN::EMConsts::I5G, EMAN::FourierPixelInserter3D::norm, EMAN::FourierPixelInserter3D::nx2, EMAN::FourierPixelInserter3D::ny2, EMAN::FourierPixelInserter3D::nz2, and EMAN::FourierPixelInserter3D::subx0.
◆ NEW()
◆ operator=()
◆ NAME
const string FourierInserter3DMode5::NAME = "gauss_5" |
|
static |
The documentation for this class was generated from the following files: