EMAN2
|
Reconstructor class defines a way to do 3D recontruction. More...
#include <reconstructor.h>
Public Member Functions | |
Reconstructor () | |
virtual | ~Reconstructor () |
virtual void | setup ()=0 |
Initialize the reconstructor. More... | |
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... | |
virtual int | insert_slice (const EMData *const slice, const Transform &euler, const float weight) |
Insert an image slice to the reconstructor. 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 EMData * | finish (bool doift=true) |
Finish reconstruction and return the complete model. 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 () |
virtual string | get_name () const =0 |
Get the unique name of this class (especially for factory based instantiation access) More... | |
virtual string | get_desc () const =0 |
Get a clear, concise description of this class. More... | |
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) |
virtual TypeDict | get_param_types () const =0 |
void | insert_params (const Dict &new_params) |
Insert parameters. More... | |
Dict | copy_relevant_params (const FactoryBase *const that) const |
Private Member Functions | |
Reconstructor (const Reconstructor &that) | |
Reconstructor & | operator= (const Reconstructor &) |
Additional Inherited Members | |
Protected Attributes inherited from EMAN::FactoryBase | |
Dict | params |
This is the dictionary the stores the parameters of the object. More... | |
Reconstructor class defines a way to do 3D recontruction.
A reconstruction is done by 3 steps:
Reconstructor class is the base class for all reconstructors. Each specific Reconstructor class has a unique ID name. This name is used to create a Reconstructor instance or do a reconstruction.
All Reconstructor classes in EMAN are managed by a Factory pattern. So each Reconstructor class must define: - a unique name to idenfity itself in the factory. - a static method to register itself in the factory.
Typical usages of Reconstructors are as follows:
Definition at line 108 of file reconstructor.h.
|
inline |
Definition at line 111 of file reconstructor.h.
|
inlinevirtual |
Definition at line 112 of file reconstructor.h.
|
private |
|
inlinevirtual |
set the volume and tmp_volume data to zero, for use in Monte Carlo reconstructors
Reimplemented in EMAN::FourierReconstructor, and EMAN::FourierIterReconstructor.
Definition at line 184 of file reconstructor.h.
|
inlinevirtual |
Compares a slice to the current reconstruction volume and computes a normalization factor and quality.
Normalization and quality are returned via attributes set in the passed slice. You may freely mix calls to determine_slice_agreement with calls to insert_slice, but note that determine_slice_agreement can only use information from slices that have already been inserted. reconstruct_norm contains the relative normalization factor which should be applied before inserting the slice reconstruct_qual contains a quality factor (larger better) for this slice as compared to the existing reconstruction
input_slice | The EMData slice to be compared |
euler | The orientation of the slice as a Transform object |
weight | A weighting factor for this slice, generally the number of particles in a class-average. May be ignored by some reconstructors |
sub | Flag indicating whether to subtract the slice from the volume before comparing. May be ignored by some reconstructors |
Reimplemented in EMAN::FourierReconstructor, EMAN::WienerFourierReconstructor, EMAN::FourierIterReconstructor, EMAN::BackProjectionReconstructor, and EMAN::RealMedianReconstructor.
Definition at line 163 of file reconstructor.h.
|
inlinevirtual |
Finish reconstruction and return the complete model.
doift | A flag indicating whether the returned object should be guaranteed to be in real-space (true) or should be left in whatever space the reconstructor generated |
Reimplemented in EMAN::nn4_ctfwReconstructor, EMAN::nn4_ctfwsReconstructor, EMAN::XYZReconstructor, EMAN::FourierReconstructorSimple2D, EMAN::FourierReconstructor, EMAN::WienerFourierReconstructor, EMAN::FourierIterReconstructor, EMAN::BackProjectionReconstructor, EMAN::RealMedianReconstructor, EMAN::nn4Reconstructor, EMAN::nn4_rectReconstructor, EMAN::nnSSNR_Reconstructor, EMAN::nn4_ctfReconstructor, EMAN::nn4_ctf_rectReconstructor, and EMAN::nnSSNR_ctfReconstructor.
Definition at line 180 of file reconstructor.h.
Definition at line 148 of file reconstructor.h.
References insert_slice().
Referenced by insert_slice().
|
inlinevirtual |
Insert an image slice to the reconstructor.
To insert multiple image slices, call this function multiple times.
slice | Image slice. |
euler | Euler angle of this image slice. |
weight | A weighting factor for this slice, generally the number of particles in a class-average. May be ignored by some reconstructors |
Reimplemented in EMAN::XYZReconstructor, EMAN::FourierReconstructorSimple2D, EMAN::FourierReconstructor, EMAN::WienerFourierReconstructor, EMAN::FourierIterReconstructor, EMAN::BackProjectionReconstructor, EMAN::RealMedianReconstructor, EMAN::nn4Reconstructor, EMAN::nn4_rectReconstructor, EMAN::nnSSNR_Reconstructor, EMAN::nn4_ctfReconstructor, EMAN::nn4_ctfwReconstructor, EMAN::nn4_ctfwsReconstructor, EMAN::nn4_ctf_rectReconstructor, and EMAN::nnSSNR_ctfReconstructor.
Definition at line 147 of file reconstructor.h.
|
private |
|
inline |
Definition at line 199 of file reconstructor.h.
References EMAN::FactoryBase::params.
|
inlinevirtual |
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.
The default operation just returns a copy of the image, as the preprocessing is reconstructor-specific.
slice | the slice to be prepocessed |
t | transform |
InvalidValueException | when the specified padding value is less than the size of the images |
Reimplemented in EMAN::BackProjectionReconstructor, EMAN::FourierReconstructor, EMAN::FourierIterReconstructor, and EMAN::RealMedianReconstructor.
Definition at line 137 of file reconstructor.h.
|
inline |
Print the current parameters to std::out.
Definition at line 188 of file reconstructor.h.
References EMAN::Dict::begin(), EMAN::Dict::end(), and EMAN::FactoryBase::params.
Referenced by EMAN::nn4_rectReconstructor::nn4_rectReconstructor().
|
inlinevirtual |
This will create a projection from the current reconstruction.
Only valid before finish() is called. may not be implemented for all Reconstructors. If the reconstructor implements padding, the projection will also be padded. The euler parameter will ignore translation and mirroring
euler | The orientation of the slice as a Transform object |
ret_fourier | If set returns the Fourier transform of the projection. For many reconstructors this may be less expensive. |
Reimplemented in EMAN::FourierReconstructor.
Definition at line 173 of file reconstructor.h.
|
pure virtual |
Initialize the reconstructor.
Implemented in EMAN::XYZReconstructor, EMAN::FourierReconstructorSimple2D, EMAN::FourierReconstructor, EMAN::FourierIterReconstructor, EMAN::BackProjectionReconstructor, EMAN::RealMedianReconstructor, EMAN::nn4Reconstructor, EMAN::nn4_rectReconstructor, EMAN::nnSSNR_Reconstructor, EMAN::nn4_ctfReconstructor, EMAN::nn4_ctfwReconstructor, EMAN::nn4_ctfwsReconstructor, EMAN::nn4_ctf_rectReconstructor, and EMAN::nnSSNR_ctfReconstructor.
|
inlinevirtual |
Initialize the reconstructor with a seed volume.
This can be used to provide some 'default' value when there is missing data in Fourier space. The passed 'seed' must be of the appropriate padded size, must be in Fourier space. The seed is copied on input. The seed_weight determines how 'strong' the seed volume should be as compared to other inserted slices in Fourier space. Raises an exception if not supported by the Reconstructor, or if there is an error with the size.
Reimplemented in EMAN::FourierReconstructor, and EMAN::FourierIterReconstructor.
Definition at line 122 of file reconstructor.h.
|
inlinevirtual |
Initialize the reconstructor with a seed volume, as above.
In this case the initial weight map is also provided explicitly, rather than a single weight value.
Reimplemented in EMAN::FourierReconstructor, and EMAN::FourierIterReconstructor.
Definition at line 126 of file reconstructor.h.