#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 | |
static Processor * | NEW () |
Static Public Attributes | |
static const string | NAME = "xform.centeracf" |
Definition at line 5029 of file processor.h.
virtual string EMAN::ACFCenterProcessor::get_desc | ( | ) | const [inline, virtual] |
Get the descrition of this specific processor.
This function must be overwritten by a subclass.
Implements EMAN::Processor.
Definition at line 5044 of file processor.h.
virtual string EMAN::ACFCenterProcessor::get_name | ( | ) | const [inline, virtual] |
Get the processor's name.
Each processor is identified by a unique name.
Implements EMAN::Processor.
Definition at line 5034 of file processor.h.
References NAME.
05035 { 05036 return NAME; 05037 }
virtual TypeDict EMAN::ACFCenterProcessor::get_param_types | ( | ) | const [inline, virtual] |
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 5049 of file processor.h.
05050 { 05051 TypeDict d; 05052 return d; 05053 }
static Processor* EMAN::ACFCenterProcessor::NEW | ( | ) | [inline, static] |
void ACFCenterProcessor::process_inplace | ( | EMData * | image | ) | [virtual] |
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.
image | The image to be processed. |
Implements EMAN::Processor.
Definition at line 5640 of file processor.cpp.
References EMAN::EMData::align(), EMAN::EMData::get_attr(), EMAN::EMData::get_ndim(), EMAN::EMData::get_xsize(), LOGWARN, EMAN::EMData::set_attr(), t, and EMAN::EMData::translate().
05641 { 05642 if (!image) { 05643 LOGWARN("NULL Image"); 05644 return; 05645 } 05646 05647 Dict params1; 05648 params1["intonly"] = 1; 05649 params1["maxshift"] = image->get_xsize() / 4; 05650 EMData* aligned = image->align("translational", 0, params1); 05651 if ( image->get_ndim() == 3 ) { 05652 Transform* t = aligned->get_attr("xform.align3d"); 05653 image->translate(t->get_trans()); 05654 image->set_attr("xform.align3d",t); 05655 delete t; 05656 } 05657 else { 05658 // assumption is the image is 2D which may be false 05659 Transform* t = aligned->get_attr("xform.align2d"); 05660 image->translate(t->get_trans()); 05661 image->set_attr("xform.align2d",t); 05662 delete t; 05663 } 05664 05665 delete aligned; 05666 05667 }
const string ACFCenterProcessor::NAME = "xform.centeracf" [static] |