EMAN2
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions
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().

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

Definition at line 162 of file reconstructor_tools.h.

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

                        {
                                return "Fourier pixel insertion using nearest neighbor";
                        }
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.

                        {
                                return NAME;
                        }
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:
xxthe floating point x coordinate
yythe floating point y coordinate
zzthe floating point z coordinate
dtthe complex pixel value (dt[0] is real, dt[1] is imaginary)
weightthe 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, EMAN::FourierPixelInserter3D::subz0, and weight.

{
        int x0 = (int) floor(xx + 0.5f);
        int y0 = (int) floor(yy + 0.5f);
        int z0 = (int) floor(zz + 0.5f);

        size_t off;
        if (subx0<0) off=data->add_complex_at(x0,y0,z0,dt*weight);
        else off=data->add_complex_at(x0,y0,z0,subx0,suby0,subz0,fullnx,fullny,fullnz,dt*weight);
        if (static_cast<int>(off)!=nxyz) norm[off/2]+=weight;
        else return false;
        
        return true;
}
static FourierPixelInserter3D* EMAN::FourierInserter3DMode1::NEW ( ) [inline, static]

Definition at line 166 of file reconstructor_tools.h.

References FourierInserter3DMode1().

                        {
                                return new FourierInserter3DMode1();
                        }
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: