Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

EMAN::FourierPixelInserter3D Class Reference

FourierPixelInserter3D class defines a way a continuous pixel in 3D is inserted into the discrete 3D volume - there are various schemes for doing this including simply finding the nearest neighbor to more elaborate schemes that involve interpolation using the nearest 8 voxels and so on. More...

#include <reconstructor_tools.h>

Inheritance diagram for EMAN::FourierPixelInserter3D:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 FourierPixelInserter3D ()
 Construct a FourierPixelInserter3D.
virtual ~FourierPixelInserter3D ()
 Desctruct a FourierPixelInserter3D.
TypeDict get_param_types () const
virtual bool insert_pixel (const float &xx, const float &yy, const float &zz, const std::complex< float > dt, const float &weight=1.0)=0
 Insert a complex pixel [dt[0]+dt[1]i] at (float) coordinate [xx,yy,zz] with weighting into a discrete 3D volume.
virtual void init ()

Protected Attributes

float * norm
 A pointer to the constructor argument normalize_values.
EMDatadata
 A pointer to the constructor argument real_data.
int nx
 Image volume data sizes a convenience variable used here and there.
int ny
 Image volume data sizes a convenience variable used here and there.
int nz
 Image volume data sizes a convenience variable used here and there.
int nxyz
 Image volume data sizes a convenience variable used here and there.
int nx2
int ny2
int nz2
int subx0
int suby0
int subz0
int fullnx
int fullny
int fullnz

Private Member Functions

 FourierPixelInserter3D (const FourierPixelInserter3D &)
FourierPixelInserter3Doperator= (const FourierPixelInserter3D &)
void free_memory ()

Detailed Description

FourierPixelInserter3D class defines a way a continuous pixel in 3D is inserted into the discrete 3D volume - there are various schemes for doing this including simply finding the nearest neighbor to more elaborate schemes that involve interpolation using the nearest 8 voxels and so on.

FourierPixelInserter3D class is the base class for all pixel inserters. Each specific pixel inserter class has a unique ID name. This name is used to create a FourierPixelInserter3D instance or do a pixel insertion. Currently these IDs are (strings) 1,2,3,4,5,6,7 - where mode 2 is currently the most popularly used pixel insertion mode as it generally performs well, and was the default mode in EMAN1 - it interpolates to the nearest 8 voxels using a gaussian weighting based on Euclidian distance

All FourierPixelInserter3D classes in EMAN2 are managed by a Factory pattern. So each FourierPixelInserter3D class must define:

Typical usages of FourierPixelInserter3D are as follows:

Definition at line 97 of file reconstructor_tools.h.


Constructor & Destructor Documentation

EMAN::FourierPixelInserter3D::FourierPixelInserter3D  )  [inline]
 

Construct a FourierPixelInserter3D.

Definition at line 102 of file reconstructor_tools.h.

References data, norm(), nx, and ny.

00102                                          : norm(0), data(0), nx(0), ny(0), nz(0), nxyz(0)
00103                 {}

virtual EMAN::FourierPixelInserter3D::~FourierPixelInserter3D  )  [inline, virtual]
 

Desctruct a FourierPixelInserter3D.

Definition at line 107 of file reconstructor_tools.h.

References free_memory().

00108                 {
00109                         free_memory();
00110                 }

EMAN::FourierPixelInserter3D::FourierPixelInserter3D const FourierPixelInserter3D  )  [private]
 


Member Function Documentation

void EMAN::FourierPixelInserter3D::free_memory  )  [inline, private]
 

Definition at line 150 of file reconstructor_tools.h.

00151                         {
00152                         }

TypeDict EMAN::FourierPixelInserter3D::get_param_types  )  const [inline, virtual]
 

Returns:
a TypeDict defining and describing the feasible parameters of this class

Implements EMAN::FactoryBase.

Definition at line 112 of file reconstructor_tools.h.

References EMAN::TypeDict::put().

00113                 {
00114                         TypeDict d;
00115                         d.put("data", EMObject::EMDATA);
00116                         d.put("norm", EMObject::FLOAT_POINTER);
00117                         return d;
00118                 }

void FourierPixelInserter3D::init  )  [virtual]
 

Reimplemented in EMAN::FourierInserter3DMode8.

Definition at line 64 of file reconstructor_tools.cpp.

References data, fullnx, fullny, fullnz, EMAN::EMData::get_attr(), EMAN::EMData::get_xsize(), EMAN::EMData::get_ysize(), EMAN::EMData::get_zsize(), EMAN::EMData::has_attr(), EMAN::Dict::has_key(), norm, NotExistingObjectException, nx, nx2, nxyz, ny, ny2, nz, nz2, subx0, suby0, and subz0.

Referenced by EMAN::FourierInserter3DMode8::init(), and EMAN::FourierReconstructor::load_inserter().

