EMAN::FourierInserter3DMode1 Class Reference

FourierPixelInserter3DMode1 - encapsulates "method 1" 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::FourierInserter3DMode1:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

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

static FourierPixelInserter3DNEW ()

Static Public Attributes

static const string NAME = "nearest_neighbor"

Private Member Functions

 FourierInserter3DMode1 (const FourierInserter3DMode1 &)
FourierInserter3DMode1operator= (const FourierInserter3DMode1 &)

Detailed Description

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

Definition at line 158 of file reconstructor_tools.h.


Constructor & Destructor Documentation

EMAN::FourierInserter3DMode1::FourierInserter3DMode1 (  )  [inline]

Definition at line 161 of file reconstructor_tools.h.

Referenced by NEW().

00161 {}

virtual EMAN::FourierInserter3DMode1::~FourierInserter3DMode1 (  )  [inline, virtual]

Definition at line 162 of file reconstructor_tools.h.

00162 {}

EMAN::FourierInserter3DMode1::FourierInserter3DMode1 ( const FourierInserter3DMode1  )  [private]


Member Function Documentation

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

00177                         {
00178                                 return "Fourier pixel insertion using nearest neighbor";
00179                         }

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

References NAME.

00172                         {
00173                                 return NAME;
00174                         }

bool FourierInserter3DMode1::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 103 of file reconstructor_tools.cpp.

References EMAN::EMData::add_complex_at(), EMAN::FourierPixelInserter3D::data, EMAN::FourierPixelInserter3D::fullnx, EMAN::FourierPixelInserter3D::fullny, EMAN::FourierPixelInserter3D::fullnz, EMAN::FourierPixelInserter3D::norm, EMAN::FourierPixelInserter3D::nxyz, EMAN::FourierPixelInserter3D::subx0, EMAN::FourierPixelInserter3D::suby0, and EMAN::FourierPixelInserter3D::subz0.

00104 {
00105         int x0 = (int) floor(xx + 0.5f);
00106         int y0 = (int) floor(yy + 0.5f);
00107         int z0 = (int) floor(zz + 0.5f);
00108 
00109         size_t off;
00110         if (subx0<0) off=data->add_complex_at(x0,y0,z0,dt*weight);
00111         else off=data->add_complex_at(x0,y0,z0,subx0,suby0,subz0,fullnx,fullny,fullnz,dt*weight);
00112         if (static_cast<int>(off)!=nxyz) norm[off/2]+=weight;
00113         else return false;
00114         
00115         return true;
00116 }

static FourierPixelInserter3D* EMAN::FourierInserter3DMode1::NEW (  )  [inline, static]

Definition at line 166 of file reconstructor_tools.h.

References FourierInserter3DMode1().

00167                         {
00168                                 return new FourierInserter3DMode1();
00169                         }

FourierInserter3DMode1& EMAN::FourierInserter3DMode1::operator= ( const FourierInserter3DMode1  )  [private]


Member Data Documentation

const string FourierInserter3DMode1::NAME = "nearest_neighbor" [static]

Definition at line 181 of file reconstructor_tools.h.

Referenced by get_name().


The documentation for this class was generated from the following files:
Generated on Tue Jun 11 12:45:04 2013 for EMAN2 by  doxygen 1.4.7