#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 762 of file aligner.h.
|
Implements EMAN::Aligner. Definition at line 767 of file aligner.h. References align(). 00768 { 00769 return align(this_img, to_img, "dot", Dict()); 00770 }
|
|
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 1042 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. 01044 { 01045 Dict rot_params("r1",params.set_default("r1",-1),"r2",params.set_default("r2",-1)); 01046 EMData * r1 = this_img->align("rotational_iterative", to, rot_params,cmp_name, cmp_params); 01047 01048 EMData * flipped =to->process("xform.flip", Dict("axis", "x")); 01049 EMData * r2 = this_img->align("rotational_iterative", flipped,rot_params, cmp_name, cmp_params); 01050 Transform* t = r2->get_attr("xform.align2d"); 01051 t->set_mirror(true); 01052 r2->set_attr("xform.align2d",t); 01053 delete t; 01054 01055 float cmp1 = r1->cmp(cmp_name, to, cmp_params); 01056 float cmp2 = r2->cmp(cmp_name, flipped, cmp_params); 01057 01058 delete flipped; flipped = 0; 01059 01060 EMData *result = 0; 01061 01062 if (cmp1 < cmp2) { 01063 if( r2 ) 01064 { 01065 delete r2; 01066 r2 = 0; 01067 } 01068 result = r1; 01069 } 01070 else { 01071 if( r1 ) 01072 { 01073 delete r1; 01074 r1 = 0; 01075 } 01076 result = r2; 01077 result->process_inplace("xform.flip",Dict("axis","x")); 01078 } 01079 01080 return result; 01081 }
|
|
Implements EMAN::Aligner. Definition at line 776 of file aligner.h. 00777 { 00778 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"; 00779 }
|
|
Get the Aligner's name. Each Aligner is identified by a unique name.
Implements EMAN::Aligner. Definition at line 771 of file aligner.h. 00772 {
00773 return NAME;
00774 }
|
|
Implements EMAN::Aligner. Definition at line 786 of file aligner.h. 00787 { 00788 return static_get_param_types(); 00789 }
|
|
Definition at line 781 of file aligner.h. 00782 { 00783 return new RotateFlipAlignerIterative(); 00784 }
|
|
Definition at line 791 of file aligner.h. References EMAN::TypeDict::put(). 00791 { 00792 TypeDict d; 00793 d.put("r1", EMObject::INT, "Inner ring, pixels"); 00794 d.put("r2", EMObject::INT, "Outer ring, pixels"); 00795 return d; 00796 }
|
|
Definition at line 70 of file aligner.cpp. |