EMAN2
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | List of all members
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]

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. More...
 
virtual string get_name () const
 Get the unique name of this class (especially for factory based instantiation access) More...
 
virtual string get_desc () const
 Get a clear, concise description of this class. More...
 
- Public Member Functions inherited from EMAN::FourierPixelInserter3D
 FourierPixelInserter3D ()
 Construct a FourierPixelInserter3D. More...
 
virtual ~FourierPixelInserter3D ()
 Desctruct a FourierPixelInserter3D. More...
 
TypeDict get_param_types () const
 
virtual void init ()
 
- Public Member Functions inherited from EMAN::FactoryBase
 FactoryBase ()
 
virtual ~FactoryBase ()
 
Dict get_params () const
 get a copy of the parameters of this class More...
 
void set_params (const Dict &new_params)
 Set new parameters. More...
 
void set_param (const string key, const EMObject val)
 
void insert_params (const Dict &new_params)
 Insert parameters. More...
 
Dict copy_relevant_params (const FactoryBase *const that) const
 

Static Public Member Functions

static FourierPixelInserter3DNEW ()
 

Static Public Attributes

static const string NAME = "nearest_neighbor"
 

Private Member Functions

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

Additional Inherited Members

- Protected Attributes inherited from EMAN::FourierPixelInserter3D
float * norm
 A pointer to the constructor argument normalize_values. More...
 
EMDatadata
 A pointer to the constructor argument real_data. More...
 
int nx
 Image volume data sizes a convenience variable used here and there. More...
 
int ny
 
int nz
 
int nxyz
 
int nx2
 
int ny2
 
int nz2
 
int subx0
 
int suby0
 
int subz0
 
int fullnx
 
int fullny
 
int fullnz
 
- Protected Attributes inherited from EMAN::FactoryBase
Dict params
 This is the dictionary the stores the parameters of the object. More...
 

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 159 of file reconstructor_tools.h.

Constructor & Destructor Documentation

◆ FourierInserter3DMode1() [1/2]

EMAN::FourierInserter3DMode1::FourierInserter3DMode1 ( )
inline

Definition at line 162 of file reconstructor_tools.h.

162{}

Referenced by NEW().

◆ ~FourierInserter3DMode1()

virtual EMAN::FourierInserter3DMode1::~FourierInserter3DMode1 ( )
inlinevirtual

Definition at line 163 of file reconstructor_tools.h.

163{}

◆ FourierInserter3DMode1() [2/2]

EMAN::FourierInserter3DMode1::FourierInserter3DMode1 ( const FourierInserter3DMode1 )
private

Member Function Documentation

◆ get_desc()

virtual string EMAN::FourierInserter3DMode1::get_desc ( ) const
inlinevirtual

Get a clear, concise description of this class.

Returns
a clear, concise description of this class

Implements EMAN::FactoryBase.

Definition at line 177 of file reconstructor_tools.h.

178 {
179 return "Fourier pixel insertion using nearest neighbor";
180 }

◆ get_name()

virtual string EMAN::FourierInserter3DMode1::get_name ( ) const
inlinevirtual

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 172 of file reconstructor_tools.h.

173 {
174 return NAME;
175 }

References NAME.

◆ insert_pixel()

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 113 of file reconstructor_tools.cpp.

114{
115 int x0 = (int) floor(xx + 0.5f);
116 int y0 = (int) floor(yy + 0.5f);
117 int z0 = (int) floor(zz + 0.5f);
118
119 size_t off;
120 if (subx0<0) off=data->add_complex_at(x0,y0,z0,dt*weight);
121 else off=data->add_complex_at(x0,y0,z0,subx0,suby0,subz0,fullnx,fullny,fullnz,dt*weight);
122 if (static_cast<int>(off)!=nxyz) norm[off/2]+=weight;
123 else return false;
124
125 return true;
126}
EMData * data
A pointer to the constructor argument real_data.
float * norm
A pointer to the constructor argument normalize_values.

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

◆ NEW()

static FourierPixelInserter3D * EMAN::FourierInserter3DMode1::NEW ( )
inlinestatic

Definition at line 167 of file reconstructor_tools.h.

168 {
169 return new FourierInserter3DMode1();
170 }

References FourierInserter3DMode1().

◆ operator=()

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

Member Data Documentation

◆ NAME

const string FourierInserter3DMode1::NAME = "nearest_neighbor"
static

Definition at line 182 of file reconstructor_tools.h.

Referenced by get_name().


The documentation for this class was generated from the following files: