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

EMAN::TomoTiltAngleWeightProcessor Class Reference

A processor that can be used to weight an image by 1/cos(angle) This processor evolved originally as an experimental tool for weighting tomographic data by the width of its cross section relative to the electron beam. More...

#include <processor.h>

Inheritance diagram for EMAN::TomoTiltAngleWeightProcessor:

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

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

Static Public Attributes

static const string NAME = "tomo.tiltangleweight"

Detailed Description

A processor that can be used to weight an image by 1/cos(angle) This processor evolved originally as an experimental tool for weighting tomographic data by the width of its cross section relative to the electron beam.

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...

Author:
David Woolford <woolford@bcm.edu>
Date:
02/11/2008
Parameters:
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 6748 of file processor.h.


Member Function Documentation

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

06772                         {
06773                                 return "Weights the image by 1/cos(angle)";
06774                         }

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

References NAME.

06754                         {
06755                                 return NAME;
06756                         }

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

References EMAN::EMObject::BOOL, EMAN::EMObject::INT, and EMAN::TypeDict::put().

06764                         {
06765                                 TypeDict d;
06766                                 d.put("angle", EMObject::INT, "The angle that the image is, with respect to the zero tilt image");
06767                                 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");
06768                                 return d;
06769                         }

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

Definition at line 6758 of file processor.h.

06759                         {
06760                                 return new TomoTiltAngleWeightProcessor();
06761                         }

void TomoTiltAngleWeightProcessor::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 9308 of file processor.cpp.

References EMAN::EMData::get_attr(), EMAN::EMData::mult(), EMAN::Processor::params, and EMAN::Dict::set_default().

09309 {
09310         bool fim = params.set_default("angle_fim", false);
09311         float alt;
09312         if ( fim ) {
09313                 alt = image->get_attr("euler_alt");
09314         }
09315         else alt = params.set_default("angle", 0.0f);
09316 
09317         float cosine = cos(alt*M_PI/180.0f);
09318         float mult_fac =  1.0f/(cosine);
09319         image->mult( mult_fac );
09320 }


Member Data Documentation

const string TomoTiltAngleWeightProcessor::NAME = "tomo.tiltangleweight" [static]
 

Definition at line 6776 of file processor.h.

Referenced by get_name().


The documentation for this class was generated from the following files:
Generated on Mon Jul 19 13:07:29 2010 for EMAN2 by  doxygen 1.4.4