#include <reconstructor_tools.h>
Inheritance diagram for EMAN::FourierPixelInserter3D:
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. | |
EMData * | data |
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 &) | |
FourierPixelInserter3D & | operator= (const FourierPixelInserter3D &) |
void | free_memory () |
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:
vector<string> all_pixel_inserters = Factory<FourierPixeldtInserter3D>::get_list();
// First set up the params correctly this is essential - setting up the params requires // these 5 parameters (only and always these 5). nx,ny, and nz are the dims of data and // norm, data is the (Fourier) EMData object, and norm is the associated normalization matrix. parms["data"] = image; parms["norm"] = tmp_data->get_data(); // The two is the ID of the FourierInserter3DMode2 in this case. FourierPixelInserter3D* r = Factory<FourierPixelInserter3D>::get("2", params); // Then call init - this causes all of the internal data to be stored correctly r->init() // Then tell the inserter to insert the pixel with real and imaginary components dt[0] and dt[1] at floating point coords [xx,yy,zz] // using the given weight - this is typically done for pixels in a set of many slices - see FourierReconstructor::insert_slice r->insert_pixel(xx, yy, zz, dt, weight)
Definition at line 97 of file reconstructor_tools.h.
|
Construct a FourierPixelInserter3D.
Definition at line 102 of file reconstructor_tools.h. References data, norm(), nx, and ny.
|
|
Desctruct a FourierPixelInserter3D.
Definition at line 107 of file reconstructor_tools.h. References free_memory(). 00108 { 00109 free_memory(); 00110 }
|
|
|
|
Definition at line 150 of file reconstructor_tools.h. 00151 { 00152 }
|
|
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 }
|
|
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 }
|
|
Insert a complex pixel [dt[0]+dt[1]i] at (float) coordinate [xx,yy,zz] with weighting into a discrete 3D volume.
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(). |
|
|
|
A pointer to the constructor argument real_data.
Definition at line 138 of file reconstructor_tools.h. Referenced by init(). |
|
Definition at line 143 of file reconstructor_tools.h. Referenced by init(). |
|
Definition at line 143 of file reconstructor_tools.h. Referenced by init(). |
|
Definition at line 143 of file reconstructor_tools.h. Referenced by init(). |
|
A pointer to the constructor argument normalize_values.
Definition at line 136 of file reconstructor_tools.h. Referenced by init(). |
|
Image volume data sizes a convenience variable used here and there.
Definition at line 141 of file reconstructor_tools.h. Referenced by init(). |
|
Definition at line 142 of file reconstructor_tools.h. Referenced by init(). |
|
Image volume data sizes a convenience variable used here and there.
Definition at line 141 of file reconstructor_tools.h. Referenced by init(). |
|
Image volume data sizes a convenience variable used here and there.
Definition at line 141 of file reconstructor_tools.h. Referenced by init(). |
|
Definition at line 142 of file reconstructor_tools.h. Referenced by init(). |
|
Image volume data sizes a convenience variable used here and there.
Definition at line 141 of file reconstructor_tools.h. Referenced by init(). |
|
Definition at line 142 of file reconstructor_tools.h. Referenced by init(). |
|
Definition at line 143 of file reconstructor_tools.h. Referenced by init(). |
|
Definition at line 143 of file reconstructor_tools.h. Referenced by init(). |
|
Definition at line 143 of file reconstructor_tools.h. Referenced by init(). |