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

EMAN::ApplySymProcessor Class Reference

Applies a symmetry to a 3D model. More...

#include <processor.h>

Inheritance diagram for EMAN::ApplySymProcessor:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual string get_name () const
 Get the processor's name.
virtual void process_inplace (EMData *image)
 To process an image in-place.
virtual EMDataprocess (const EMData *const image)
 To proccess an image out-of-place.
virtual TypeDict get_param_types () const
 Get processor parameter information in a dictionary.
virtual string get_desc () const
 Get the descrition of this specific processor.

Static Public Member Functions

ProcessorNEW ()

Static Public Attributes

const string NAME = "xform.applysym"

Detailed Description

Applies a symmetry to a 3D model.

The model must be on aligned to its symmetry axis(via align3d or other mechanism)

Author:
Steve Ludtke and John Flanagan
Date:
June 2011
Parameters:
sym A string specifying the symmetry under which to do the alignment

Definition at line 1524 of file processor.h.


Member Function Documentation

virtual string EMAN::ApplySymProcessor::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 1548 of file processor.h.

01549                         {
01550                                 return "Symmetry is applied to the 3D EM object";
01551                         }

virtual string EMAN::ApplySymProcessor::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 1527 of file processor.h.

01528                         {
01529                                 return NAME;
01530                         }

virtual TypeDict EMAN::ApplySymProcessor::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 1541 of file processor.h.

References EMAN::TypeDict::put().

01542                         {
01543                                 TypeDict d;
01544                                 d.put("sym", EMObject::STRING, "The symmetry under which to do the alignment, Default=c1" );
01545                                 return d;
01546                         }

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

Definition at line 1532 of file processor.h.

01533                         {
01534                                 return new ApplySymProcessor();
01535                         }

EMData * ApplySymProcessor::process const EMData *const   image  )  [virtual]
 

To proccess an image out-of-place.

For those processors which can only be processed out-of-place, override this function to give the right behavior.

Parameters:
image The image will be copied, actual process happen on copy of image.
Returns:
the image processing result, may or may not be the same size of the input image

Reimplemented from EMAN::Processor.

Definition at line 886 of file processor.cpp.

References EMAN::Averager::add_image(), EMAN::Averager::finish(), EMAN::Factory< T >::get(), EMAN::FactoryBase::get_params(), EMAN::Symmetry3D::get_syms(), EMAN::EMData::process(), EMAN::Dict::set_default(), and t.

00887 {
00888         Symmetry3D* sym = Factory<Symmetry3D>::get((string)params.set_default("sym","c1"));
00889         vector<Transform> transforms = sym->get_syms();
00890         //vector<Transform> transforms = sym->gen_orientations((string)params.set_default("orientgen","eman"),d);
00891         
00892         Averager* imgavg = Factory<Averager>::get((string)params.set_default("avger","mean"));
00893         for(vector<Transform>::const_iterator trans_it = transforms.begin(); trans_it != transforms.end(); trans_it++) {
00894                 Dict tparams = trans_it->get_params("eman");
00895                 Transform t(tparams);
00896                 EMData* transformed = image->process("xform",Dict("transform",&t));
00897                 imgavg->add_image(transformed);
00898                 delete transformed;
00899         }
00900         return imgavg->finish();
00901 }

void ApplySymProcessor::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 903 of file processor.cpp.

00904 {
00905         cout << "Not implemented yet" << endl;
00906 }


Member Data Documentation

const string ApplySymProcessor::NAME = "xform.applysym" [static]
 

Definition at line 94 of file processor.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Jul 12 13:50:55 2011 for EMAN2 by  doxygen 1.3.9.1