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

static ProcessorNEW ()

Static Public Attributes

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

03031                 {
03032                         return "pixel = standard deviation of values surrounding pixel.";
03033                 }

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

References NAME.

03022                 {
03023                         return NAME;
03024                 }

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

Definition at line 3025 of file processor.h.

03026                 {
03027                         return new BoxSigmaProcessor();
03028                 }

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

Implements EMAN::BoxStatProcessor.

Definition at line 3038 of file processor.h.

References sqrt().

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


Member Data Documentation

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

Definition at line 3035 of file processor.h.

Referenced by get_name().


The documentation for this class was generated from the following files:
Generated on Tue May 25 17:37:15 2010 for EMAN2 by  doxygen 1.4.4