#include <processor.h>
Inheritance diagram for EMAN::BinarizeProcessor:
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 | |
static Processor * | NEW () |
Static Public Attributes | |
static const string | NAME = "threshold.binary" |
Protected Member Functions | |
void | process_pixel (float *x) const |
value | The thresholding value. If a pixel value is equal to or above the threshold it is set to 1. If it is below it is set to 0 |
Definition at line 1820 of file processor.h.
string EMAN::BinarizeProcessor::get_desc | ( | ) | const [inline, virtual] |
Get the descrition of this specific processor.
This function must be overwritten by a subclass.
Implements EMAN::Processor.
Definition at line 1838 of file processor.h.
string EMAN::BinarizeProcessor::get_name | ( | ) | const [inline, virtual] |
Get the processor's name.
Each processor is identified by a unique name.
Implements EMAN::Processor.
Definition at line 1823 of file processor.h.
References NAME.
01824 { 01825 return NAME; 01826 }
TypeDict EMAN::BinarizeProcessor::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.
Reimplemented from EMAN::Processor.
Definition at line 1831 of file processor.h.
References EMAN::EMObject::FLOAT, and EMAN::TypeDict::put().
01832 { 01833 TypeDict d; 01834 d.put("value", EMObject::FLOAT, "The thresholding value. If a pixel value is equal to or above the threshold it is set to 1. If it is below it is set to 0" ); 01835 return d; 01836 }
static Processor* EMAN::BinarizeProcessor::NEW | ( | ) | [inline, static] |
void EMAN::BinarizeProcessor::process_pixel | ( | float * | x | ) | const [inline, protected, virtual] |
Implements EMAN::RealPixelProcessor.
Definition at line 1846 of file processor.h.
References EMAN::RealPixelProcessor::value.
01847 { 01848 if (*x < value) 01849 { 01850 *x = 0; 01851 } 01852 else 01853 { 01854 *x = 1; 01855 } 01856 }
const string BinarizeProcessor::NAME = "threshold.binary" [static] |