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

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

ProcessorNEW ()

Static Public Attributes

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

01275                 {
01276                         return "f(x) = 0 if x = 0; f(x) = 1 if x != 0;";
01277                 }

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

01266                 {
01267                         return NAME;
01268                 }

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

Definition at line 1269 of file processor.h.

01270                 {
01271                         return new BooleanProcessor();
01272                 }

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

Implements EMAN::RealPixelProcessor.

Definition at line 1282 of file processor.h.

References x.

01283                 {
01284                         if (*x != 0)
01285                         {
01286                                 *x = 1.0;
01287                         }
01288                 }


Member Data Documentation

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

Definition at line 76 of file processor.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Jun 11 13:42:16 2013 for EMAN2 by  doxygen 1.3.9.1