EMAN2
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes
EMAN::FourierInserter3DMode8 Class Reference

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

List of all members.

Public Member Functions

 FourierInserter3DMode8 ()
virtual ~FourierInserter3DMode8 ()
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.
virtual void init ()

Static Public Member Functions

static FourierPixelInserter3DNEW ()

Static Public Attributes

static const string NAME = "experimental"

Private Member Functions

 FourierInserter3DMode8 (const FourierInserter3DMode8 &)
FourierInserter3DMode8operator= (const FourierInserter3DMode8 &)

Private Attributes

int mFreqCutoff
float mDFreq
float * W

Detailed Description

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

Definition at line 375 of file reconstructor_tools.h.


Constructor & Destructor Documentation

EMAN::FourierInserter3DMode8::FourierInserter3DMode8 ( ) [inline]

Definition at line 378 of file reconstructor_tools.h.

Referenced by NEW().

                                                 : W(0)
                        {
                                
                        }
virtual EMAN::FourierInserter3DMode8::~FourierInserter3DMode8 ( ) [inline, virtual]

Definition at line 382 of file reconstructor_tools.h.

References W.

                        {
                                if ( W != 0 )
                                        delete [] W;
                        }
EMAN::FourierInserter3DMode8::FourierInserter3DMode8 ( const FourierInserter3DMode8 ) [private]

Member Function Documentation

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

                        {
                                return "Fourier pixel insertion mode 8";
                        }
virtual string EMAN::FourierInserter3DMode8::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 395 of file reconstructor_tools.h.

References NAME.

                        {
                                return NAME;
                        }
void FourierInserter3DMode8::init ( ) [virtual]

Reimplemented from EMAN::FourierPixelInserter3D.

Definition at line 379 of file reconstructor_tools.cpp.

References EMAN::Util::getBaldwinGridWeights(), mDFreq, mFreqCutoff, EMAN::FourierPixelInserter3D::nx, and W.

{
        FourierPixelInserter3D::init();
        int P = (int)((1.0+0.25)*nx+1);
        float r = (float)(nx+1)/(float)P;
        mFreqCutoff = 2;
        mDFreq = 0.2f;
        if (W != 0) delete [] W;
        W = Util::getBaldwinGridWeights(mFreqCutoff, (float)P, r,mDFreq,0.5f,0.2f);

}
bool FourierInserter3DMode8::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 390 of file reconstructor_tools.cpp.

{
//      int x0 = (int) floor(qx);
//      int y0 = (int) floor(qy);
//      int z0 = (int) floor(qz);

//      int sizeW = (int)(1+2*mFreqCutoff/mDFreq);
//      int sizeWmid = sizeW/2;

//      for (int z = z0-mFreqCutoff; z < z0+mFreqCutoff; ++z){
//              for (int y = y0-mFreqCutoff; y < y0+mFreqCutoff; ++y){
//                      for (int x = x0-mFreqCutoff; x < x0+mFreqCutoff; ++x){
//                              if ( x < 0 || x >= nx ) continue;
//                              if ( y < 0 || y >= ny ) continue;
//                              if ( z < 0 || z >= nz ) continue;
//                              float dist = (float)((x-x0)*(x-x0)+(y-y0)*(y-y0)+(z-z0)*(z-z0));
//                              dist = sqrtf(dist);
//                              // We enforce a spherical kernel
//                              if ( dist > mFreqCutoff ) continue;
//                              int idx = (int)(sizeWmid + dist/mDFreq);
//                              if (idx >= sizeW) throw;
//                              float residual = dist/mDFreq - (int)(dist/mDFreq);
//                              if ( fabs(residual) > 1) throw;
// 
//                              float factor = W[idx]*(1.0f-residual)+W[idx+1]*residual*weight;
// 
//                              size_t k = z*nx*ny + y*nx + 2*x;
// 
// //                           float c = Util::agauss(1, x-x0,y-y0,z-z0, EMConsts::I2G);
//                              rdata[k] += fq[0]*factor;
//                              rdata[k+1] += fq[1]*factor;
// 
// 
//                              norm[k/2] += weight;
// 
//                      }
//              }
//      }

        return true;
}
static FourierPixelInserter3D* EMAN::FourierInserter3DMode8::NEW ( ) [inline, static]

Definition at line 390 of file reconstructor_tools.h.

References FourierInserter3DMode8().

                        {
                                return new FourierInserter3DMode8();
                        }
FourierInserter3DMode8& EMAN::FourierInserter3DMode8::operator= ( const FourierInserter3DMode8 ) [private]

Member Data Documentation

Definition at line 411 of file reconstructor_tools.h.

Referenced by init().

Definition at line 410 of file reconstructor_tools.h.

Referenced by init().

const string FourierInserter3DMode8::NAME = "experimental" [static]

Definition at line 407 of file reconstructor_tools.h.

Referenced by get_name().

Definition at line 416 of file reconstructor_tools.h.

Referenced by init(), and ~FourierInserter3DMode8().


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