#include <processor.h>
Inheritance diagram for EMAN::TomoTiltAngleWeightProcessor:
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 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 = "tomo.tiltangleweight" |
The relative width can be derived using elementary trigonometry to be 1/cos(tiltangle). This processor should hence probably be called OneOverCosineWeightingProcessor. You can specify the angle explicitly (which is the default behavior), or you can force the angle to be the altitude angle as derived from the EMData metadata. The processor could obviously be made more robust if the angle derived from the EMData header could be specified...
angle | The angle that the image is, with respect to the zero tilt image | |
angle_fim | Read fim as 'from image metadata' - this causes the altitude angle stored in by the image object (i.e. as extracted from the header, as currently stored in memory) to be used as the angle. This overrides the angle argument |
Definition at line 6708 of file processor.h.
|
Get the descrition of this specific processor. This function must be overwritten by a subclass.
Implements EMAN::Processor. Definition at line 6731 of file processor.h.
|
|
Get the processor's name. Each processor is identified by a unique name.
Implements EMAN::Processor. Definition at line 6713 of file processor.h. References NAME. 06714 { 06715 return NAME; 06716 }
|
|
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 6723 of file processor.h. References EMAN::EMObject::BOOL, EMAN::EMObject::INT, and EMAN::TypeDict::put(). 06724 { 06725 TypeDict d; 06726 d.put("angle", EMObject::INT, "The angle that the image is, with respect to the zero tilt image"); 06727 d.put("angle_fim",EMObject::BOOL,"Read fim as 'from image metadata' - this causes the altitude angle stored in by the image object (i.e. as extracted from the header, as currently stored in memory) to be used as the angle. This overrides the angle argument"); 06728 return d; 06729 }
|
|
Definition at line 6718 of file processor.h. 06719 { 06720 return new TomoTiltAngleWeightProcessor(); 06721 }
|
|
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.
Implements EMAN::Processor. Definition at line 9201 of file processor.cpp. References EMAN::EMData::get_attr(), EMAN::EMData::mult(), EMAN::Processor::params, and EMAN::Dict::set_default(). 09202 { 09203 bool fim = params.set_default("angle_fim", false); 09204 float alt; 09205 if ( fim ) { 09206 alt = image->get_attr("euler_alt"); 09207 } 09208 else alt = params.set_default("angle", 0.0f); 09209 09210 float cosine = cos(alt*M_PI/180.0f); 09211 float mult_fac = 1.0f/(cosine); 09212 image->mult( mult_fac ); 09213 }
|
|
Definition at line 6736 of file processor.h. Referenced by get_name(). |