#include <reconstructor_tools.h>
Inheritance diagram for EMAN::FourierInserter3DMode8:
Public Member Functions | |
FourierInserter3DMode8 () | |
virtual | ~FourierInserter3DMode8 () |
virtual bool | insert_pixel (const float &xx, const float &yy, const float &zz, const std::complex< float > dt, const float &weight=1.0) |
Insert a complex pixel [dt[0]+dt[1]i] at (float) coordinate [xx,yy,zz] with weighting into a discrete 3D volume. | |
virtual string | get_name () const |
Get the unique name of this class (especially for factory based instantiation access). | |
virtual string | get_desc () const |
Get a clear, concise description of this class. | |
virtual void | init () |
Static Public Member Functions | |
static FourierPixelInserter3D * | NEW () |
Static Public Attributes | |
static const string | NAME = "experimental" |
Private Member Functions | |
FourierInserter3DMode8 (const FourierInserter3DMode8 &) | |
FourierInserter3DMode8 & | operator= (const FourierInserter3DMode8 &) |
Private Attributes | |
int | mFreqCutoff |
float | mDFreq |
float * | W |
Definition at line 375 of file reconstructor_tools.h.
EMAN::FourierInserter3DMode8::FourierInserter3DMode8 | ( | ) | [inline] |
Definition at line 378 of file reconstructor_tools.h.
Referenced by NEW().
00378 : W(0) 00379 { 00380 00381 }
virtual EMAN::FourierInserter3DMode8::~FourierInserter3DMode8 | ( | ) | [inline, virtual] |
EMAN::FourierInserter3DMode8::FourierInserter3DMode8 | ( | const FourierInserter3DMode8 & | ) | [private] |
virtual string EMAN::FourierInserter3DMode8::get_desc | ( | ) | const [inline, virtual] |
Get a clear, concise description of this class.
Implements EMAN::FactoryBase.
Definition at line 400 of file reconstructor_tools.h.
virtual string EMAN::FourierInserter3DMode8::get_name | ( | ) | const [inline, virtual] |
Get the unique name of this class (especially for factory based instantiation access).
Implements EMAN::FactoryBase.
Definition at line 395 of file reconstructor_tools.h.
References NAME.
00396 { 00397 return NAME; 00398 }
void FourierInserter3DMode8::init | ( | ) | [virtual] |
Reimplemented from EMAN::FourierPixelInserter3D.
Definition at line 379 of file reconstructor_tools.cpp.
References EMAN::Util::getBaldwinGridWeights(), EMAN::FourierPixelInserter3D::init(), mDFreq, mFreqCutoff, EMAN::FourierPixelInserter3D::nx, and W.
00380 { 00381 FourierPixelInserter3D::init(); 00382 int P = (int)((1.0+0.25)*nx+1); 00383 float r = (float)(nx+1)/(float)P; 00384 mFreqCutoff = 2; 00385 mDFreq = 0.2f; 00386 if (W != 0) delete [] W; 00387 W = Util::getBaldwinGridWeights(mFreqCutoff, (float)P, r,mDFreq,0.5f,0.2f); 00388 00389 }
bool FourierInserter3DMode8::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.
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 |
Implements EMAN::FourierPixelInserter3D.
Definition at line 390 of file reconstructor_tools.cpp.
00391 { 00392 // int x0 = (int) floor(qx); 00393 // int y0 = (int) floor(qy); 00394 // int z0 = (int) floor(qz); 00395 00396 // int sizeW = (int)(1+2*mFreqCutoff/mDFreq); 00397 // int sizeWmid = sizeW/2; 00398 00399 // for (int z = z0-mFreqCutoff; z < z0+mFreqCutoff; ++z){ 00400 // for (int y = y0-mFreqCutoff; y < y0+mFreqCutoff; ++y){ 00401 // for (int x = x0-mFreqCutoff; x < x0+mFreqCutoff; ++x){ 00402 // if ( x < 0 || x >= nx ) continue; 00403 // if ( y < 0 || y >= ny ) continue; 00404 // if ( z < 0 || z >= nz ) continue; 00405 // float dist = (float)((x-x0)*(x-x0)+(y-y0)*(y-y0)+(z-z0)*(z-z0)); 00406 // dist = sqrtf(dist); 00407 // // We enforce a spherical kernel 00408 // if ( dist > mFreqCutoff ) continue; 00409 // int idx = (int)(sizeWmid + dist/mDFreq); 00410 // if (idx >= sizeW) throw; 00411 // float residual = dist/mDFreq - (int)(dist/mDFreq); 00412 // if ( fabs(residual) > 1) throw; 00413 // 00414 // float factor = W[idx]*(1.0f-residual)+W[idx+1]*residual*weight; 00415 // 00416 // size_t k = z*nx*ny + y*nx + 2*x; 00417 // 00418 // // float c = Util::agauss(1, x-x0,y-y0,z-z0, EMConsts::I2G); 00419 // rdata[k] += fq[0]*factor; 00420 // rdata[k+1] += fq[1]*factor; 00421 // 00422 // 00423 // norm[k/2] += weight; 00424 // 00425 // } 00426 // } 00427 // } 00428 00429 return true; 00430 }
static FourierPixelInserter3D* EMAN::FourierInserter3DMode8::NEW | ( | ) | [inline, static] |
Definition at line 390 of file reconstructor_tools.h.
References FourierInserter3DMode8().
00391 { 00392 return new FourierInserter3DMode8(); 00393 }
FourierInserter3DMode8& EMAN::FourierInserter3DMode8::operator= | ( | const FourierInserter3DMode8 & | ) | [private] |
float EMAN::FourierInserter3DMode8::mDFreq [private] |
int EMAN::FourierInserter3DMode8::mFreqCutoff [private] |
const string FourierInserter3DMode8::NAME = "experimental" [static] |
float* EMAN::FourierInserter3DMode8::W [private] |
Definition at line 416 of file reconstructor_tools.h.
Referenced by init(), and ~FourierInserter3DMode8().