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

SingleOrientationGenerator generates a single orientation with the specified EMAN-style Euler angles. More...

#include <symmetry.h>

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

Public Member Functions

 SingleOrientationGenerator ()
 
virtual ~SingleOrientationGenerator ()
 
virtual string get_name () const
 Return "eman". More...
 
virtual string get_desc () const
 Get a description. More...
 
virtual TypeDict get_param_types () const
 Get a dictionary containing the permissable parameters of this class. More...
 
virtual vector< Transformgen_orientations (const Symmetry3D *const sym) const
 generate orientations given some symmetry type More...
 
- Public Member Functions inherited from EMAN::OrientationGenerator
 OrientationGenerator ()
 
virtual ~OrientationGenerator ()
 
bool add_orientation (vector< Transform > &v, const float &az, const float &alt) const
 This functions adds one or more Transform objects to the vector v, depending on the parameters stored in the dictionary (which the inheriting class may include by initializing the typedict in get_param_types by calling. More...
 
float get_optimal_delta (const Symmetry3D *const sym, const int &n) const
 This function gets the optimal value of the delta (or angular spacing) of the orientations based on a desired total number of orientations (n). More...
 
- 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 OrientationGeneratorNEW ()
 Factory support function NEW. More...
 

Static Public Attributes

static const string NAME = "single"
 The name of this class - used to access it from factories etc. Should be "icos". More...
 

Private Member Functions

 SingleOrientationGenerator (const SingleOrientationGenerator &)
 Disallow copy construction. More...
 
SingleOrientationGeneratoroperator= (const SingleOrientationGenerator &)
 Disallow assignment. More...
 
virtual int get_orientations_tally (const Symmetry3D *const sym, const float &delta) const
 This function returns how many orientations will be generated for a given delta (angular spacing) It does this by simulated gen_orientations. More...
 

Additional Inherited Members

- Protected Member Functions inherited from EMAN::OrientationGenerator
void get_az_max (const Symmetry3D *const sym, const float &altmax, const bool inc_mirror, const float &alt_iterator, const float &h, bool &d_odd_mirror_flag, float &azmax_adjusted) const
 
- Protected Attributes inherited from EMAN::FactoryBase
Dict params
 This is the dictionary the stores the parameters of the object. More...
 

Detailed Description

SingleOrientationGenerator generates a single orientation with the specified EMAN-style Euler angles.

Author
Steve Ludtke
Date
August 17, 2015

Definition at line 1164 of file symmetry.h.

Constructor & Destructor Documentation

◆ SingleOrientationGenerator() [1/2]

EMAN::SingleOrientationGenerator::SingleOrientationGenerator ( )
inline

Definition at line 1167 of file symmetry.h.

1167{};

Referenced by NEW().

◆ ~SingleOrientationGenerator()

virtual EMAN::SingleOrientationGenerator::~SingleOrientationGenerator ( )
inlinevirtual

Definition at line 1168 of file symmetry.h.

1168{};

◆ SingleOrientationGenerator() [2/2]

EMAN::SingleOrientationGenerator::SingleOrientationGenerator ( const SingleOrientationGenerator )
private

Disallow copy construction.

Member Function Documentation

◆ gen_orientations()

vector< Transform > SingleOrientationGenerator::gen_orientations ( const Symmetry3D *const  sym) const
virtual

generate orientations given some symmetry type

Parameters
symthe symmetry which defines the interesting asymmetric unit
Returns
a vector of Transform objects containing the set of evenly distributed orientations

Implements EMAN::OrientationGenerator.

Definition at line 524 of file symmetry.cpp.

525{
526 float az = params.set_default("az", 0.0f);
527 float alt = params.set_default("alt", 0.0f);
528 float phi = params.set_default("phi", 0.0f);
529
530 float alt_iterator = 0.0f;
531
532 Transform base(Dict("type","eman","az",az,"alt",alt,"phi",phi));
533
534 vector<Transform> ret;
535 ret.push_back(base);
536
537// for (int i=0; i<sym->get_nsym(); i++) {
538// ret.push_back(base*sym->get_sym(i));
539// }
540
541
542 return ret;
543}
Dict is a dictionary to store <string, EMObject> pair.
Definition: emobject.h:385
type set_default(const string &key, type val)
Default setting behavior This can be achieved using a template - d.woolford Jan 2008 (before there wa...
Definition: emobject.h:569
Dict params
This is the dictionary the stores the parameters of the object.
Definition: emobject.h:953
A Transform object is a somewhat specialized object designed specifically for EMAN2/Sparx storage of ...
Definition: transform.h:75

References EMAN::FactoryBase::params, and EMAN::Dict::set_default().

◆ get_desc()

virtual string EMAN::SingleOrientationGenerator::get_desc ( ) const
inlinevirtual

Get a description.

Returns
a clear desciption of this class

Implements EMAN::FactoryBase.

Definition at line 1186 of file symmetry.h.

1186{ return "Generate a single orientation with the specified EMAN style Euler angles. Symmetry is ignored."; }

◆ get_name()

virtual string EMAN::SingleOrientationGenerator::get_name ( ) const
inlinevirtual

Return "eman".

Returns
the unique name of this class

Implements EMAN::FactoryBase.

Definition at line 1181 of file symmetry.h.

1181{ return NAME; }
static const string NAME
The name of this class - used to access it from factories etc. Should be "icos".
Definition: symmetry.h:1210

References NAME.

◆ get_orientations_tally()

int SingleOrientationGenerator::get_orientations_tally ( const Symmetry3D *const  sym,
const float &  delta 
) const
privatevirtual

This function returns how many orientations will be generated for a given delta (angular spacing) It does this by simulated gen_orientations.

Parameters
symthe symmetry which defines the interesting asymmetric unit
deltathe desired angular spacing of the orientations
Returns
the number of orientations that will be generated using these parameters

Implements EMAN::OrientationGenerator.

Definition at line 519 of file symmetry.cpp.

520{
521return 1;
522}

◆ get_param_types()

virtual TypeDict EMAN::SingleOrientationGenerator::get_param_types ( ) const
inlinevirtual

Get a dictionary containing the permissable parameters of this class.

Returns
a dictionary containing the permissable parameters of this class parameters are explained in the dictionary itself

Reimplemented from EMAN::OrientationGenerator.

Definition at line 1192 of file symmetry.h.

1193 {
1195 d.put("az", EMObject::FLOAT, "Azimuthal angle (Z rotation in deg)");
1196 d.put("alt", EMObject::FLOAT, "Altitude (X rotation in deg)");
1197 d.put("phi", EMObject::FLOAT, "Phi angle (Z' rotation in deg");
1198 d.put("phitoo", EMObject::INT, "This option is ignored for the single orientation generator");
1199 d.put("randomphi", EMObject::INT, "This option is ignored for the single orientation generator");
1200 return d;
1201 }
virtual TypeDict get_param_types() const
Definition: symmetry.h:1011

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

◆ NEW()

static OrientationGenerator * EMAN::SingleOrientationGenerator::NEW ( )
inlinestatic

Factory support function NEW.

Returns
a newly instantiated class of this type

Definition at line 1173 of file symmetry.h.

1174 {
1175 return new SingleOrientationGenerator();
1176 }

References SingleOrientationGenerator().

◆ operator=()

SingleOrientationGenerator & EMAN::SingleOrientationGenerator::operator= ( const SingleOrientationGenerator )
private

Disallow assignment.

Member Data Documentation

◆ NAME

const string SingleOrientationGenerator::NAME = "single"
static

The name of this class - used to access it from factories etc. Should be "icos".

Definition at line 1210 of file symmetry.h.

Referenced by get_name().


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