#include <processor.h>
Inheritance diagram for EMAN::ApplySymProcessor:
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 EMData * | process (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 | |
static Processor * | NEW () |
Static Public Attributes | |
static const string | NAME = "xform.applysym" |
The model must be on aligned to its symmetry axis(via align3d or other mechanism)
sym | A string specifying the symmetry under which to do the alignment |
Definition at line 1578 of file processor.h.
virtual string EMAN::ApplySymProcessor::get_desc | ( | ) | const [inline, virtual] |
Get the descrition of this specific processor.
This function must be overwritten by a subclass.
Implements EMAN::Processor.
Definition at line 1602 of file processor.h.
virtual string EMAN::ApplySymProcessor::get_name | ( | ) | const [inline, virtual] |
Get the processor's name.
Each processor is identified by a unique name.
Implements EMAN::Processor.
Definition at line 1581 of file processor.h.
References NAME.
01582 { 01583 return NAME; 01584 }
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.
Reimplemented from EMAN::Processor.
Definition at line 1595 of file processor.h.
References EMAN::TypeDict::put(), and EMAN::EMObject::STRING.
01596 { 01597 TypeDict d; 01598 d.put("sym", EMObject::STRING, "The symmetry under which to do the alignment, Default=c1" ); 01599 return d; 01600 }
static Processor* EMAN::ApplySymProcessor::NEW | ( | ) | [inline, static] |
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.
image | The image will be copied, actual process happen on copy of image. |
Reimplemented from EMAN::Processor.
Definition at line 881 of file processor.cpp.
References EMAN::Averager::add_image(), EMAN::Averager::finish(), EMAN::Symmetry3D::get_syms(), EMAN::Processor::params, EMAN::EMData::process(), EMAN::Dict::set_default(), and t.
00882 { 00883 Symmetry3D* sym = Factory<Symmetry3D>::get((string)params.set_default("sym","c1")); 00884 vector<Transform> transforms = sym->get_syms(); 00885 00886 Averager* imgavg = Factory<Averager>::get((string)params.set_default("avger","mean")); 00887 for(vector<Transform>::const_iterator trans_it = transforms.begin(); trans_it != transforms.end(); trans_it++) { 00888 Transform t = *trans_it; 00889 EMData* transformed = image->process("xform",Dict("transform",&t)); 00890 imgavg->add_image(transformed); 00891 delete transformed; 00892 } 00893 return imgavg->finish(); 00894 }
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.
image | The image to be processed. |
Implements EMAN::Processor.
Definition at line 896 of file processor.cpp.
const string ApplySymProcessor::NAME = "xform.applysym" [static] |