#include <aligner.h>
Inheritance diagram for EMAN::RotateFlipAligner:
Public Member Functions | |
virtual EMData * | align (EMData *this_img, EMData *to_img, const string &cmp_name="dot", const Dict &cmp_params=Dict()) const |
To align 'this_img' with another image passed in through its parameters. | |
virtual EMData * | align (EMData *this_img, EMData *to_img) const |
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 () |
TypeDict | static_get_param_types () |
Static Public Attributes | |
const string | NAME = "rotate_flip" |
imask | ||
rfp_mode | Either 0,1 or 2. A temporary flag for testing the rotational foot print |
Definition at line 476 of file aligner.h.
|
Implements EMAN::Aligner. Definition at line 481 of file aligner.h. References align(). 00482 { 00483 return align(this_img, to_img, "dot", Dict()); 00484 }
|
|
To align 'this_img' with another image passed in through its parameters. The alignment uses a user-given comparison method to compare the two images. If none is given, a default one is used.
Implements EMAN::Aligner. Definition at line 612 of file aligner.cpp. References EMAN::EMData::align(), EMAN::EMData::cmp(), EMAN::EMData::get_attr(), EMAN::EMData::process(), EMAN::EMData::process_inplace(), EMAN::EMData::set_attr(), EMAN::Dict::set_default(), EMAN::Transform::set_mirror(), and t. 00614 { 00615 Dict rot_params("rfp_mode",params.set_default("rfp_mode",0)); 00616 EMData *r1 = this_img->align("rotational", to, rot_params,cmp_name, cmp_params); 00617 00618 00619 EMData* flipped =to->process("xform.flip", Dict("axis", "x")); 00620 EMData *r2 = this_img->align("rotational", flipped,rot_params, cmp_name, cmp_params); 00621 Transform* t = r2->get_attr("xform.align2d"); 00622 t->set_mirror(true); 00623 r2->set_attr("xform.align2d",t); 00624 delete t; 00625 00626 float cmp1 = r1->cmp(cmp_name, to, cmp_params); 00627 float cmp2 = r2->cmp(cmp_name, flipped, cmp_params); 00628 00629 delete flipped; flipped = 0; 00630 00631 EMData *result = 0; 00632 00633 if (cmp1 < cmp2) { 00634 if( r2 ) 00635 { 00636 delete r2; 00637 r2 = 0; 00638 } 00639 result = r1; 00640 } 00641 else { 00642 if( r1 ) 00643 { 00644 delete r1; 00645 r1 = 0; 00646 } 00647 result = r2; 00648 result->process_inplace("xform.flip",Dict("axis","x")); 00649 } 00650 00651 return result; 00652 }
|
|
Implements EMAN::Aligner. Definition at line 490 of file aligner.h. 00491 { 00492 return "Performs two rotational alignments, one using the original image and one using the hand-flipped image. Decides which alignment is better using a comparitor and returns it"; 00493 }
|
|
Get the Aligner's name. Each Aligner is identified by a unique name.
Implements EMAN::Aligner. Definition at line 485 of file aligner.h. 00486 {
00487 return NAME;
00488 }
|
|
Implements EMAN::Aligner. Definition at line 500 of file aligner.h. 00501 { 00502 return static_get_param_types(); 00503 }
|
|
Definition at line 495 of file aligner.h. 00496 { 00497 return new RotateFlipAligner(); 00498 }
|
|
Definition at line 505 of file aligner.h. References EMAN::TypeDict::put(). 00505 { 00506 TypeDict d; 00507 00508 d.put("imask", EMObject::INT); 00509 d.put("rfp_mode", EMObject::INT,"Either 0,1 or 2. A temporary flag for testing the rotational foot print"); 00510 return d; 00511 }
|
|
Definition at line 60 of file aligner.cpp. |