#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 5123 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 5138 of file processor.h. 05139 {
05140 return "Center image using self-convolution.";
05141 }
|
|
|
Get the processor's name. Each processor is identified by a unique name.
Implements EMAN::Processor. Definition at line 5128 of file processor.h. 05129 {
05130 return NAME;
05131 }
|
|
|
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 5143 of file processor.h. 05144 {
05145 TypeDict d;
05146 return d;
05147 }
|
|
|
Definition at line 5133 of file processor.h. 05134 {
05135 return new ACFCenterProcessor();
05136 }
|
|
|
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 5670 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(). 05671 {
05672 if (!image) {
05673 LOGWARN("NULL Image");
05674 return;
05675 }
05676
05677 Dict params1;
05678 params1["intonly"] = 1;
05679 params1["maxshift"] = image->get_xsize() / 4;
05680 EMData* aligned = image->align("translational", 0, params1);
05681 if ( image->get_ndim() == 3 ) {
05682 Transform* t = aligned->get_attr("xform.align3d");
05683 image->translate(t->get_trans());
05684 image->set_attr("xform.align3d",t);
05685 delete t;
05686 }
05687 else {
05688 // assumption is the image is 2D which may be false
05689 Transform* t = aligned->get_attr("xform.align2d");
05690 image->translate(t->get_trans());
05691 image->set_attr("xform.align2d",t);
05692 delete t;
05693 }
05694
05695 delete aligned;
05696
05697 }
|
|
|
Definition at line 178 of file processor.cpp. |
1.3.9.1