Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

EMAN::FourierInserter3DMode8 Class Reference

FourierPixelInserter3DMode8 - encapsulates "method 8" for inserting a 2D Fourier slice into a 3D volume See comments in FourierPixelInserter3D for explanations. More...

#include <reconstructor_tools.h>

Inheritance diagram for EMAN::FourierInserter3DMode8:

Inheritance graph
[legend]
Collaboration diagram for EMAN::FourierInserter3DMode8:

Collaboration graph
[legend]
List of all members.

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

FourierPixelInserter3DNEW ()

Static Public Attributes

const string NAME = "experimental"

Private Member Functions

 FourierInserter3DMode8 (const FourierInserter3DMode8 &)
FourierInserter3DMode8operator= (const FourierInserter3DMode8 &)

Private Attributes

int mFreqCutoff
float mDFreq
float * W

Detailed Description

FourierPixelInserter3DMode8 - encapsulates "method 8" for inserting a 2D Fourier slice into a 3D volume See comments in FourierPixelInserter3D for explanations.

Definition at line 375 of file reconstructor_tools.h.


Constructor & Destructor Documentation

EMAN::FourierInserter3DMode8::FourierInserter3DMode8  )  [inline]
 

Definition at line 378 of file reconstructor_tools.h.

References W.

00378                                                  : W(0)
00379                         {
00380                                 
00381                         }

virtual EMAN::FourierInserter3DMode8::~FourierInserter3DMode8  )  [inline, virtual]
 

Definition at line 382 of file reconstructor_tools.h.

References W.

00383                         {
00384                                 if ( W != 0 )
00385                                         delete [] W;
00386                         }

EMAN::FourierInserter3DMode8::FourierInserter3DMode8 const FourierInserter3DMode8  )  [private]
 


Member Function Documentation

virtual string EMAN::FourierInserter3DMode8::get_desc  )  const [inline, virtual]
 

Get a clear, concise description of this class.

Returns:
a clear, concise description of this class

Implements EMAN::FactoryBase.

Definition at line 400 of file reconstructor_tools.h.

00401                         {
00402                                 return "Fourier pixel insertion mode 8";
00403                         }

virtual string EMAN::FourierInserter3DMode8::get_name  )  const [inline, virtual]
 

Get the unique name of this class (especially for factory based instantiation access).

Returns:
the unique name of this class

Implements EMAN::FactoryBase.

Definition at line 395 of file reconstructor_tools.h.

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, 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.

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 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 }

FourierPixelInserter3D* EMAN::FourierInserter3DMode8::NEW  )  [inline, static]
 

Definition at line 390 of file reconstructor_tools.h.

00391                         {
00392                                 return new FourierInserter3DMode8();
00393                         }

FourierInserter3DMode8& EMAN::FourierInserter3DMode8::operator= const FourierInserter3DMode8  )  [private]
 


Member Data Documentation

float EMAN::FourierInserter3DMode8::mDFreq [private]
 

Definition at line 411 of file reconstructor_tools.h.

Referenced by init().

int EMAN::FourierInserter3DMode8::mFreqCutoff [private]
 

Definition at line 410 of file reconstructor_tools.h.

Referenced by init().

const string FourierInserter3DMode8::NAME = "experimental" [static]
 

Definition at line 48 of file reconstructor_tools.cpp.

float* EMAN::FourierInserter3DMode8::W [private]
 

Definition at line 416 of file reconstructor_tools.h.

Referenced by init().


The documentation for this class was generated from the following files:
Generated on Tue Jun 11 13:49:32 2013 for EMAN2 by  doxygen 1.3.9.1