EMAN2
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions
EMAN::ZeroConstantProcessor Class Reference

Contraction of data, if any nearest neighbor is 0, value -> 0, generally used iteratively. More...

#include <processor.h>

Inheritance diagram for EMAN::ZeroConstantProcessor:
Inheritance graph
[legend]
Collaboration diagram for EMAN::ZeroConstantProcessor:
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 ()

Static Public Attributes

static const string NAME = "mask.contract"

Protected Member Functions

void process_pixel (float *pixel, float, float, float, float *matrix) const
void create_kernel () const

Detailed Description

Contraction of data, if any nearest neighbor is 0, value -> 0, generally used iteratively.

Definition at line 3128 of file processor.h.


Member Function Documentation

void EMAN::ZeroConstantProcessor::create_kernel ( ) const [inline, protected, virtual]

Implements EMAN::AreaProcessor.

Definition at line 3160 of file processor.h.

                {
                }
string EMAN::ZeroConstantProcessor::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.

Reimplemented from EMAN::AreaProcessor.

Definition at line 3140 of file processor.h.

                {
                        return "Contraction of data, if any nearest neighbor is 0, value -> 0, generally used iteratively";
                }
string EMAN::ZeroConstantProcessor::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 3131 of file processor.h.

References NAME.

                {
                        return NAME;
                }
static Processor* EMAN::ZeroConstantProcessor::NEW ( ) [inline, static]

Definition at line 3135 of file processor.h.

                {
                        return new ZeroConstantProcessor();
                }
void EMAN::ZeroConstantProcessor::process_pixel ( float *  pixel,
float  ,
float  ,
float  ,
float *  matrix 
) const [inline, protected, virtual]

Reimplemented from EMAN::AreaProcessor.

Definition at line 3148 of file processor.h.

                {
                        if (*pixel != 0)
                        {
                                if (*pixel == matrix[1] || *pixel == matrix[3] || *pixel == matrix[5] ||
                                        *pixel == matrix[7] || matrix[1] == 0 || matrix[3] == 0 ||
                                        matrix[5] == 0 || matrix[7] == 0) {
                                        *pixel = 0;
                                }
                        }
                }

Member Data Documentation

const string ZeroConstantProcessor::NAME = "mask.contract" [static]

Definition at line 3145 of file processor.h.

Referenced by get_name().


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