EMAN2
Classes | Public Member Functions | Private Attributes | Friends | List of all members
EMAN::Dict Class Reference

Dict is a dictionary to store <string, EMObject> pair. More...

#include <emobject.h>

Classes

class  const_iterator
 Const iterator support for the Dict object This is just a wrapper, everything is inherited from the map<string,EMObject>::cons_iterator so the interface is the same as you would expect i.e for ( Dict::const_iterator it = params.begin(); it != params.end(); ++it ) More...
 
class  iterator
 Non const iterator support for the Dict object This is just a wrapper, everything is inherited from the map<string,EMObject>::iterator so the interface is the same as you would expect i.e for ( Dict::iterator it = params.begin(); it != params.end(); ++it ) More...
 

Public Member Functions

 Dict ()
 
 Dict (const string &key1, EMObject val1)
 Construct a Dict object from 1 key/value pair It's probably more conventional to intialize key/value pairs using operator[], but either approach is fine. More...
 
 Dict (const string &key1, EMObject val1, const string &key2, EMObject val2)
 Construct a Dict object from 2 key/value pairs. More...
 
 Dict (const string &key1, EMObject val1, const string &key2, EMObject val2, const string &key3, EMObject val3)
 Construct a Dict object from 3 key/value pairs. More...
 
 Dict (const string &key1, EMObject val1, const string &key2, EMObject val2, const string &key3, EMObject val3, const string &key4, EMObject val4)
 Construct a Dict object from 4 key/value pairs. More...
 
 Dict (const string &key1, EMObject val1, const string &key2, EMObject val2, const string &key3, EMObject val3, const string &key4, EMObject val4, const string &key5, EMObject val5)
 Construct a Dict object from 5 key/value pairs. More...
 
 Dict (const map< string, EMObject > &d)
 Construct a Dict object from a map object Calls the generic algorithm "copy". More...
 
 ~Dict ()
 Destructor Performs no explicit action besides what the compiler automatically does. More...
 
 Dict (const Dict &that)
 Copy constructor Copies all elements in dict. More...
 
Dictoperator= (const Dict &that)
 Assignment operator Copies all elements in dict. More...
 
vector< string > keys () const
 Get a vector containing all of the (string) keys in this dictionary. More...
 
vector< EMObjectvalues () const
 Get a vector containing copies of each of the EMObjects in this dictionary. More...
 
void update (const Dict &that)
 Update replaces values from that into this without otherwise altering this. More...
 
bool has_key_ci (const string &key) const
 Ask the Dictionary if it as a particular key in a case insensitive way. More...
 
bool has_key (const string &key) const
 Ask the Dictionary if it as a particular key. More...
 
size_t size () const
 Ask the Dictionary for its size. More...
 
EMObject get (const string &key) const
 Get the EMObject corresponding to the particular key Probably better to just use operator[]. More...
 
EMObject get_ci (const string &key) const
 Get the EMObject corresponding to the particular key using case insensitivity. More...
 
void put (const string &key, EMObject val)
 Put the value/key pair into the dictionary probably better to just use operator[]. More...
 
void erase (const string &key)
 Remove a particular key. More...
 
void clear ()
 Clear all keys wraps map.clear() More...
 
template<typename type >
type set_default (const string &key, type val)
 Default setting behavior This can be achieved using a template - d.woolford Jan 2008 (before there was a function being written for every type) More...
 
Dict copy_exclude_keys (const vector< string > &excluded_keys) const
 
Dict copy_exclusive_keys (const vector< string > &exclusive_keys) const
 
Dict copy_keys_in (const TypeDict &tdict) const
 
EMObjectoperator[] (const string &key)
 
EMObject operator[] (const string &key) const
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
iterator find (const string &key)
 
const_iterator find (const string &key) const
 

Private Attributes

map< string, EMObjectdict
 

Friends

bool operator== (const Dict &d1, const Dict &d2)
 Friend declaration operator== namespace EMAN2 operator== accesses private variables. More...
 
bool operator!= (const Dict &d1, const Dict &d2)
 Friend declaration operator!= namespace EMAN2 operator!= accesses private variables. More...
 

Detailed Description

Dict is a dictionary to store <string, EMObject> pair.

