#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 530 of file aligner.h.
|
Implements EMAN::Aligner. Definition at line 535 of file aligner.h. References align(). 00536 { 00537 return align(this_img, to_img, "dot", Dict()); 00538 }
|
|
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 796 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. 00798 { 00799 Dict rot_params("rfp_mode",params.set_default("rfp_mode",0)); 00800 EMData *r1 = this_img->align("rotational", to, rot_params,cmp_name, cmp_params); 00801 00802 00803 EMData* flipped =to->process("xform.flip", Dict("axis", "x")); 00804 EMData *r2 = this_img->align("rotational", flipped,rot_params, cmp_name, cmp_params); 00805 Transform* t = r2->get_attr("xform.align2d"); 00806 t->set_mirror(true); 00807 r2->set_attr("xform.align2d",t); 00808 delete t; 00809 00810 float cmp1 = r1->cmp(cmp_name, to, cmp_params); 00811 float cmp2 = r2->cmp(cmp_name, flipped, cmp_params); 00812 00813 delete flipped; flipped = 0; 00814 00815 EMData *result = 0; 00816 00817 if (cmp1 < cmp2) { 00818 if( r2 ) 00819 { 00820 delete r2; 00821 r2 = 0; 00822 } 00823 result = r1; 00824 } 00825 else { 00826 if( r1 ) 00827 { 00828 delete r1; 00829 r1 = 0; 00830 } 00831 result = r2; 00832 result->process_inplace("xform.flip",Dict("axis","x")); 00833 } 00834 00835 return result; 00836 }
|
|
Implements EMAN::Aligner. Definition at line 544 of file aligner.h. 00545 { 00546 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"; 00547 }
|
|
Get the Aligner's name. Each Aligner is identified by a unique name.
Implements EMAN::Aligner. Definition at line 539 of file aligner.h. 00540 {
00541 return NAME;
00542 }
|
|
Implements EMAN::Aligner. Definition at line 554 of file aligner.h. 00555 { 00556 return static_get_param_types(); 00557 }
|
|
Definition at line 549 of file aligner.h. 00550 { 00551 return new RotateFlipAligner(); 00552 }
|
|
Definition at line 559 of file aligner.h. References EMAN::TypeDict::put(). 00559 { 00560 TypeDict d; 00561 00562 d.put("imask", EMObject::INT); 00563 d.put("rfp_mode", EMObject::INT,"Either 0,1 or 2. A temporary flag for testing the rotational foot print"); 00564 return d; 00565 }
|
|
Definition at line 66 of file aligner.cpp. |