3D rotational symmetry aligner.
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.
- Parameters
-
sym | The symmtery to use |
verbose | Turn this on to have useful information printed to standard out |
- Author
- John Flanagan
- Date
- Mar 2011
Definition at line 2030 of file aligner.h.
vector< Dict > RT3DSymmetryAligner::xform_align_nbest |
( |
EMData * |
this_img, |
|
|
EMData * |
to_img, |
|
|
const unsigned int |
nsoln, |
|
|
const string & |
cmp_name, |
|
|
const Dict & |
cmp_params |
|
) |
| const |
|
virtual |
See Aligner comments for more details.
Reimplemented from EMAN::Aligner.
Definition at line 4592 of file aligner.cpp.
4598 ixform =
params[
"transform"];
4605 if (nsoln == 0)
return solns;
4606 for (
unsigned int i = 0; i < nsoln; ++i ) {
4610 d[
"xform.align3d"] = &t;
4614 #ifdef EMAN2_USING_CUDA
4615 if(EMData::usecuda == 1) {
4616 cout <<
"Using CUDA for 3D sym alignment" << endl;
4617 if(!this_img->getcudarwdata()) this_img->copy_to_cudaro();
4618 if(!to->getcudarwdata()) to->copy_to_cuda();
4627 for ( vector<Transform>::const_iterator symit = syms.begin(); symit != syms.end(); ++symit ) {
4630 EMData* transformed = this_img->process(
"xform",
Dict(
"transform", &sympos));
4631 score = c->
cmp(transformed,to);
4632 delete transformed; transformed = 0;
4636 cout <<
"Score is: " << score <<
" az " << float(rots[
"az"]) <<
" alt " << float(rots[
"alt"]) <<
" phi " << float(rots[
"phi"]) << endl;
4640 for ( vector<Dict>::iterator it = solns.begin(); it != solns.end(); ++it, ++j ) {
4641 if ( (
float)(*it)[
"score"] > score ) {
4642 vector<Dict>::reverse_iterator rit = solns.rbegin();
4643 copy(rit+1,solns.rend()-j,rit);
4646 d[
"xform.align3d"] = &sympos;
4652 if (c != 0)
delete c;
Cmp class defines image comparison method.
virtual float cmp(EMData *image, EMData *with) const =0
To compare 'image' with another image passed in through its parameters.
Dict is a dictionary to store <string, EMObject> pair.
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...
bool has_key(const string &key) const
Ask the Dictionary if it as a particular key.
EMData stores an image's data and defines core image processing routines.
Factory is used to store objects to create new instances.
static vector< Transform > get_symmetries(const string &symmetry)
EMData * copy() const
This file is a part of "emdata.h", to use functions in this file, you should "#include "emdata....
References EMAN::Cmp::cmp(), copy(), EMAN::Transform::get_rotation(), EMAN::Symmetry3D::get_symmetries(), EMAN::Dict::has_key(), EMAN::Aligner::params, and EMAN::Dict::set_default().