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

Discrete approximation to Laplacian. More...

#include <processor.h>

Inheritance diagram for EMAN::LaplacianProcessor:
Inheritance graph
[legend]
Collaboration diagram for EMAN::LaplacianProcessor:
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 = "math.laplacian"

Protected Member Functions

void create_kernel () const

Detailed Description

Discrete approximation to Laplacian.

Edge enchancement, but works poorly in the presence of noise. Laplacian processor (x -> d^2/dx^2 + d^2/dy^2 + d^2/dz^2).

Definition at line 3102 of file processor.h.


Member Function Documentation

void LaplacianProcessor::create_kernel ( ) const [protected, virtual]

Implements EMAN::AreaProcessor.

Definition at line 1734 of file processor.cpp.

References EMAN::AreaProcessor::areasize, EMAN::AreaProcessor::kernel, and EMAN::AreaProcessor::nz.

{
        if (nz == 1) {
                memset(kernel, 0, areasize * areasize);
                kernel[1] = -0.25f;
                kernel[3] = -0.25f;
                kernel[5] = -0.25f;
                kernel[7] = -0.25f;
                kernel[4] = 1;
        }
        else {
                memset(kernel, 0, (size_t)areasize * areasize * areasize);
                kernel[4] = -1.0f / 6.0f;
                kernel[10] = -1.0f / 6.0f;
                kernel[12] = -1.0f / 6.0f;
                kernel[14] = -1.0f / 6.0f;
                kernel[16] = -1.0f / 6.0f;
                kernel[22] = -1.0f / 6.0f;
                kernel[13] = 1;
        }
}
string EMAN::LaplacianProcessor::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 3114 of file processor.h.

                {
                        return "Discrete approximation to Laplacian. Edge enchancement, but works poorly in the presence of noise. Laplacian processor (x -> d^2/dx^2 + d^2/dy^2 + d^2/dz^2).";
                }
string EMAN::LaplacianProcessor::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 3105 of file processor.h.

References NAME.

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

Definition at line 3109 of file processor.h.

                {
                        return new LaplacianProcessor();
                }

Member Data Documentation

const string LaplacianProcessor::NAME = "math.laplacian" [static]

Definition at line 3119 of file processor.h.

Referenced by get_name().


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