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

03034                 {
03035                         return "pixel = standard deviation of values surrounding pixel.";
03036                 }

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

03025                 {
03026                         return NAME;
03027                 }

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

Definition at line 3028 of file processor.h.

03029                 {
03030                         return new BoxSigmaProcessor();
03031                 }

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

Implements EMAN::BoxStatProcessor.

Definition at line 3041 of file processor.h.

References data, and sqrt().

03042                 {
03043                         float sum = 0;
03044                         float square_sum = 0;
03045                         for (int i = 0; i < n; i++)
03046                         {
03047                                 sum += data[i];
03048                                 square_sum += data[i] * data[i];
03049                         }
03050 
03051                         float mean = sum / n;
03052                         *pixel = sqrt(square_sum / n - mean * mean);
03053                 }


Member Data Documentation

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

Definition at line 123 of file processor.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Jul 12 13:51:05 2011 for EMAN2 by  doxygen 1.3.9.1