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

EMAN::FourierInserter3DMode6 Class Reference

FourierPixelInserter3DMode6 - encapsulates "method 6" 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::FourierInserter3DMode6:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 FourierInserter3DMode6 ()
virtual ~FourierInserter3DMode6 ()
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.

Static Public Member Functions

FourierPixelInserter3DNEW ()

Static Public Attributes

const string NAME = "gauss_5_slow"

Private Member Functions

 FourierInserter3DMode6 (const FourierInserter3DMode6 &)
FourierInserter3DMode6operator= (const FourierInserter3DMode6 &)

Detailed Description

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

Definition at line 307 of file reconstructor_tools.h.


Constructor & Destructor Documentation

EMAN::FourierInserter3DMode6::FourierInserter3DMode6  )  [inline]
 

Definition at line 310 of file reconstructor_tools.h.

00310 {}

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

Definition at line 311 of file reconstructor_tools.h.

00311 {}

EMAN::FourierInserter3DMode6::FourierInserter3DMode6 const FourierInserter3DMode6  )  [private]
 


Member Function Documentation

virtual string EMAN::FourierInserter3DMode6::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 325 of file reconstructor_tools.h.

00326                         {
00327                                 return "More exact version of gauss_5";
00328                         }

virtual string EMAN::FourierInserter3DMode6::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 320 of file reconstructor_tools.h.

00321                         {
00322                                 return NAME;
00323                         }

bool FourierInserter3DMode6::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 286 of file reconstructor_tools.cpp.

References EMAN::EMData::add_complex_at(), dt, and EMAN::Util::hypot3sq().

00287 {
00288         int x0 = 2 * (int) floor(xx + 0.5f);
00289         int y0 = (int) floor(yy + 0.5f);
00290         int z0 = (int) floor(zz + 0.5f);
00291 
00292         if (x0<-6||y0<-3||z0<-3||x0>nx+6||y0>ny+3||z0>nz+3) return false;
00293 
00294         //size_t idx;
00295         float r, gg;
00296         for (int k = z0 - 1; k <= z0 + 1; k++) {
00297                 for (int j = y0 - 1; j <= y0 + 1; j++) {
00298                         for (int i = x0 -2; i <= x0 + 2; i += 2) {
00299                                 if (k<0 || j<0 || i<0 || k>=nz || j>=ny || i>=nx) continue;
00300                                 r = Util::hypot3sq((float) i / 2 - xx, j - yy, k - zz);
00301                                 gg = exp(-r / EMConsts::I5G)*weight;
00302 
00303                                 size_t off;
00304                                 if (subx0<0) off=data->add_complex_at(i,j,k,dt*gg);
00305                                 else off=data->add_complex_at(i,j,k,subx0,suby0,subz0,fullnx,fullny,fullnz,dt*gg);
00306                                 if (static_cast<int>(off)!=nxyz) norm[off/2]+=gg;
00307 
00308                         }
00309                 }
00310         }
00311         return true;
00312  }

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

Definition at line 315 of file reconstructor_tools.h.

00316                         {
00317                                 return new FourierInserter3DMode6();
00318                         }

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


Member Data Documentation

const string FourierInserter3DMode6::NAME = "gauss_5_slow" [static]
 

Definition at line 46 of file reconstructor_tools.cpp.


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