FourierPixelInserter3DMode2l - trilinear 2x2x2 inserter See comments in FourierPixelInserter3D for explanations.
More...
#include <reconstructor_tools.h>
|
static const string | NAME = "trilinear" |
|
FourierPixelInserter3DMode2l - trilinear 2x2x2 inserter See comments in FourierPixelInserter3D for explanations.
Definition at line 226 of file reconstructor_tools.h.
◆ FourierInserter3DMode2l() [1/2]
EMAN::FourierInserter3DMode2l::FourierInserter3DMode2l |
( |
| ) |
|
|
inline |
◆ ~FourierInserter3DMode2l()
virtual EMAN::FourierInserter3DMode2l::~FourierInserter3DMode2l |
( |
| ) |
|
|
inlinevirtual |
◆ FourierInserter3DMode2l() [2/2]
◆ get_desc()
virtual string EMAN::FourierInserter3DMode2l::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 244 of file reconstructor_tools.h.
246 return "Fourier pixel insertion 2x2x2 with trilinear interpolation";
◆ get_name()
virtual string EMAN::FourierInserter3DMode2l::get_name |
( |
| ) |
const |
|
inlinevirtual |
◆ insert_pixel()
bool FourierInserter3DMode2l::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 191 of file reconstructor_tools.cpp.
193 int x0 = (int) floor(xx);
194 int y0 = (int) floor(yy);
195 int z0 = (int) floor(zz);
199 if (x0<-
nx2-1 || y0<-
ny2-1 || z0<-nz2-1 || x0>
nx2 || y0>
ny2 || z0>
nz2 )
return false;
216 for (
int k = z0 ; k <= z1; k++) {
217 for (
int j = y0 ; j <= y1; j++) {
218 for (
int i = x0; i <= x1; i ++) {
221 gg=(1.0-fabs(i-xx))*(1.0-fabs(j-yy))*(1.0-fabs(k-zz))*weight;
224 off=
data->add_complex_at_fast(i,j,k,dt*gg);
228 if (k==23 && j==0 && i==113) {
229 std::complex<float> pv =
data->get_complex_at(113,0,23);
230 float pnv =
norm[off/2];
231 printf(
"insert: %1.4g\t%1.4g\t%1.4g\t%1.4g\t%1.4g\t%1.4g\n",pv.real()/pnv,pv.imag()/pnv,pnv,dt.real(),dt.imag(),gg);
244 for (
int k = z0 ; k <= z0 + 1; k++) {
245 for (
int j = y0 ; j <= y0 + 1; j++) {
246 for (
int i = x0; i <= x0 + 1; i ++) {
249 gg=(1.0-fabs(i-xx))*(1.0-fabs(j-yy))*(1.0-fabs(k-zz))*weight;
252 if (
subx0<0) off=
data->add_complex_at(i,j,k,dt*gg);
254 if (
static_cast<int>(off)!=
nxyz) {
norm[off/2]+=gg; pc+=1; }
259 if (pc>0)
return true;
EMData * data
A pointer to the constructor argument real_data.
float * norm
A pointer to the constructor argument normalize_values.
References EMAN::FourierPixelInserter3D::data, EMAN::FourierPixelInserter3D::fullnx, EMAN::FourierPixelInserter3D::fullny, EMAN::FourierPixelInserter3D::fullnz, EMAN::EMConsts::I2G, EMAN::FourierPixelInserter3D::norm, EMAN::FourierPixelInserter3D::nx2, EMAN::FourierPixelInserter3D::nxyz, EMAN::FourierPixelInserter3D::ny2, EMAN::FourierPixelInserter3D::nz2, EMAN::FourierPixelInserter3D::subx0, EMAN::FourierPixelInserter3D::suby0, and EMAN::FourierPixelInserter3D::subz0.
◆ NEW()
◆ operator=()
◆ NAME
const string FourierInserter3DMode2l::NAME = "trilinear" |
|
static |
The documentation for this class was generated from the following files: