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 ()

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


Member Function Documentation

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

01108                 {
01109                         return "threshold.notzero";
01110                 }

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

Definition at line 1111 of file processor.h.

01112                 {
01113                         return new BooleanProcessor();
01114                 }

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

01117                 {
01118                         return "f(x) = 0 if x = 0; f(x) = 1 if x != 0;";
01119                 }

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

Implements EMAN::RealPixelProcessor.

Definition at line 1122 of file processor.h.

01123                 {
01124                         if (*x != 0)
01125                         {
01126                                 *x = 1.0;
01127                         }
01128                 }


The documentation for this class was generated from the following file:

Generated on Sat Nov 21 02:20:25 2009 for EMAN2 by  doxygen 1.5.6