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

static ProcessorNEW ()

Static Public Attributes

static 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 4125 of file processor.h.


Member Function Documentation

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

Implements EMAN::NormalizeProcessor.

Definition at line 4150 of file processor.h.

04150 { return 0; }

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

Reimplemented from EMAN::NormalizeProcessor.

Definition at line 3587 of file processor.cpp.

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

03588 {
03589         if (!image) {
03590                 LOGWARN("NULL Image");
03591                 return 0;
03592         }
03593         float ret=sqrt((float)image->get_attr("square_sum"));
03594         return ret==0.0f?1.0f:ret;
03595 }

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 4138 of file processor.h.

04139                 {
04140                         return "Normalize an image so its vector length is 1.0.";
04141                 }

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 4128 of file processor.h.

References NAME.

04129                 {
04130                         return NAME;
04131                 }

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

Definition at line 4133 of file processor.h.

04134                 {
04135                         return new NormalizeUnitProcessor();
04136                 }


Member Data Documentation

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

Definition at line 4143 of file processor.h.

Referenced by get_name().


The documentation for this class was generated from the following files:
Generated on Tue Jun 11 12:44:12 2013 for EMAN2 by  doxygen 1.4.7