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

static ProcessorNEW ()


Detailed Description

Center image using auto convolution with 180 degree rotation.

Definition at line 4799 of file processor.h.


Member Function Documentation

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 5231 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().

05232 {
05233         if (!image) {
05234                 LOGWARN("NULL Image");
05235                 return;
05236         }
05237 
05238         Dict params1;
05239         params1["intonly"] = 1;
05240         params1["maxshift"] = image->get_xsize() / 4;
05241         EMData* aligned = image->align("translational", 0, params1);
05242         if ( image->get_ndim() == 3 ) {
05243                 Transform* t = aligned->get_attr("xform.align3d");
05244                 image->translate(t->get_trans());
05245                 image->set_attr("xform.align3d",t);
05246                 delete t;
05247         }
05248         else {
05249                 // assumption is the image is 2D which may be  false
05250                 Transform* t = aligned->get_attr("xform.align2d");
05251                 image->translate(t->get_trans());
05252                 image->set_attr("xform.align2d",t);
05253                 delete t;
05254         }
05255 
05256         delete aligned;
05257 
05258 }

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 4804 of file processor.h.

04805                 {
04806                         return "xform.centeracf";
04807                 }

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

Definition at line 4809 of file processor.h.

04810                 {
04811                         return new ACFCenterProcessor();
04812                 }

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 4814 of file processor.h.

04815                 {
04816                         return "Center image using self-convolution.";
04817                 }

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 4819 of file processor.h.

04820                 {
04821                         TypeDict d;
04822                         return d;
04823                 }


The documentation for this class was generated from the following files:

Generated on Sat Nov 21 02:20:35 2009 for EMAN2 by  doxygen 1.5.6