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


Member Function Documentation

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

Implements EMAN::AreaProcessor.

Definition at line 1679 of file processor.cpp.

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

01680 {
01681         if (nz == 1) {
01682                 memset(kernel, 0, areasize * areasize);
01683                 kernel[1] = -0.25f;
01684                 kernel[3] = -0.25f;
01685                 kernel[5] = -0.25f;
01686                 kernel[7] = -0.25f;
01687                 kernel[4] = 1;
01688         }
01689         else {
01690                 memset(kernel, 0, (size_t)areasize * areasize * areasize);
01691                 kernel[4] = -1.0f / 6.0f;
01692                 kernel[10] = -1.0f / 6.0f;
01693                 kernel[12] = -1.0f / 6.0f;
01694                 kernel[14] = -1.0f / 6.0f;
01695                 kernel[16] = -1.0f / 6.0f;
01696                 kernel[22] = -1.0f / 6.0f;
01697                 kernel[13] = 1;
01698         }
01699 }

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

02847                 {
02848                         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).";
02849                 }

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

References NAME.

02838                 {
02839                         return NAME;
02840                 }

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

Definition at line 2841 of file processor.h.

02842                 {
02843                         return new LaplacianProcessor();
02844                 }


Member Data Documentation

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

Definition at line 2851 of file processor.h.

Referenced by get_name().


The documentation for this class was generated from the following files:
Generated on Mon May 2 13:30:19 2011 for EMAN2 by  doxygen 1.4.7