#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 716 of file aligner.h.
|
Implements EMAN::Aligner. Definition at line 721 of file aligner.h. References align(). 00722 { 00723 return align(this_img, to_img, "dot", Dict()); 00724 }
|
|
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 995 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. 00997 { 00998 Dict rot_params("rfp_mode",params.set_default("rfp_mode",0)); 00999 EMData *r1 = this_img->align("rotational", to, rot_params,cmp_name, cmp_params); 01000 01001 01002 EMData* flipped =to->process("xform.flip", Dict("axis", "x")); 01003 EMData *r2 = this_img->align("rotational", flipped,rot_params, cmp_name, cmp_params); 01004 Transform* t = r2->get_attr("xform.align2d"); 01005 t->set_mirror(true); 01006 r2->set_attr("xform.align2d",t); 01007 delete t; 01008 01009 float cmp1 = r1->cmp(cmp_name, to, cmp_params); 01010 float cmp2 = r2->cmp(cmp_name, flipped, cmp_params); 01011 01012 delete flipped; flipped = 0; 01013 01014 EMData *result = 0; 01015 01016 if (cmp1 < cmp2) { 01017 if( r2 ) 01018 { 01019 delete r2; 01020 r2 = 0; 01021 } 01022 result = r1; 01023 } 01024 else { 01025 if( r1 ) 01026 { 01027 delete r1; 01028 r1 = 0; 01029 } 01030 result = r2; 01031 result->process_inplace("xform.flip",Dict("axis","x")); 01032 } 01033 01034 return result; 01035 }
|
|
Implements EMAN::Aligner. Definition at line 730 of file aligner.h. 00731 { 00732 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"; 00733 }
|
|
Get the Aligner's name. Each Aligner is identified by a unique name.
Implements EMAN::Aligner. Definition at line 725 of file aligner.h. 00726 {
00727 return NAME;
00728 }
|
|
Implements EMAN::Aligner. Definition at line 740 of file aligner.h. 00741 { 00742 return static_get_param_types(); 00743 }
|
|
Definition at line 735 of file aligner.h. 00736 { 00737 return new RotateFlipAligner(); 00738 }
|
|
Definition at line 745 of file aligner.h. References EMAN::TypeDict::put(). 00745 { 00746 TypeDict d; 00747 00748 d.put("imask", EMObject::INT); 00749 d.put("rfp_mode", EMObject::INT,"Either 0,1 or 2. A temporary flag for testing the rotational foot print"); 00750 return d; 00751 }
|
|
Definition at line 69 of file aligner.cpp. |