#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 4944 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 4959 of file processor.h. 04960 { 04961 return "Center image using self-convolution."; 04962 }
|
|
Get the processor's name. Each processor is identified by a unique name.
Implements EMAN::Processor. Definition at line 4949 of file processor.h. 04950 {
04951 return NAME;
04952 }
|
|
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 4964 of file processor.h. 04965 { 04966 TypeDict d; 04967 return d; 04968 }
|
|
Definition at line 4954 of file processor.h. 04955 { 04956 return new ACFCenterProcessor(); 04957 }
|
|
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 5576 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(). 05577 { 05578 if (!image) { 05579 LOGWARN("NULL Image"); 05580 return; 05581 } 05582 05583 Dict params1; 05584 params1["intonly"] = 1; 05585 params1["maxshift"] = image->get_xsize() / 4; 05586 EMData* aligned = image->align("translational", 0, params1); 05587 if ( image->get_ndim() == 3 ) { 05588 Transform* t = aligned->get_attr("xform.align3d"); 05589 image->translate(t->get_trans()); 05590 image->set_attr("xform.align3d",t); 05591 delete t; 05592 } 05593 else { 05594 // assumption is the image is 2D which may be false 05595 Transform* t = aligned->get_attr("xform.align2d"); 05596 image->translate(t->get_trans()); 05597 image->set_attr("xform.align2d",t); 05598 delete t; 05599 } 05600 05601 delete aligned; 05602 05603 }
|
|
Definition at line 167 of file processor.cpp. |