00065 {
00066         if ( params.has_key("data") )
00067         {
00068                 data = params["data"];
00069                 if ( data == 0 )
00070                         throw NotExistingObjectException("data", "error the data pointer was 0 in FourierPixelInserter3D::init");
00071         }
00072         else throw NotExistingObjectException("data", "the data pointer was not defined in FourierPixelInserter3D::init");
00073 
00074         if ( params.has_key("norm"))
00075         {
00076                 norm = params["norm"];
00077                 if ( norm == 0 )
00078                         throw NotExistingObjectException("norm", "error the norm pointer was 0 in FourierPixelInserter3D::init");
00079         }
00080         else throw NotExistingObjectException("norm", "the norm pointer was not defined in FourierPixelInserter3D::init");
00081 
00082         nx=data->get_xsize();
00083         ny=data->get_ysize();
00084         nz=data->get_zsize();
00085         nxyz=(size_t)nx*ny*nz;
00086         nx2=nx/2-1;
00087         ny2=ny/2;
00088         nz2=nz/2;
00089         
00090         if (data->has_attr("subvolume_x0") && data->has_attr("subvolume_full_nx")) {
00091                 subx0=data->get_attr("subvolume_x0");
00092                 suby0=data->get_attr("subvolume_y0");
00093                 subz0=data->get_attr("subvolume_z0");
00094                 fullnx=data->get_attr("subvolume_full_nx");
00095                 fullny=data->get_attr("subvolume_full_ny");
00096                 fullnz=data->get_attr("subvolume_full_nz");
00097         }
00098         else {
00099                 subx0=suby0=subz0=-1;
00100         }
00101 }

virtual bool EMAN::FourierPixelInserter3D::insert_pixel const float &  xx,
const float &  yy,
const float &  zz,
const std::complex< float >  dt,
const float &  weight = 1.0
[pure 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)

Implemented in EMAN::FourierInserter3DMode1, EMAN::FourierInserter3DMode2, EMAN::FourierInserter3DMode3, EMAN::FourierInserter3DMode5, EMAN::FourierInserter3DMode6, EMAN::FourierInserter3DMode7, and EMAN::FourierInserter3DMode8.

Referenced by EMAN::WienerFourierReconstructor::do_insert_slice_work(), and EMAN::FourierReconstructor::do_insert_slice_work().

FourierPixelInserter3D& EMAN::FourierPixelInserter3D::operator= const FourierPixelInserter3D  )  [private]
 


Member Data Documentation

EMData* EMAN::FourierPixelInserter3D::data [protected]
 

A pointer to the constructor argument real_data.

Definition at line 138 of file reconstructor_tools.h.

Referenced by init().

int EMAN::FourierPixelInserter3D::fullnx [protected]
 

Definition at line 143 of file reconstructor_tools.h.

Referenced by init().

int EMAN::FourierPixelInserter3D::fullny [protected]
 

Definition at line 143 of file reconstructor_tools.h.

Referenced by init().

int EMAN::FourierPixelInserter3D::fullnz [protected]
 

Definition at line 143 of file reconstructor_tools.h.

Referenced by init().

float* EMAN::FourierPixelInserter3D::norm [protected]
 

A pointer to the constructor argument normalize_values.

Definition at line 136 of file reconstructor_tools.h.

Referenced by init().

int EMAN::FourierPixelInserter3D::nx [protected]
 

Image volume data sizes a convenience variable used here and there.

Definition at line 141 of file reconstructor_tools.h.

Referenced by init().

int EMAN::FourierPixelInserter3D::nx2 [protected]
 

Definition at line 142 of file reconstructor_tools.h.

Referenced by init().

int EMAN::FourierPixelInserter3D::nxyz [protected]
 

Image volume data sizes a convenience variable used here and there.

Definition at line 141 of file reconstructor_tools.h.

Referenced by init().

int EMAN::FourierPixelInserter3D::ny [protected]
 

Image volume data sizes a convenience variable used here and there.

Definition at line 141 of file reconstructor_tools.h.

Referenced by init().

int EMAN::FourierPixelInserter3D::ny2 [protected]
 

Definition at line 142 of file reconstructor_tools.h.

Referenced by init().

int EMAN::FourierPixelInserter3D::nz [protected]
 

Image volume data sizes a convenience variable used here and there.

Definition at line 141 of file reconstructor_tools.h.

Referenced by init().

int EMAN::FourierPixelInserter3D::nz2 [protected]
 

Definition at line 142 of file reconstructor_tools.h.

Referenced by init().

int EMAN::FourierPixelInserter3D::subx0 [protected]
 

Definition at line 143 of file reconstructor_tools.h.

Referenced by init().

int EMAN::FourierPixelInserter3D::suby0 [protected]
 

Definition at line 143 of file reconstructor_tools.h.

Referenced by init().

int EMAN::FourierPixelInserter3D::subz0 [protected]
 

Definition at line 143 of file reconstructor_tools.h.

Referenced by init().


The documentation for this class was generated from the following files:
Generated on Tue Jun 11 13:49:28 2013 for EMAN2 by  doxygen 1.3.9.1