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

EMAN::NormalizeUnitProcessor Class Reference

Normalize an image so its vector length is 1.0. More...

#include <processor.h>

Inheritance diagram for EMAN::NormalizeUnitProcessor:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

string get_name () const
 Get the processor's name.
string get_desc () const
 Get the descrition of this specific processor.

Static Public Member Functions

ProcessorNEW ()

Static Public Attributes

const string NAME = "normalize.unitlen"

Protected Member Functions

float calc_sigma (EMData *image) const
float calc_mean (EMData *image) const

Detailed Description

Normalize an image so its vector length is 1.0.

Definition at line 3868 of file processor.h.


Member Function Documentation

float EMAN::NormalizeUnitProcessor::calc_mean EMData image  )  const [inline, protected, virtual]
 

Implements EMAN::NormalizeProcessor.

Definition at line 3893 of file processor.h.

03893 { return 0; }

float NormalizeUnitProcessor::calc_sigma EMData image  )  const [protected, virtual]
 

Reimplemented from EMAN::NormalizeProcessor.

Definition at line 3371 of file processor.cpp.

References EMAN::EMData::get_attr(), LOGWARN, and sqrt().

03372 {
03373         if (!image) {
03374                 LOGWARN("NULL Image");
03375                 return 0;
03376         }
03377         float ret=sqrt((float)image->get_attr("square_sum"));
03378         return ret==0.0f?1.0f:ret;
03379 }

string EMAN::NormalizeUnitProcessor::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 3881 of file processor.h.

03882                 {
03883                         return "Normalize an image so its vector length is 1.0.";
03884                 }

string EMAN::NormalizeUnitProcessor::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 3871 of file processor.h.

03872                 {
03873                         return NAME;
03874                 }

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

Definition at line 3876 of file processor.h.

03877                 {
03878                         return new NormalizeUnitProcessor();
03879                 }


Member Data Documentation

const string NormalizeUnitProcessor::NAME = "normalize.unitlen" [static]
 

Definition at line 137 of file processor.cpp.


The documentation for this class was generated from the following files:
Generated on Thu Dec 9 13:48:03 2010 for EMAN2 by  doxygen 1.3.9.1