#include <processor.h>
Inheritance diagram for EMAN::ACFCenterProcessor:
Public Member Functions | |
virtual void | process_inplace (EMData *image) |
To process an image in-place. | |
virtual string | get_name () const |
Get the processor's name. | |
virtual string | get_desc () const |
Get the descrition of this specific processor. | |
virtual TypeDict | get_param_types () const |
Get processor parameter information in a dictionary. | |
Static Public Member Functions | |
Processor * | NEW () |
Static Public Attributes | |
const string | NAME = "xform.centeracf" |
Definition at line 5154 of file processor.h.
|
Get the descrition of this specific processor. This function must be overwritten by a subclass.
Implements EMAN::Processor. Definition at line 5169 of file processor.h. 05170 { 05171 return "Center image using self-convolution."; 05172 }
|
|
Get the processor's name. Each processor is identified by a unique name.
Implements EMAN::Processor. Definition at line 5159 of file processor.h. 05160 {
05161 return NAME;
05162 }
|
|
Get processor parameter information in a dictionary. Each parameter has one record in the dictionary. Each record contains its name, data-type, and description.
Reimplemented from EMAN::Processor. Definition at line 5174 of file processor.h. 05175 { 05176 TypeDict d; 05177 return d; 05178 }
|
|
Definition at line 5164 of file processor.h. 05165 { 05166 return new ACFCenterProcessor(); 05167 }
|
|
To process an image in-place. For those processors which can only be processed out-of-place, override this function to just print out some error message to remind user call the out-of-place version.
Implements EMAN::Processor. Definition at line 5756 of file processor.cpp. References EMAN::EMData::align(), EMAN::EMData::get_attr(), EMAN::EMData::get_ndim(), EMAN::Transform::get_trans(), EMAN::EMData::get_xsize(), LOGWARN, EMAN::EMData::set_attr(), t, and EMAN::EMData::translate(). 05757 { 05758 if (!image) { 05759 LOGWARN("NULL Image"); 05760 return; 05761 } 05762 05763 Dict params1; 05764 params1["intonly"] = 1; 05765 params1["maxshift"] = image->get_xsize() / 4; 05766 EMData* aligned = image->align("translational", 0, params1); 05767 if ( image->get_ndim() == 3 ) { 05768 Transform* t = aligned->get_attr("xform.align3d"); 05769 image->translate(t->get_trans()); 05770 image->set_attr("xform.align3d",t); 05771 delete t; 05772 } 05773 else { 05774 // assumption is the image is 2D which may be false 05775 Transform* t = aligned->get_attr("xform.align2d"); 05776 image->translate(t->get_trans()); 05777 image->set_attr("xform.align2d",t); 05778 delete t; 05779 } 05780 05781 delete aligned; 05782 05783 }
|
|
Definition at line 173 of file processor.cpp. |