EMAN2
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Attributes | List of all members
EMAN::XYZReconstructor Class Reference

XYZReconstructor is a reconstructor template for defining new reconstructors. More...

#include <reconstructor_template.h>

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

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...
 
EMDatafinish (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 EMDatapreprocess_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 EMDataprojection (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...
 
EMObjectoperator[] (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 ReconstructorNEW ()
 

Static Public Attributes

static const string NAME = "xyz"
 

Private Attributes

EMDataimage
 
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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ XYZReconstructor()

XYZReconstructor::XYZReconstructor ( )

Definition at line 38 of file reconstructor_template.cpp.

39{
40}

Referenced by NEW().

◆ ~XYZReconstructor()

XYZReconstructor::~XYZReconstructor ( )

Definition at line 42 of file reconstructor_template.cpp.

43{
44}

Member Function Documentation

◆ finish()

EMData * XYZReconstructor::finish ( bool  doift)
virtual

finish reconstruction and return the complete model.

Reimplemented from EMAN::Reconstructor.

Definition at line 56 of file reconstructor_template.cpp.

57{
58 return image;
59}

References image.

◆ get_desc()

string EMAN::XYZReconstructor::get_desc ( ) const
inlinevirtual

Get a clear, concise description of this class.

Returns
a clear, concise description of this class

Implements EMAN::FactoryBase.

Definition at line 70 of file reconstructor_template.h.

71 {
72 return "XYZ Description";
73 }

◆ get_name()

string EMAN::XYZReconstructor::get_name ( ) const
inlinevirtual

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 66 of file reconstructor_template.h.

67 {
68 return NAME;
69 }

References NAME.

◆ get_param_types()

TypeDict EMAN::XYZReconstructor::get_param_types ( ) const
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.

90 {
91 TypeDict d;
92 d.put("size", EMObject::INT);
93 d.put("padratio", EMObject::FLOAT);
94 d.put("snr", EMObject::FLOATARRAY);
95 return d;
96 }

References EMAN::EMObject::FLOAT, EMAN::EMObject::FLOATARRAY, EMAN::EMObject::INT, and EMAN::TypeDict::put().

◆ insert_slice()

int XYZReconstructor::insert_slice ( const EMData *const  slice,
const Transform euler,
const float  weight 
)
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.

52{
53 return 0;
54}

◆ NEW()

static Reconstructor * EMAN::XYZReconstructor::NEW ( )
inlinestatic

Definition at line 75 of file reconstructor_template.h.

76 {
77 return new XYZReconstructor();
78 }

References XYZReconstructor().

◆ setup()

void XYZReconstructor::setup ( )
virtual

initialize the reconstructor

Implements EMAN::Reconstructor.

Definition at line 46 of file reconstructor_template.cpp.

47{
48
49}

Member Data Documentation

◆ image

EMData* EMAN::XYZReconstructor::image
private

Definition at line 100 of file reconstructor_template.h.

Referenced by finish().

◆ NAME

const string XYZReconstructor::NAME = "xyz"
static

Definition at line 98 of file reconstructor_template.h.

Referenced by get_name().

◆ nx

int EMAN::XYZReconstructor::nx
private

Definition at line 101 of file reconstructor_template.h.

◆ ny

int EMAN::XYZReconstructor::ny
private

Definition at line 102 of file reconstructor_template.h.

◆ nz

int EMAN::XYZReconstructor::nz
private

Definition at line 103 of file reconstructor_template.h.


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