EMAN::BooleanProcessor Class Reference

f(x) = 0 if x = 0; f(x) = 1 if x != 0 More...

#include <processor.h>

Inheritance diagram for EMAN::BooleanProcessor:

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

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 = "threshold.notzero"

Protected Member Functions

void process_pixel (float *x) const

Detailed Description

f(x) = 0 if x = 0; f(x) = 1 if x != 0

Definition at line 1289 of file processor.h.


Member Function Documentation

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

01302                 {
01303                         return "f(x) = 0 if x = 0; f(x) = 1 if x != 0;";
01304                 }

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

References NAME.

01293                 {
01294                         return NAME;
01295                 }

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

Definition at line 1296 of file processor.h.

01297                 {
01298                         return new BooleanProcessor();
01299                 }

void EMAN::BooleanProcessor::process_pixel ( float *  x  )  const [inline, protected, virtual]

Implements EMAN::RealPixelProcessor.

Definition at line 1309 of file processor.h.

01310                 {
01311                         if (*x != 0)
01312                         {
01313                                 *x = 1.0;
01314                         }
01315                 }


Member Data Documentation

const string BooleanProcessor::NAME = "threshold.notzero" [static]

Definition at line 1306 of file processor.h.

Referenced by get_name().


The documentation for this class was generated from the following files:
Generated on Mon Jul 19 12:43:07 2010 for EMAN2 by  doxygen 1.4.7