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

01052                 {
01053                         return "f(x) = 0 if x = 0; f(x) = 1 if x != 0;";
01054                 }

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

01043                 {
01044                         return NAME;
01045                 }

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

Definition at line 1046 of file processor.h.

01047                 {
01048                         return new BooleanProcessor();
01049                 }

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

Implements EMAN::RealPixelProcessor.

Definition at line 1059 of file processor.h.

References x.

01060                 {
01061                         if (*x != 0)
01062                         {
01063                                 *x = 1.0;
01064                         }
01065                 }


Member Data Documentation

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

Definition at line 73 of file processor.cpp.


The documentation for this class was generated from the following files:
Generated on Thu Dec 9 13:47:41 2010 for EMAN2 by  doxygen 1.3.9.1