Typical ways to construct a Dict:

 Dict d;
 d["lowpass"] = 12.23;
 float lowpass1 = d["lowpass"];

 Dict d2("lowpass", 12.23);

You can iterate through a dict: for ( Dict::const_iterator it = params.begin(); it != params.end(); ++it ) { //do things to it } And similary use the Dict iterator as arguments to the generic algorithms that are feasible, such as copy.

You can find things in the iterator style: if( d.find("lowpass") != d.end() ) cout << "D has a lowpass key" << endl;\ Or like this if( d.has_key("lowpass") ) ...

A Dict has copy and assignment operators.

See the testing code in rt/emdata/test_emobject.cpp for prewritten testing code

Definition at line 384 of file emobject.h.

Constructor & Destructor Documentation

◆ Dict() [1/8]

EMAN::Dict::Dict ( )
inline

Definition at line 387 of file emobject.h.

388 {
389 }

◆ Dict() [2/8]

EMAN::Dict::Dict ( const string &  key1,
EMObject  val1 
)
inline

Construct a Dict object from 1 key/value pair It's probably more conventional to intialize key/value pairs using operator[], but either approach is fine.

Definition at line 395 of file emobject.h.

396 {
397 dict[key1] = val1;
398 }
map< string, EMObject > dict
Definition: emobject.h:642

References dict.

◆ Dict() [3/8]

EMAN::Dict::Dict ( const string &  key1,
EMObject  val1,
const string &  key2,
EMObject  val2 
)
inline

Construct a Dict object from 2 key/value pairs.

Definition at line 402 of file emobject.h.

404 {
405 dict[key1] = val1;
406 dict[key2] = val2;
407 }

References dict.

◆ Dict() [4/8]

EMAN::Dict::Dict ( const string &  key1,
EMObject  val1,
const string &  key2,
EMObject  val2,
const string &  key3,
EMObject  val3 
)
inline

Construct a Dict object from 3 key/value pairs.

Definition at line 411 of file emobject.h.

414 {
415 dict[key1] = val1;
416 dict[key2] = val2;
417 dict[key3] = val3;
418 }

References dict.

◆ Dict() [5/8]

EMAN::Dict::Dict ( const string &  key1,
EMObject  val1,
const string &  key2,
EMObject  val2,
const string &  key3,
EMObject  val3,
const string &  key4,
EMObject  val4 
)
inline

Construct a Dict object from 4 key/value pairs.

Definition at line 422 of file emobject.h.

426 {
427 dict[key1] = val1;
428 dict[key2] = val2;
429 dict[key3] = val3;
430 dict[key4] = val4;
431 }

References dict.

◆ Dict() [6/8]

EMAN::Dict::Dict ( const string &  key1,
EMObject  val1,
const string &  key2,
EMObject  val2,
const string &  key3,
EMObject  val3,
const string &  key4,
EMObject  val4,
const string &  key5,
EMObject  val5 
)
inline

Construct a Dict object from 5 key/value pairs.

Definition at line 435 of file emobject.h.

440 {
441 dict[key1] = val1;
442 dict[key2] = val2;
443 dict[key3] = val3;
444 dict[key4] = val4;
445 dict[key5] = val5;
446 }

References dict.

◆ Dict() [7/8]

EMAN::Dict::Dict ( const map< string, EMObject > &  d)
inline

Construct a Dict object from a map object Calls the generic algorithm "copy".

Definition at line 451 of file emobject.h.

452 {
453 copy(d.begin(), d.end(), inserter(dict, dict.begin()));
454 // Or use
455 // dict.insert(d.begin(), d.end());
456 }
EMData * copy() const
This file is a part of "emdata.h", to use functions in this file, you should "#include "emdata....

References copy(), and dict.

◆ ~Dict()

EMAN::Dict::~Dict ( )
inline

Destructor Performs no explicit action besides what the compiler automatically does.

Definition at line 461 of file emobject.h.

461{}

◆ Dict() [8/8]

Dict::Dict ( const Dict that)

Copy constructor Copies all elements in dict.

Definition at line 999 of file emobject.cpp.

1000{
1001 *this = that;
1002}

Member Function Documentation

◆ begin() [1/2]

Dict::iterator Dict::begin ( void  )

◆ begin() [2/2]

Dict::const_iterator Dict::begin ( void  ) const

Definition at line 1050 of file emobject.cpp.

1051{
1052 return const_iterator( (map < string, EMObject >::const_iterator) dict.begin() );
1053}

References dict.

◆ clear()

void EMAN::Dict::clear ( )
inline

Clear all keys wraps map.clear()

Definition at line 560 of file emobject.h.

561 {
562 dict.clear();
563 }

References dict.

Referenced by EMAN::nn4_ctfReconstructor::insert_slice(), EMAN::nn4_ctfwReconstructor::insert_slice(), EMAN::nn4_ctfwsReconstructor::insert_slice(), and EMAN::FactoryBase::set_params().

◆ copy_exclude_keys()

Dict EMAN::Dict::copy_exclude_keys ( const vector< string > &  excluded_keys) const
inline

Definition at line 577 of file emobject.h.

578 {
579 Dict ret(*this);
580
581 for (auto it = excluded_keys.begin(); it != excluded_keys.end(); ++it )
582 if (ret.has_key(*it))
583 ret.erase(*it);
584
585 return ret;
586 }

References erase(), and has_key().

◆ copy_exclusive_keys()

Dict EMAN::Dict::copy_exclusive_keys ( const vector< string > &  exclusive_keys) const
inline

Definition at line 588 of file emobject.h.

589 {
590 Dict ret;
591 for (auto it = exclusive_keys.begin(); it != exclusive_keys.end(); ++it ) {
592 if (has_key(*it))
593 ret[*it] = (*this)[*it];
594 }
595
596 return ret;
597 }
bool has_key(const string &key) const
Ask the Dictionary if it as a particular key.
Definition: emobject.h:511

References has_key().

Referenced by copy_keys_in().

◆ copy_keys_in()

Dict EMAN::Dict::copy_keys_in ( const TypeDict tdict) const
inline

Definition at line 599 of file emobject.h.

599 {
600 vector<string> keys = tdict.keys();
602 }
Dict copy_exclusive_keys(const vector< string > &exclusive_keys) const
Definition: emobject.h:588
vector< string > keys() const
Get a vector containing all of the (string) keys in this dictionary.
Definition: emobject.h:475

References copy_exclusive_keys(), EMAN::TypeDict::keys(), and keys().

Referenced by EMAN::FactoryBase::copy_relevant_params().

◆ end() [1/2]

Dict::iterator Dict::end ( void  )

◆ end() [2/2]

Dict::const_iterator Dict::end ( void  ) const

Definition at line 1066 of file emobject.cpp.

1067{
1068 return const_iterator( (map < string, EMObject >::const_iterator)dict.end() );
1069}

References dict.

◆ erase()

void EMAN::Dict::erase ( const string &  key)
inline

Remove a particular key.

Definition at line 552 of file emobject.h.

553 {
554 dict.erase(key);
555 }

References dict.

Referenced by copy_exclude_keys(), del_attr(), and read_binedimage().

◆ find() [1/2]

Dict::iterator Dict::find ( const string &  key)

Definition at line 1056 of file emobject.cpp.

1057{
1058 return iterator( dict.find(key) );
1059}

References dict.

◆ find() [2/2]

Dict::const_iterator Dict::find ( const string &  key) const

Definition at line 1071 of file emobject.cpp.

1072{
1073 return const_iterator( (map < string, EMObject >::const_iterator)dict.find(key) );
1074}

References dict.

◆ get()

EMObject EMAN::Dict::get ( const string &  key) const
inline

Get the EMObject corresponding to the particular key Probably better to just use operator[].

Definition at line 527 of file emobject.h.

528 {
529 if( has_key(key) ) {
530 return dict[key];
531 }
532 else {
533 LOGERR("No such key exist in this Dict");
534 throw NotExistingObjectException("EMObject", "Nonexisting key (" + key + ") in Dict");
535 }
536 }
#define NotExistingObjectException(objname, desc)
Definition: exception.h:130
#define LOGERR
Definition: log.h:51

References dict, has_key(), LOGERR, and NotExistingObjectException.

Referenced by EMAN::file_store::add_image(), EMAN::HarmonicProcessor::process(), EMAN::MeanZeroEdgeProcessor::process_inplace(), EMAN::LinearXformProcessor::set_params(), EMAN::RangeThresholdProcessor::set_params(), EMAN::SigmaProcessor::set_params(), and EMAN::TransformProcessor::transform().

◆ get_ci()

EMObject Dict::get_ci ( const string &  key) const

Get the EMObject corresponding to the particular key using case insensitivity.

Parameters
keythe key you want to check for in a case insensitive way

Definition at line 1128 of file emobject.cpp.

1129{
1130 string lower_key = Util::str_to_lower(key);
1131
1132 for (map < string, EMObject >::const_iterator it = dict.begin(); it != dict.end(); ++it ) {
1133 string lower = Util::str_to_lower(it->first);
1134 if (lower == lower_key) return it->second;
1135 }
1136
1137 throw NotExistingObjectException("EMObject", "Nonexisting key (" + key + ") in Dict");
1138}
static string str_to_lower(const string &s)
Return a lower case version of the argument string.
Definition: util.cpp:283

References dict, NotExistingObjectException, and EMAN::Util::str_to_lower().

Referenced by EMAN::Transform::set_params(), EMAN::Transform::set_params_inverse(), and EMAN::Transform::set_rotation().

◆ has_key()

bool EMAN::Dict::has_key ( const string &  key) const
inline

Ask the Dictionary if it as a particular key.

Parameters
keythe (string) key to find

Definition at line 511 of file emobject.h.

512 {
513 auto p = dict.find(key);
514 return p != dict.end();
515 }

References dict.

Referenced by EMAN::PawelProjector::backproject3d(), EMAN::ChaoProjector::backproject3d(), EMAN::EMData::clip_inplace(), EMAN::CccCmp::cmp(), EMAN::LodCmp::cmp(), EMAN::SqEuclideanCmp::cmp(), EMAN::DotCmp::cmp(), EMAN::TomoWedgeFscCmp::cmp(), copy_exclude_keys(), copy_exclusive_keys(), EMAN::SetSFProcessor::create_radial_func(), EMAN::TomoAverager::finish(), EMAN::FourierReconstructor::finish(), EMAN::WienerFourierReconstructor::finish(), EMAN::FourierIterReconstructor::finish(), get(), get_attr(), EMAN::EMData::get_clip(), get_ctf(), EMAN::EMUtil::getRenderLimits(), EMAN::FourierPixelInserter3D::init(), EMAN::FourierProcessor::preprocess(), EMAN::LowpassAutoBProcessor::preprocess(), EMAN::HighpassAutoPeakProcessor::preprocess(), EMAN::HarmonicProcessor::process(), EMAN::BispecSliceProcessor::process(), EMAN::TransformProcessor::process(), EMAN::ScaleTransformProcessor::process(), EMAN::BoxStatProcessor::process(), EMAN::GaussZFourierProcessor::process_inplace(), EMAN::LowpassRandomPhaseProcessor::process_inplace(), EMAN::TransformProcessor::process_inplace(), EMAN::ScaleTransformProcessor::process_inplace(), EMAN::GradientPlaneRemoverProcessor::process_inplace(), EMAN::NormalizeRowProcessor::process_inplace(), EMAN::AddNoiseProcessor::process_inplace(), EMAN::AddRandomNoiseProcessor::process_inplace(), EMAN::AutoMask2DProcessor::process_inplace(), EMAN::AutoMask3D2Processor::process_inplace(), EMAN::BinaryOperateProcessor< Type >::process_inplace(), EMAN::SetIsoPowProcessor::process_inplace(), EMAN::TestImageFourierNoiseProfile::process_inplace(), EMAN::CTFSNRWeightProcessor::process_inplace(), EMAN::TestImageSphericalWave::process_inplace(), EMAN::TestImageSinewave::process_inplace(), EMAN::TestImageSquarecube::process_inplace(), EMAN::TestImageEllipse::process_inplace(), EMAN::TestImageHollowEllipse::process_inplace(), EMAN::TestImageNoiseUniformRand::process_inplace(), EMAN::TestImageNoiseGauss::process_inplace(), EMAN::TestImageCylinder::process_inplace(), EMAN::TestImageDisc::process_inplace(), EMAN::FFTProcessor::process_inplace(), EMAN::FourierGriddingProjector::project3d(), EMAN::PawelProjector::project3d(), EMAN::ChaoProjector::project3d(), read_binedimage(), refalifn(), scale_pixel(), set_default(), EMAN::KMeansAnalyzer::set_params(), EMAN::DiscritizeProcessor::set_params(), EMAN::FiniteProcessor::set_params(), EMAN::CircularMaskProcessor::set_params(), EMAN::MaskGaussNonuniformProcessor::set_params(), EMAN::PaintProcessor::set_params(), EMAN::PolyMaskProcessor::set_params(), EMAN::FourierReconstructor::setup(), EMAN::nn4Reconstructor::setup(), EMAN::nn4_rectReconstructor::setup(), EMAN::nnSSNR_Reconstructor::setup(), EMAN::nn4_ctfReconstructor::setup(), EMAN::nn4_ctfwReconstructor::setup(), EMAN::nn4_ctfwsReconstructor::setup(), EMAN::nn4_ctf_rectReconstructor::setup(), EMAN::nnSSNR_ctfReconstructor::setup(), EMAN::FourierReconstructor::setup_seed(), EMAN::FourierReconstructor::setup_seedandweights(), EMAN::RT3DLocalTreeAligner::testort(), EMAN::RT2Dto3DTreeAligner::testort(), EMAN::RT3DTreeAligner::testort(), EMAN::TestUtil::to_emobject(), EMAN::SpiderIO::write_single_header(), EMAN::RT3DGridAligner::xform_align_nbest(), EMAN::RT3DSphereAligner::xform_align_nbest(), EMAN::RT2Dto3DTreeAligner::xform_align_nbest(), EMAN::RT3DTreeAligner::xform_align_nbest(), EMAN::RT3DLocalTreeAligner::xform_align_nbest(), and EMAN::RT3DSymmetryAligner::xform_align_nbest().

◆ has_key_ci()

bool Dict::has_key_ci ( const string &  key) const

Ask the Dictionary if it as a particular key in a case insensitive way.

Parameters
keythe (string) key to find

Definition at line 1140 of file emobject.cpp.

1141{
1142 string lower_key = Util::str_to_lower(key);
1143
1144 for (map < string, EMObject >::const_iterator it = dict.begin(); it != dict.end(); ++it ) {
1145 string lower = Util::str_to_lower(it->first);
1146 if (lower == lower_key) return true;
1147 }
1148 return false;
1149}

References dict, and EMAN::Util::str_to_lower().

Referenced by EMAN::Transform::detect_problem_keys(), EMAN::Transform::set_params(), EMAN::Transform::set_params_inverse(), and EMAN::Transform::set_rotation().

◆ keys()

vector< string > EMAN::Dict::keys ( ) const
inline

Get a vector containing all of the (string) keys in this dictionary.

Definition at line 475 of file emobject.h.

476 {
477 vector<string> result;
478
479 for (auto p = dict.begin(); p != dict.end(); p++)
480 result.push_back(p->first);
481
482 return result;
483 }

References dict.

Referenced by copy_keys_in(), EMAN::EMUtil::dump_dict(), EMAN::TestUtil::dump_emdata(), EMAN::Factory< T >::get(), and EMAN::TestUtil::test_dict().

◆ operator=()

Dict & Dict::operator= ( const Dict that)

Assignment operator Copies all elements in dict.

Definition at line 1004 of file emobject.cpp.

1005{
1006 if ( this != &that )
1007 {
1008 dict.clear();
1009 copy(that.begin(), that.end(), inserter(dict, dict.begin()));
1010 // or use this
1011 // dict.insert( that.begin(), that.end());
1012 }
1013 else
1014 {
1015 cerr << "Warning - attempted to assign a Dict object to itself. No action taken" << endl;
1016 }
1017
1018 return *this;
1019}
iterator end()
Definition: emobject.cpp:1061
iterator begin()
Definition: emobject.cpp:1045

References begin(), copy(), dict, and end().

◆ operator[]() [1/2]

EMObject & EMAN::Dict::operator[] ( const string &  key)
inline

Definition at line 604 of file emobject.h.

605 {
606// static EMObject nullreturn;
607// if( has_key(key) ) return dict[key];
608// else return nullreturn;
609
610// if( has_key(key) ) {
611 return dict[key];
612// }
613// else {
614// LOGERR("No such key exist in this Dict");
615// throw NotExistingObjectException("EMObject", "Nonexisting key (" + key + ") in Dict");
616// }
617 }

References dict.

◆ operator[]() [2/2]

EMObject EMAN::Dict::operator[] ( const string &  key) const
inline

Definition at line 619 of file emobject.h.

620 {
621// if( has_key(key) ) return dict[key];
622// else return EMObject();
623 return dict[key];
624
625// else {
626// LOGERR("No such key exist in this Dict");
627// throw NotExistingObjectException("EMObject", "Nonexisting key (" + key + ") in Dict");
628// }
629 }

References dict.

◆ put()

void EMAN::Dict::put ( const string &  key,
EMObject  val 
)
inline

Put the value/key pair into the dictionary probably better to just use operator[].

Definition at line 545 of file emobject.h.

546 {
547 dict[key] = val;
548 }

References dict.

Referenced by EMAN::NSigmaClampingProcessor::process_inplace(), and EMAN::SymSearchProcessor::process_inplace().

◆ set_default()

template<typename type >
type EMAN::Dict::set_default ( const string &  key,
type  val 
)
inline

Default setting behavior This can be achieved using a template - d.woolford Jan 2008 (before there was a function being written for every type)

Definition at line 569 of file emobject.h.

570 {
571 if (!has_key(key)) {
572 dict[key] = val;
573 }
574 return dict[key];
575 }

References dict, and has_key().

Referenced by EMAN::ImageAverager::add_image(), EMAN::LocalWeightAverager::add_image(), EMAN::FourierWeightAverager::add_image(), EMAN::TomoAverager::add_image(), EMAN::MinMaxAverager::add_image(), EMAN::SigmaAverager::add_image(), EMAN::OrientationGenerator::add_orientation(), EMAN::ScaleAlignerABS::align_using_base(), EMAN::InertiaMatrixAnalyzer::analyze(), EMAN::ShapeAnalyzer::analyze(), EMAN::KMeansAnalyzer::analyze(), EMAN::CircularAverageAnalyzer::analyze(), EMAN::NormalizeCircleMeanProcessor::calc_mean(), EMAN::CccCmp::cmp(), EMAN::LodCmp::cmp(), EMAN::SqEuclideanCmp::cmp(), EMAN::DotCmp::cmp(), EMAN::TomoCccCmp::cmp(), EMAN::TomoWedgeCccCmp::cmp(), EMAN::TomoWedgeFscCmp::cmp(), EMAN::TomoFscCmp::cmp(), EMAN::QuadMinDotCmp::cmp(), EMAN::OptSubCmp::cmp(), EMAN::OptVarianceCmp::cmp(), EMAN::PhaseCmp::cmp(), EMAN::FRCCmp::cmp(), EMAN::LowpassAutoBProcessor::create_radial_func(), EMAN::MatchSFProcessor::create_radial_func(), EMAN::SetSFProcessor::create_radial_func(), EMAN::LocalWeightAverager::finish(), EMAN::TomoAverager::finish(), EMAN::FourierReconstructor::finish(), EMAN::WienerFourierReconstructor::finish(), EMAN::RealMedianReconstructor::finish(), EMAN::EmanOrientationGenerator::gen_orientations(), EMAN::SingleOrientationGenerator::gen_orientations(), EMAN::RandomOrientationGenerator::gen_orientations(), EMAN::EvenOrientationGenerator::gen_orientations(), EMAN::SaffOrientationGenerator::gen_orientations(), EMAN::OptimumOrientationGenerator::gen_orientations(), EMAN::CSym::get_asym_unit_points(), EMAN::DSym::get_asym_unit_points(), EMAN::HSym::get_asym_unit_points(), EMAN::CSym::get_asym_unit_triangles(), EMAN::DSym::get_asym_unit_triangles(), EMAN::CSym::get_delimiters(), EMAN::DSym::get_delimiters(), EMAN::HSym::get_delimiters(), EMAN::EmanOrientationGenerator::get_orientations_tally(), EMAN::EvenOrientationGenerator::get_orientations_tally(), EMAN::SaffOrientationGenerator::get_orientations_tally(), EMAN::OptimumOrientationGenerator::get_orientations_tally(), EMAN::CSym::get_sym(), EMAN::DSym::get_sym(), EMAN::HSym::get_sym(), EMAN::FourierReconstructor::insert_slice(), EMAN::CSym::is_in_asym_unit(), EMAN::DSym::is_in_asym_unit(), EMAN::HSym::is_in_asym_unit(), EMAN::HarmonicProcessor::process(), EMAN::BispecSliceProcessor::process(), EMAN::MaskPackProcessor::process(), EMAN::GaussSegmentProcessor::process(), EMAN::DistanceSegmentProcessor::process(), EMAN::KmeansSegmentProcessor::process(), EMAN::CtfSimProcessor::process(), EMAN::TransformProcessor::process(), EMAN::IntTranslateProcessor::process(), EMAN::ApplySymProcessor::process(), EMAN::ScaleTransformProcessor::process(), EMAN::MeanShrinkProcessor::process(), EMAN::MedianShrinkProcessor::process(), EMAN::FFTResampleProcessor::process(), EMAN::SubtractOptProcessor::process(), EMAN::DirectionalSumProcessor::process(), EMAN::WatershedProcessor::process(), EMAN::CircularAverageBinarizeProcessor::process(), EMAN::BooleanShrinkProcessor::process(), EMAN::BinarySkeletonizerProcessor::process(), EMAN::FSCFourierProcessor::process(), EMAN::FourierProcessor::process_inplace(), EMAN::FourierAnlProcessor::process_inplace(), EMAN::AzSharpProcessor::process_inplace(), EMAN::Axis0FourierProcessor::process_inplace(), EMAN::GaussZFourierProcessor::process_inplace(), EMAN::ConvolutionProcessor::process_inplace(), EMAN::BinaryDilationProcessor::process_inplace(), EMAN::BinaryErosionProcessor::process_inplace(), EMAN::BinaryClosingProcessor::process_inplace(), EMAN::BinaryOpeningProcessor::process_inplace(), EMAN::BinaryInternalGradientProcessor::process_inplace(), EMAN::BinaryExternalGradientProcessor::process_inplace(), EMAN::BinaryMorphGradientProcessor::process_inplace(), EMAN::BinaryTopHatProcessor::process_inplace(), EMAN::BinaryBlackHatProcessor::process_inplace(), EMAN::CCCSNRProcessor::process_inplace(), EMAN::RangeZeroProcessor::process_inplace(), EMAN::SetBitsProcessor::process_inplace(), EMAN::TransformProcessor::process_inplace(), EMAN::IntTranslateProcessor::process_inplace(), EMAN::ScaleTransformProcessor::process_inplace(), EMAN::ClampingProcessor::process_inplace(), EMAN::NSigmaClampingProcessor::process_inplace(), EMAN::ToMinvalProcessor::process_inplace(), EMAN::BinarizeFourierProcessor::process_inplace(), EMAN::MaskAzProcessor::process_inplace(), EMAN::LinearPyramidProcessor::process_inplace(), EMAN::MeanShrinkProcessor::process_inplace(), EMAN::MedianShrinkProcessor::process_inplace(), EMAN::FFTResampleProcessor::process_inplace(), EMAN::FlattenBackgroundProcessor::process_inplace(), EMAN::FFTPeakProcessor::process_inplace(), EMAN::FFTConeProcessor::process_inplace(), EMAN::FFTWedgeProcessor::process_inplace(), EMAN::WedgeFillProcessor::process_inplace(), EMAN::SigmaZeroEdgeProcessor::process_inplace(), EMAN::OutlierProcessor::process_inplace(), EMAN::ZeroEdgeRowProcessor::process_inplace(), EMAN::ZeroEdgePlaneProcessor::process_inplace(), EMAN::NormalizeMaskProcessor::process_inplace(), EMAN::NormalizeByMassProcessor::process_inplace(), EMAN::NormalizeToLeastSquareProcessor::process_inplace(), EMAN::AutoMask2DProcessor::process_inplace(), EMAN::AutoMaskAsymUnit::process_inplace(), EMAN::AutoMaskDustProcessor::process_inplace(), EMAN::AutoMask3DProcessor::process_inplace(), EMAN::AutoMask3D2Processor::process_inplace(), EMAN::IterMultiMaskProcessor::process_inplace(), EMAN::AddMaskShellProcessor::process_inplace(), EMAN::PhaseToMassCenterProcessor::process_inplace(), EMAN::ToMassCenterProcessor::process_inplace(), EMAN::CTFCorrProcessor::process_inplace(), EMAN::BadLineXYProcessor::process_inplace(), EMAN::StripeXYProcessor::process_inplace(), EMAN::IndexMaskFileProcessor::process_inplace(), EMAN::TestImageFourierNoiseGaussian::process_inplace(), EMAN::TestImageFourierGaussianBand::process_inplace(), EMAN::CTFSNRWeightProcessor::process_inplace(), EMAN::TestImageLineWave::process_inplace(), EMAN::TestImageGradient::process_inplace(), EMAN::TestImageAxes::process_inplace(), EMAN::TestImageEllipse::process_inplace(), EMAN::TestImageHollowEllipse::process_inplace(), EMAN::TestImageCirclesphere::process_inplace(), EMAN::TomoTiltEdgeMaskProcessor::process_inplace(), EMAN::TomoTiltAngleWeightProcessor::process_inplace(), EMAN::HistogramBin::process_inplace(), EMAN::RotateInFSProcessor::process_inplace(), EMAN::ObjDensityProcessor::process_inplace(), EMAN::ObjLabelProcessor::process_inplace(), EMAN::BwThinningProcessor::process_inplace(), EMAN::PruneSkeletonProcessor::process_inplace(), EMAN::GrowSkeletonProcessor::process_inplace(), EMAN::ZThicknessProcessor::process_inplace(), EMAN::BooleanShrinkProcessor::process_inplace(), EMAN::ModelEMCylinderProcessor::process_inplace(), EMAN::ApplyPolynomialProfileToHelix::process_inplace(), EMAN::BwMajorityProcessor::process_pixel(), EMAN::FixSignProcessor::set_params(), EMAN::RecipCarefullyProcessor::set_params(), EMAN::ExpProcessor::set_params(), EMAN::MaskSharpProcessor::set_params(), EMAN::MaskSoftProcessor::set_params(), EMAN::FourierReconstructorSimple2D::setup(), EMAN::FourierReconstructor::setup(), EMAN::FourierIterReconstructor::setup(), EMAN::FourierReconstructor::setup_seed(), EMAN::FourierReconstructor::setup_seedandweights(), EMAN::RT3DLocalTreeAligner::testort(), EMAN::RT3DTreeAligner::testort(), EMAN::TransformProcessor::transform(), EMAN::RT3DGridAligner::xform_align_nbest(), EMAN::RT3DSphereAligner::xform_align_nbest(), EMAN::RT2DTreeAligner::xform_align_nbest(), EMAN::RT2Dto3DTreeAligner::xform_align_nbest(), EMAN::RT3DTreeAligner::xform_align_nbest(), EMAN::RT3DLocalTreeAligner::xform_align_nbest(), and EMAN::RT3DSymmetryAligner::xform_align_nbest().

◆ size()

size_t EMAN::Dict::size ( ) const
inline

◆ update()

void Dict::update ( const Dict that)

Update replaces values from that into this without otherwise altering this.

Definition at line 1032 of file emobject.cpp.

1033{
1034 for (Dict::const_iterator p=that.begin(); p!=that.end(); p++) {
1035 dict[p->first]=p->second;
1036 }
1037}
Const iterator support for the Dict object This is just a wrapper, everything is inherited from the m...
Definition: emobject.h:674

References begin(), dict, and end().

◆ values()

vector< EMObject > EMAN::Dict::values ( ) const
inline

Get a vector containing copies of each of the EMObjects in this dictionary.

Definition at line 487 of file emobject.h.

488 {
489 vector<EMObject> result;
490
491 for (auto p = dict.begin(); p != dict.end(); p++)
492 result.push_back(p->second);
493
494 return result;
495 }

References dict.

Referenced by EMAN::EMUtil::dump_dict(), EMAN::RealPixelProcessor::set_params(), and EMAN::MorphologicalProcessor::set_params().

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( const Dict d1,
const Dict d2 
)
friend

Friend declaration operator!= namespace EMAN2 operator!= accesses private variables.

◆ operator==

bool operator== ( const Dict d1,
const Dict d2 
)
friend

Friend declaration operator== namespace EMAN2 operator== accesses private variables.

Member Data Documentation

◆ dict

map<string, EMObject> EMAN::Dict::dict
mutableprivate

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