EMAN2
|
XYZReconstructor is a reconstructor template for defining new reconstructors. More...
#include <reconstructor_template.h>
Public Member Functions | |
XYZReconstructor () | |
~XYZReconstructor () | |
void | setup () |
initialize the reconstructor More... | |
int | insert_slice (const EMData *const slice, const Transform &euler, const float weight) |
insert each image slice to the reconstructor. More... | |
EMData * | finish (bool doift) |
finish reconstruction and return the complete model. More... | |
string | get_name () const |
Get the unique name of this class (especially for factory based instantiation access) More... | |
string | get_desc () const |
Get a clear, concise description of this class. More... | |
TypeDict | get_param_types () const |
Add your reconstructor parameter names and types in get_param_types(). More... | |
Public Member Functions inherited from EMAN::Reconstructor | |
Reconstructor () | |
virtual | ~Reconstructor () |
virtual void | setup_seed (EMData *seed, float seed_weight) |
Initialize the reconstructor with a seed volume. More... | |
virtual void | setup_seedandweights (EMData *seed, EMData *weight) |
Initialize the reconstructor with a seed volume, as above. More... | |
virtual EMData * | preprocess_slice (const EMData *const slice, const Transform &t=Transform()) |
While you can just insert unprocessed slices, if you call preprocess_slice yourself, and insert the returned slice instead, repeatedly, it can save a fair bit of computation. More... | |
int | insert_slice (const EMData *const slice, const Transform &euler) |
virtual int | determine_slice_agreement (EMData *slice, const Transform &euler, const float weight=1.0, bool sub=true) |
Compares a slice to the current reconstruction volume and computes a normalization factor and quality. More... | |
virtual EMData * | projection (const Transform &euler, int ret_fourier=1) |
This will create a projection from the current reconstruction. More... | |
virtual void | clear () |
set the volume and tmp_volume data to zero, for use in Monte Carlo reconstructors More... | |
void | print_params () const |
Print the current parameters to std::out. More... | |
EMObject & | operator[] (const string &key) |
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 Reconstructor * | NEW () |
Static Public Attributes | |
static const string | NAME = "xyz" |
Private Attributes | |
EMData * | image |
int | nx |
int | ny |
int | nz |
Additional Inherited Members | |
Protected Attributes inherited from EMAN::FactoryBase | |
Dict | params |
This is the dictionary the stores the parameters of the object. More... | |
XYZReconstructor is a reconstructor template for defining new reconstructors.
Please add your own code at the proper place.
1) Replace all 'XYZ' with your new reconstructor name. 2) Define the reconstructor parameter names and types in get_param_types(). 3) Implement the reconstructor in setup(), insert_slice(), and finish();
Definition at line 47 of file reconstructor_template.h.
XYZReconstructor::XYZReconstructor | ( | ) |
XYZReconstructor::~XYZReconstructor | ( | ) |
Definition at line 42 of file reconstructor_template.cpp.
|
virtual |
finish reconstruction and return the complete model.
Reimplemented from EMAN::Reconstructor.
Definition at line 56 of file reconstructor_template.cpp.
References image.
|
inlinevirtual |
Get a clear, concise description of this class.
Implements EMAN::FactoryBase.
Definition at line 70 of file reconstructor_template.h.
|
inlinevirtual |
Get the unique name of this class (especially for factory based instantiation access)
Implements EMAN::FactoryBase.
Definition at line 66 of file reconstructor_template.h.
References NAME.
|
inlinevirtual |
Add your reconstructor parameter names and types in get_param_types().
For available parameter types, please refer class EMObject.
As an example, XYZReconstructor has 3 parameters: int size; float patratio; vector<float> snr;
Implements EMAN::FactoryBase.
Definition at line 89 of file reconstructor_template.h.
References EMAN::EMObject::FLOAT, EMAN::EMObject::FLOATARRAY, EMAN::EMObject::INT, and EMAN::TypeDict::put().
|
virtual |
insert each image slice to the reconstructor.
You may call this function multiple times.
Reimplemented from EMAN::Reconstructor.
Definition at line 51 of file reconstructor_template.cpp.
|
inlinestatic |
|
virtual |
initialize the reconstructor
Implements EMAN::Reconstructor.
Definition at line 46 of file reconstructor_template.cpp.
|
private |
Definition at line 100 of file reconstructor_template.h.
Referenced by finish().
|
static |
Definition at line 98 of file reconstructor_template.h.
Referenced by get_name().
|
private |
Definition at line 101 of file reconstructor_template.h.
|
private |
Definition at line 102 of file reconstructor_template.h.
|
private |
Definition at line 103 of file reconstructor_template.h.