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

EMAN::ToZeroProcessor Class Reference

f(x) = x if x >= minval; f(x) = 0 if x < minval More...

#include <processor.h>

Inheritance diagram for EMAN::ToZeroProcessor:

[legend]
Collaboration diagram for EMAN::ToZeroProcessor:
[legend]
List of all members.

Public Member Functions

string get_name () const
 Get the processor's name.
TypeDict get_param_types () const
 Get processor parameter information in a dictionary.
string get_desc () const
 Get the descrition of this specific processor.

Static Public Member Functions

ProcessorNEW ()

Static Public Attributes

const string NAME = "threshold.belowtozero"

Protected Member Functions

void process_pixel (float *x) const

Detailed Description

f(x) = x if x >= minval; f(x) = 0 if x < minval

Parameters:
minval 

Definition at line 1428 of file processor.h.


Member Function Documentation

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

01447                         {
01448                                 return "f(x) = x if x >= minval; f(x) = 0 if x < minval.";
01449                         }

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

01432                         {
01433                                 return NAME;
01434                         }

TypeDict EMAN::ToZeroProcessor::get_param_types  )  const [inline, virtual]
 

Get processor parameter information in a dictionary.

Each parameter has one record in the dictionary. Each record contains its name, data-type, and description.

Returns:
A dictionary containing the parameter info.

Reimplemented from EMAN::Processor.

Definition at line 1439 of file processor.h.

References EMAN::TypeDict::put().

01440                         {
01441                                 TypeDict d;
01442                                 d.put("minval", EMObject::FLOAT, "Everything below this value is set to zero");
01443                                 return d;
01444                         }

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

Definition at line 1435 of file processor.h.

01436                         {
01437                                 return new ToZeroProcessor();
01438                         }

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

Implements EMAN::RealPixelProcessor.

Definition at line 1454 of file processor.h.

References x.

01455                         {
01456                                 if (*x < value) {
01457                                         *x = 0;
01458                                 }
01459                         }


Member Data Documentation

const string ToZeroProcessor::NAME = "threshold.belowtozero" [static]
 

Definition at line 86 of file processor.cpp.


The documentation for this class was generated from the following files:
Generated on Fri Apr 30 15:39:20 2010 for EMAN2 by  doxygen 1.3.9.1