Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

EMAN::ACFCenterProcessor Class Reference
[unit test in Python]

Center image using auto convolution with 180 degree rotation. More...

#include <processor.h>

Inheritance diagram for EMAN::ACFCenterProcessor:

Inheritance graph
[legend]
Collaboration diagram for EMAN::ACFCenterProcessor:

Collaboration graph
[legend]
List of all members.

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

ProcessorNEW ()

Static Public Attributes

const string NAME = "xform.centeracf"

Detailed Description

Center image using auto convolution with 180 degree rotation.

Definition at line 5085 of file processor.h.


Member Function Documentation

virtual string EMAN::ACFCenterProcessor::get_desc  )  const [inline, virtual]
 

Get the descrition of this specific processor.

This function must be overwritten by a subclass.

Returns:
The description of this processor.

Implements EMAN::Processor.

Definition at line 5100 of file processor.h.

05101                 {
05102                         return "Center image using self-convolution.";
05103                 }

virtual string EMAN::ACFCenterProcessor::get_name  )  const [inline, virtual]
 

Get the processor's name.

Each processor is identified by a unique name.

Returns:
The processor's name.

Implements EMAN::Processor.

Definition at line 5090 of file processor.h.

05091                 {
05092                         return NAME;
05093                 }

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.

Returns:
A dictionary containing the parameter info.

Reimplemented from EMAN::Processor.

Definition at line 5105 of file processor.h.

05106                 {
05107                         TypeDict d;
05108                         return d;
05109                 }

Processor* EMAN::ACFCenterProcessor::NEW  )  [inline, static]
 

Definition at line 5095 of file processor.h.

05096                 {
05097                         return new ACFCenterProcessor();
05098                 }

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.

Parameters:
image The image to be processed.

Implements EMAN::Processor.

Definition at line 5642 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().

05643 {
05644         if (!image) {
05645                 LOGWARN("NULL Image");
05646                 return;
05647         }
05648 
05649         Dict params1;
05650         params1["intonly"] = 1;
05651         params1["maxshift"] = image->get_xsize() / 4;
05652         EMData* aligned = image->align("translational", 0, params1);
05653         if ( image->get_ndim() == 3 ) {
05654                 Transform* t = aligned->get_attr("xform.align3d");
05655                 image->translate(t->get_trans());
05656                 image->set_attr("xform.align3d",t);
05657                 delete t;
05658         }
05659         else {
05660                 // assumption is the image is 2D which may be  false
05661                 Transform* t = aligned->get_attr("xform.align2d");
05662                 image->translate(t->get_trans());
05663                 image->set_attr("xform.align2d",t);
05664                 delete t;
05665         }
05666 
05667         delete aligned;
05668 
05669 }


Member Data Documentation

const string ACFCenterProcessor::NAME = "xform.centeracf" [static]
 

Definition at line 172 of file processor.cpp.


The documentation for this class was generated from the following files:
Generated on Mon May 2 13:30:39 2011 for EMAN2 by  doxygen 1.3.9.1