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

EMAN::BoxSigmaProcessor Class Reference

pixel = standard deviation of values surrounding pixel. More...

#include <processor.h>

Inheritance diagram for EMAN::BoxSigmaProcessor:

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

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 = "math.localsigma"

Protected Member Functions

void process_pixel (float *pixel, const float *data, int n) const

Detailed Description

pixel = standard deviation of values surrounding pixel.

Definition at line 2983 of file processor.h.


Member Function Documentation

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

02996                 {
02997                         return "pixel = standard deviation of values surrounding pixel.";
02998                 }

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

02987                 {
02988                         return NAME;
02989                 }

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

Definition at line 2990 of file processor.h.

02991                 {
02992                         return new BoxSigmaProcessor();
02993                 }

void EMAN::BoxSigmaProcessor::process_pixel float *  pixel,
const float *  data,
int  n
const [inline, protected, virtual]
 

Implements EMAN::BoxStatProcessor.

Definition at line 3003 of file processor.h.

References data, and sqrt().

03004                 {
03005                         float sum = 0;
03006                         float square_sum = 0;
03007                         for (int i = 0; i < n; i++)
03008                         {
03009                                 sum += data[i];
03010                                 square_sum += data[i] * data[i];
03011                         }
03012 
03013                         float mean = sum / n;
03014                         *pixel = sqrt(square_sum / n - mean * mean);
03015                 }


Member Data Documentation

const string BoxSigmaProcessor::NAME = "math.localsigma" [static]
 

Definition at line 117 of file processor.cpp.


The documentation for this class was generated from the following files:
Generated on Mon May 2 13:30:17 2011 for EMAN2 by  doxygen 1.3.9.1