EMAN::MinusPeakProcessor Class Reference

peak processor: pixel = pixel - max of values surrounding pixel. More...

#include <processor.h>

Inheritance diagram for EMAN::MinusPeakProcessor:

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

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.submax"

Protected Member Functions

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

Detailed Description

peak processor: pixel = pixel - max of values surrounding pixel.

This is a sort of positive peak-finding algorithm.

Definition at line 3134 of file processor.h.


Member Function Documentation

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

03147                 {
03148                         return "peak processor: pixel = pixel - max of values surrounding pixel. This is a sort of positive peak-finding algorithm.";
03149                 }

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

References NAME.

03138                 {
03139                         return NAME;
03140                 }

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

Definition at line 3141 of file processor.h.

03142                 {
03143                         return new MinusPeakProcessor();
03144                 }

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

Implements EMAN::BoxStatProcessor.

Definition at line 3154 of file processor.h.

03155                 {
03156                         float maxval = -FLT_MAX;
03157                         for (int i = 0; i < n; i++)
03158                         {
03159                                 if (data[i] > maxval) {
03160                                         maxval = data[i];
03161                                 }
03162                         }
03163                          *pixel -= maxval;
03164                 }


Member Data Documentation

const string MinusPeakProcessor::NAME = "math.submax" [static]

Definition at line 3151 of file processor.h.

Referenced by get_name().


The documentation for this class was generated from the following files:
Generated on Thu May 3 10:10:09 2012 for EMAN2 by  doxygen 1.4.7