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

XYZProjector is an projector template for defining new projectors. More...

#include <projector_template.h>

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

Public Member Functions

EMDataproject3d (EMData *em) const
 Project an 3D image into a 2D image. More...
 
EMDatabackproject3d (EMData *em) const
 Back-project a 2D image into a 3D image. More...
 
string get_name () const
 Get the projector's name. More...
 
string get_desc () const
 
TypeDict get_param_types () const
 Add your projector parameter names and types in get_param_types(). More...
 
- Public Member Functions inherited from EMAN::Projector
virtual ~Projector ()
 
virtual Dict get_params () const
 Get the projector parameters in a key/value dictionary. More...
 
void set_params (const Dict &new_params)
 Set the projector parameters using a key/value dictionary. More...
 

Static Public Member Functions

static ProjectorNEW ()
 

Static Public Attributes

static const string NAME = "xyz"
 

Additional Inherited Members

- Protected Attributes inherited from EMAN::Projector
Dict params
 

Detailed Description

XYZProjector is an projector template for defining new projectors.

Please add your own code at the proper place.

1) Replace all 'XYZ' with your new projector name. 2) Define the projector parameter names and types in get_param_types(). 3) Implement the projector in XYZProjector::project3d().

Definition at line 48 of file projector_template.h.

Member Function Documentation

◆ backproject3d()

EMData * XYZProjector::backproject3d ( EMData image) const
virtual

Back-project a 2D image into a 3D image.

Returns
A 3D image from the backprojection.

Implements EMAN::Projector.

Definition at line 43 of file projector_template.cpp.

44{
45 return 0;
46}

◆ get_desc()

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

Implements EMAN::Projector.

Definition at line 60 of file projector_template.h.

61 {
62 return "XYZ Description";
63 }

◆ get_name()

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

Get the projector's name.

Each projector is indentified by unique name.

Returns
The projector's name.

Implements EMAN::Projector.

Definition at line 55 of file projector_template.h.

56 {
57 return NAME;
58 }
static const string NAME

References NAME.

◆ get_param_types()

TypeDict EMAN::XYZProjector::get_param_types ( ) const
inlinevirtual

Add your projector parameter names and types in get_param_types().

For available parameter types, please refer class EMObject.

As an example, XYZProjector has 2 parameters: float param1; int param2;

Reimplemented from EMAN::Projector.

Definition at line 77 of file projector_template.h.

78 {
79 TypeDict d;
80 d.put("param1", EMObject::FLOAT);
81 d.put("param2", EMObject::INT);
82 return d;
83 }

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

◆ NEW()

static Projector * EMAN::XYZProjector::NEW ( )
inlinestatic

Definition at line 65 of file projector_template.h.

66 {
67 return new XYZProjector();
68 }

◆ project3d()

EMData * XYZProjector::project3d ( EMData image) const
virtual

Project an 3D image into a 2D image.

Returns
A 2D image from the projection.

Implements EMAN::Projector.

Definition at line 39 of file projector_template.cpp.

40{
41 return 0;
42}

Member Data Documentation

◆ NAME

const string XYZProjector::NAME = "xyz"
static

Definition at line 85 of file projector_template.h.

Referenced by get_name().


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