EMAN2
Public Member Functions | Static Public Member Functions | Static Public Attributes
EMAN::ACFCenterProcessor Class Reference

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

Static Public Attributes

static const string NAME = "xform.centeracf"

Detailed Description

Center image using auto convolution with 180 degree rotation.

Definition at line 5530 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 5545 of file processor.h.

                {
                        return "Center image using self-convolution.";
                }
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 5535 of file processor.h.

References NAME.

                {
                        return NAME;
                }
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 5550 of file processor.h.

                {
                        TypeDict d;
                        return d;
                }
static Processor* EMAN::ACFCenterProcessor::NEW ( ) [inline, static]

Definition at line 5540 of file processor.h.

                {
                        return new ACFCenterProcessor();
                }
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:
imageThe image to be processed.

Implements EMAN::Processor.

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

{
        if (!image) {
                LOGWARN("NULL Image");
                return;
        }

        Dict params1;
        params1["intonly"] = 1;
        params1["maxshift"] = image->get_xsize() / 4;
        EMData* aligned = image->align("translational", 0, params1);
        if ( image->get_ndim() == 3 ) {
                Transform* t = aligned->get_attr("xform.align3d");
                image->translate(t->get_trans());
                image->set_attr("xform.align3d",t);
                delete t;
        }
        else {
                // assumption is the image is 2D which may be  false
                Transform* t = aligned->get_attr("xform.align2d");
                image->translate(t->get_trans());
                image->set_attr("xform.align2d",t);
                delete t;
        }

        delete aligned;

}

Member Data Documentation

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

Definition at line 5556 of file processor.h.

Referenced by get_name().


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