EMAN2
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
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]

Public Member Functions

virtual void process_inplace (EMData *image)
 To process an image in-place. More...
 
virtual string get_name () const
 Get the processor's name. More...
 
virtual string get_desc () const
 Get the descrition of this specific processor. More...
 
virtual TypeDict get_param_types () const
 Get processor parameter information in a dictionary. More...
 
- Public Member Functions inherited from EMAN::Processor
virtual ~Processor ()
 
virtual EMDataprocess (const EMData *const image)
 To proccess an image out-of-place. More...
 
virtual void process_list_inplace (vector< EMData * > &images)
 To process multiple images using the same algorithm. More...
 
virtual Dict get_params () const
 Get the processor parameters in a key/value dictionary. More...
 
virtual void set_params (const Dict &new_params)
 Set the processor parameters using a key/value dictionary. More...
 

Static Public Member Functions

static ProcessorNEW ()
 
- Static Public Member Functions inherited from EMAN::Processor
static string get_group_desc ()
 Get the description of this group of processors. More...
 
static void EMFourierFilterInPlace (EMData *fimage, Dict params)
 Compute a Fourier-filter processed image in place. More...
 
static EMDataEMFourierFilter (EMData *fimage, Dict params)
 Compute a Fourier-processor processed image without altering the original image. More...
 

Static Public Attributes

static const string NAME = "xform.centeracf"
 

Additional Inherited Members

- Public Types inherited from EMAN::Processor
enum  fourier_filter_types {
  TOP_HAT_LOW_PASS , TOP_HAT_HIGH_PASS , TOP_HAT_BAND_PASS , TOP_HOMOMORPHIC ,
  GAUSS_LOW_PASS , GAUSS_HIGH_PASS , GAUSS_BAND_PASS , GAUSS_INVERSE ,
  GAUSS_HOMOMORPHIC , BUTTERWORTH_LOW_PASS , BUTTERWORTH_HIGH_PASS , BUTTERWORTH_HOMOMORPHIC ,
  KAISER_I0 , KAISER_SINH , KAISER_I0_INVERSE , KAISER_SINH_INVERSE ,
  SHIFT , TANH_LOW_PASS , TANH_HIGH_PASS , TANH_HOMOMORPHIC ,
  TANH_BAND_PASS , RADIAL_TABLE , CTF_
}
 Fourier filter Processor type enum. More...
 
- Protected Attributes inherited from EMAN::Processor
Dict params
 

Detailed Description

Center image using auto convolution with 180 degree rotation.

Definition at line 7162 of file processor.h.

Member Function Documentation

◆ get_desc()

virtual string EMAN::ACFCenterProcessor::get_desc ( ) const
inlinevirtual

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

7178 {
7179 return "Center image using self-convolution.";
7180 }

◆ get_name()

virtual string EMAN::ACFCenterProcessor::get_name ( ) const
inlinevirtual

Get the processor's name.

Each processor is identified by a unique name.

Returns
The processor's name.

Implements EMAN::Processor.

Definition at line 7167 of file processor.h.

7168 {
7169 return NAME;
7170 }
static const string NAME
Definition: processor.h:7188

References NAME.

◆ get_param_types()

virtual TypeDict EMAN::ACFCenterProcessor::get_param_types ( ) const
inlinevirtual

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

7183 {
7184 TypeDict d;
7185 return d;
7186 }
TypeDict is a dictionary to store <string, EMObject::ObjectType> pair.
Definition: emobject.h:305

◆ NEW()

static Processor * EMAN::ACFCenterProcessor::NEW ( )
inlinestatic

Definition at line 7172 of file processor.h.

7173 {
7174 return new ACFCenterProcessor();
7175 }
Center image using auto convolution with 180 degree rotation.
Definition: processor.h:7163

◆ process_inplace()

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 7535 of file processor.cpp.

7536{
7537 if (!image) {
7538 LOGWARN("NULL Image");
7539 return;
7540 }
7541
7542 Dict params1;
7543 params1["intonly"] = 1;
7544 params1["maxshift"] = image->get_xsize() / 4;
7545 EMData* aligned = image->align("translational", 0, params1);
7546 if ( image->get_ndim() == 3 ) {
7547 Transform* t = aligned->get_attr("xform.align3d");
7548 image->translate(t->get_trans());
7549 image->set_attr("xform.align3d",t);
7550 delete t;
7551 }
7552 else {
7553 // assumption is the image is 2D which may be false
7554 Transform* t = aligned->get_attr("xform.align2d");
7555 image->translate(t->get_trans());
7556 image->set_attr("xform.align2d",t);
7557 delete t;
7558 }
7559
7560 delete aligned;
7561
7562}
Dict is a dictionary to store <string, EMObject> pair.
Definition: emobject.h:385
EMData stores an image's data and defines core image processing routines.
Definition: emdata.h:82
void translate(float dx, float dy, float dz)
Translate this image.
Definition: emdata.cpp:904
A Transform object is a somewhat specialized object designed specifically for EMAN2/Sparx storage of ...
Definition: transform.h:75
Vec3f get_trans() const
Get the post trans as a vec3f.
Definition: transform.cpp:1046
#define LOGWARN
Definition: log.h:53

References EMAN::Transform::get_trans(), LOGWARN, and EMAN::EMData::translate().

Member Data Documentation

◆ NAME

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

Definition at line 7188 of file processor.h.

Referenced by get_name().


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