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

01176                 {
01177                         return "f(x) = 0 if x = 0; f(x) = 1 if x != 0;";
01178                 }

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

01167                 {
01168                         return NAME;
01169                 }

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

Definition at line 1170 of file processor.h.

01171                 {
01172                         return new BooleanProcessor();
01173                 }

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

Implements EMAN::RealPixelProcessor.

Definition at line 1183 of file processor.h.

References x.

01184                 {
01185                         if (*x != 0)
01186                         {
01187                                 *x = 1.0;
01188                         }
01189                 }


Member Data Documentation

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

Definition at line 81 of file processor.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Jul 12 13:50:52 2011 for EMAN2 by  doxygen 1.3.9.1