#include <processor.h>
Inheritance diagram for EMAN::ZeroConstantProcessor:
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 Processor * | NEW () |
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 |
Definition at line 2939 of file processor.h.
void EMAN::ZeroConstantProcessor::create_kernel | ( | ) | const [inline, protected, virtual] |
string EMAN::ZeroConstantProcessor::get_desc | ( | ) | const [inline, virtual] |
Get the descrition of this specific processor.
This function must be overwritten by a subclass.
Reimplemented from EMAN::AreaProcessor.
Definition at line 2951 of file processor.h.
02952 { 02953 return "Contraction of data, if any nearest neighbor is 0, value -> 0, generally used iteratively"; 02954 }
string EMAN::ZeroConstantProcessor::get_name | ( | ) | const [inline, virtual] |
Get the processor's name.
Each processor is identified by a unique name.
Implements EMAN::Processor.
Definition at line 2942 of file processor.h.
References NAME.
02943 { 02944 return NAME; 02945 }
static Processor* EMAN::ZeroConstantProcessor::NEW | ( | ) | [inline, static] |
Definition at line 2946 of file processor.h.
02947 { 02948 return new ZeroConstantProcessor(); 02949 }
void EMAN::ZeroConstantProcessor::process_pixel | ( | float * | pixel, | |
float | , | |||
float | , | |||
float | , | |||
float * | matrix | |||
) | const [inline, protected, virtual] |
Reimplemented from EMAN::AreaProcessor.
Definition at line 2959 of file processor.h.
02960 { 02961 if (*pixel != 0) 02962 { 02963 if (*pixel == matrix[1] || *pixel == matrix[3] || *pixel == matrix[5] || 02964 *pixel == matrix[7] || matrix[1] == 0 || matrix[3] == 0 || 02965 matrix[5] == 0 || matrix[7] == 0) { 02966 *pixel = 0; 02967 } 02968 } 02969 }
const string ZeroConstantProcessor::NAME = "mask.contract" [static] |