EMAN2
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | List of all members
EMAN::FourierInserter3DMode11 Class Reference

FourierPixelInserter3DMode7 - encapsulates "method 7" 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::FourierInserter3DMode11:
Inheritance graph
[legend]
Collaboration diagram for EMAN::FourierInserter3DMode11:
Collaboration graph
[legend]

Public Member Functions

 FourierInserter3DMode11 ()
 
virtual ~FourierInserter3DMode11 ()
 
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 float kernel [12][12][12]
 
static const string NAME = "gridding_7"
 

Private Member Functions

 FourierInserter3DMode11 (const FourierInserter3DMode11 &)
 
FourierInserter3DMode11operator= (const FourierInserter3DMode11 &)
 

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

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

Definition at line 532 of file reconstructor_tools.h.

Constructor & Destructor Documentation

◆ FourierInserter3DMode11() [1/2]

EMAN::FourierInserter3DMode11::FourierInserter3DMode11 ( )
inline

Definition at line 538 of file reconstructor_tools.h.

538{}

Referenced by NEW().

◆ ~FourierInserter3DMode11()

virtual EMAN::FourierInserter3DMode11::~FourierInserter3DMode11 ( )
inlinevirtual

Definition at line 539 of file reconstructor_tools.h.

539{}

◆ FourierInserter3DMode11() [2/2]

EMAN::FourierInserter3DMode11::FourierInserter3DMode11 ( const FourierInserter3DMode11 )
private

Member Function Documentation

◆ get_desc()

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

554 {
555 return "7x7x7 gridding kernel with numerically computed kernel";
556 }

◆ get_name()

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

549 {
550 return NAME;
551 }

References NAME.

◆ insert_pixel()

bool FourierInserter3DMode11::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 964 of file reconstructor_tools.cpp.

965{
966 int x0 = Util::fast_floor(xx-2.5);
967 int y0 = Util::fast_floor(yy-2.5);
968 int z0 = Util::fast_floor(zz-2.5);
969
970 if (subx0<0) { // normal full reconstruction
971 if (x0<-nx2-6 || y0<-ny2-6 || z0<-nz2-6 || x0>nx2+5 || y0>ny2+5 || z0>nz2+5 ) return false;
972
973 // no error checking on add_complex_fast, so we need to be careful here
974 int x1=x0+6;
975 int y1=y0+6;
976 int z1=z0+6;
977 if (x0<-nx2) x0=-nx2;
978 if (x1>nx2) x1=nx2;
979 if (y0<-ny2) y0=-ny2;
980 if (y1>ny2) y1=ny2;
981 if (z0<-nz2) z0=-nz2;
982 if (z1>nz2) z1=nz2;
983
984 float w=weight;
985
986 float r, gg;
987 for (int k = z0 ; k <= z1; k++) {
988 for (int j = y0 ; j <= y1; j++) {
989 for (int i = x0; i <= x1; i ++) {
990 gg=FourierInserter3DMode11::kernel[abs(Util::fast_floor((i-xx)*3.0f+0.5))][abs(Util::fast_floor((j-yy)*3.0f+0.5))][abs(Util::fast_floor((k-zz)*3.0f+0.5))];
991
992 size_t off;
993 off=data->add_complex_at_fast(i,j,k,dt*gg*w);
994 norm[off/2]+=w;
995// if (i==67&&j==19&&k==1) printf("%1.1f %1.1f %1.1f\t%d %d %d\t%d %d %d\t%f\t%f\t%f\t%f\t%f\t%f\n",xx,yy,zz,i,j,k,abs(Util::fast_floor((i-xx)*3.0f+0.5)),abs(Util::fast_floor((j-yy)*3.0f+0.5)),abs(Util::fast_floor((k-zz)*3.0f+0.5)),gg,w,dt.real(),dt.imag(),norm[off/2],data->get_value_at(off));
996
997 }
998 }
999 }
1000 return true;
1001 }
1002 printf("region writing not supported in mode \n");
1003 return false;
1004}
static const float kernel[12][12][12]
EMData * data
A pointer to the constructor argument real_data.
float * norm
A pointer to the constructor argument normalize_values.
static int fast_floor(float x)
A fast way to calculate a floor, which is largest integral value not greater than argument.
Definition: util.h:874

References EMAN::FourierPixelInserter3D::data, EMAN::Util::fast_floor(), kernel, EMAN::FourierPixelInserter3D::norm, EMAN::FourierPixelInserter3D::nx2, EMAN::FourierPixelInserter3D::ny2, EMAN::FourierPixelInserter3D::nz2, and EMAN::FourierPixelInserter3D::subx0.

◆ NEW()

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

Definition at line 543 of file reconstructor_tools.h.

544 {
545 return new FourierInserter3DMode11();
546 }

References FourierInserter3DMode11().

◆ operator=()

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

Member Data Documentation

◆ kernel

const float FourierInserter3DMode11::kernel
static

◆ NAME

const string FourierInserter3DMode11::NAME = "gridding_7"
static

Definition at line 558 of file reconstructor_tools.h.

Referenced by get_name().


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