#include <aligner.h>
Inheritance diagram for EMAN::RT3DSymmetryAligner:
Public Member Functions | |
virtual EMData * | align (EMData *this_img, EMData *to_img, const string &cmp_name="ccc.tomo", const Dict &cmp_params=Dict()) const |
See Aligner comments for more details. | |
virtual EMData * | align (EMData *this_img, EMData *to_img) const |
See Aligner comments for more details. | |
virtual vector< Dict > | xform_align_nbest (EMData *this_img, EMData *to_img, const unsigned int nsoln, const string &cmp_name, const Dict &cmp_params) const |
See Aligner comments for more details. | |
virtual string | get_name () const |
Get the Aligner's name. | |
virtual string | get_desc () const |
virtual TypeDict | get_param_types () const |
Static Public Member Functions | |
Aligner * | NEW () |
Static Public Attributes | |
const string | NAME = "rotate_symmetry_3d" |
This aligner takes a map, which must be first aligned to the symmetry axis, and rotates it to it symmetric positions. This is used to check for pseudo symmetry (such as finding the tail of an icosahedral virus). A list of best matches (moving to a reference is produced. Alternativly, a rotated verison of the moving map is returned.
sym | The symmtery to use | |
verbose | Turn this on to have useful information printed to standard out |
Definition at line 1201 of file aligner.h.
|
See Aligner comments for more details.
Implements EMAN::Aligner. Definition at line 1210 of file aligner.h. References align(). 01211 { 01212 return align(this_img, to_img, "ccc.tomo", Dict()); 01213 }
|
|
See Aligner comments for more details.
Implements EMAN::Aligner. Definition at line 2207 of file aligner.cpp. References EMAN::EMData::process(), EMAN::EMData::set_attr(), t, and xform_align_nbest(). 02208 { 02209 02210 vector<Dict> alis = xform_align_nbest(this_img,to,1,cmp_name,cmp_params); 02211 02212 Dict t; 02213 Transform* tr = (Transform*) alis[0]["xform.align3d"]; 02214 t["transform"] = tr; 02215 EMData* soln = this_img->process("xform",t); 02216 soln->set_attr("xform.align3d",tr); 02217 delete tr; tr = 0; 02218 02219 return soln; 02220 02221 }
|
|
Implements EMAN::Aligner. Definition at line 1225 of file aligner.h. 01226 { 01227 return "3D symmetry aligner"; 01228 }
|
|
Get the Aligner's name. Each Aligner is identified by a unique name.
Implements EMAN::Aligner. Definition at line 1220 of file aligner.h. 01221 {
01222 return NAME;
01223 }
|
|
Implements EMAN::Aligner. Definition at line 1235 of file aligner.h. References EMAN::TypeDict::put(). 01236 { 01237 TypeDict d; 01238 d.put("sym", EMObject::FLOAT,"The symmetry. Default is icos"); 01239 d.put("verbose", EMObject::BOOL,"Turn this on to have useful information printed to standard out."); 01240 return d; 01241 }
|
|
Definition at line 1230 of file aligner.h. 01231 { 01232 return new RT3DSymmetryAligner(); 01233 }
|
|
See Aligner comments for more details.
Reimplemented from EMAN::Aligner. Definition at line 2223 of file aligner.cpp. References EMAN::EMData::cmp(), copy(), EMAN::Dict::end(), EMAN::Transform::get_rotation(), EMAN::Symmetry3D::get_symmetries(), EMAN::EMData::process(), and EMAN::Dict::set_default(). Referenced by align(). 02224 { 02225 02226 bool verbose = params.set_default("verbose",false); 02227 //Initialize a soln dict 02228 vector<Dict> solns; 02229 if (nsoln == 0) return solns; // What was the user thinking? 02230 for (unsigned int i = 0; i < nsoln; ++i ) { 02231 Dict d; 02232 d["score"] = 1.e24; 02233 Transform t; // identity by default 02234 d["xform.align3d"] = &t; // deep copy is going on here 02235 solns.push_back(d); 02236 } 02237 02238 //Genrate symmetry related orritenations 02239 vector<Transform> syms = Symmetry3D::get_symmetries((string)params.set_default("sym","icos")); 02240 02241 float score = 0.0f; 02242 for ( vector<Transform>::const_iterator symit = syms.begin(); symit != syms.end(); ++symit ) { 02243 Transform sympos = *symit; //stupidly this is necessary!!! 02244 //Here move to sym position and compute the score 02245 EMData* transformed = this_img->process("xform",Dict("transform",&sympos)); 02246 score = transformed->cmp(cmp_name,this_img,cmp_params); 02247 delete transformed; transformed = 0; 02248 02249 if (verbose) { 02250 Dict rots = sympos.get_rotation("eman"); 02251 cout <<"Score is: " << score << " az " << float(rots["az"]) << " alt " << float(rots["alt"]) << " phi " << float(rots["phi"]) << endl; 02252 } 02253 02254 unsigned int j = 0; 02255 for ( vector<Dict>::iterator it = solns.begin(); it != solns.end(); ++it, ++j ) { 02256 if ( (float)(*it)["score"] > score ) { // Note greater than - EMAN2 preferes minimums as a matter of policy 02257 vector<Dict>::reverse_iterator rit = solns.rbegin(); 02258 copy(rit+1,solns.rend()-j,rit); 02259 Dict& d = (*it); 02260 d["score"] = score; 02261 d["xform.align3d"] = &sympos; // deep copy is going on here 02262 break; 02263 } 02264 } 02265 } 02266 return solns; 02267 }
|
|
Definition at line 78 of file aligner.cpp. |