#include <aligner.h>
Inheritance diagram for EMAN::RotateFlipAlignerIterative:
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.iterative" |
r1 | inner ring | |
r2 | outer ring |
Definition at line 576 of file aligner.h.
|
Implements EMAN::Aligner. Definition at line 581 of file aligner.h. References align(). 00582 { 00583 return align(this_img, to_img, "dot", Dict()); 00584 }
|
|
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 837 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. 00839 { 00840 Dict rot_params("r1",params.set_default("r1",-1),"r2",params.set_default("r2",-1)); 00841 EMData *r1 = this_img->align("rotational.iterative", to, rot_params,cmp_name, cmp_params); 00842 00843 EMData* flipped =to->process("xform.flip", Dict("axis", "x")); 00844 EMData *r2 = this_img->align("rotational.iterative", flipped,rot_params, cmp_name, cmp_params); 00845 Transform* t = r2->get_attr("xform.align2d"); 00846 t->set_mirror(true); 00847 r2->set_attr("xform.align2d",t); 00848 delete t; 00849 00850 float cmp1 = r1->cmp(cmp_name, to, cmp_params); 00851 float cmp2 = r2->cmp(cmp_name, flipped, cmp_params); 00852 00853 delete flipped; flipped = 0; 00854 00855 EMData *result = 0; 00856 00857 if (cmp1 < cmp2) { 00858 if( r2 ) 00859 { 00860 delete r2; 00861 r2 = 0; 00862 } 00863 result = r1; 00864 } 00865 else { 00866 if( r1 ) 00867 { 00868 delete r1; 00869 r1 = 0; 00870 } 00871 result = r2; 00872 result->process_inplace("xform.flip",Dict("axis","x")); 00873 } 00874 00875 return result; 00876 }
|
|
Implements EMAN::Aligner. Definition at line 590 of file aligner.h. 00591 { 00592 return "Performs two rotational alignments, iterative style, one using the original image and one using the hand-flipped image. Decides which alignment is better using a comparitor and returns it"; 00593 }
|
|
Get the Aligner's name. Each Aligner is identified by a unique name.
Implements EMAN::Aligner. Definition at line 585 of file aligner.h. 00586 {
00587 return NAME;
00588 }
|
|
Implements EMAN::Aligner. Definition at line 600 of file aligner.h. 00601 { 00602 return static_get_param_types(); 00603 }
|
|
Definition at line 595 of file aligner.h. 00596 { 00597 return new RotateFlipAlignerIterative(); 00598 }
|
|
Definition at line 605 of file aligner.h. References EMAN::TypeDict::put(). 00605 { 00606 TypeDict d; 00607 d.put("r1", EMObject::INT, "Inner ring, pixels"); 00608 d.put("r2", EMObject::INT, "Outer ring, pixels"); 00609 return d; 00610 }
|
|
Definition at line 67 of file aligner.cpp. |