#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 | |
Processor * | NEW () |
Static Public Attributes | |
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 1690 of file processor.h.
|
Get the descrition of this specific processor. This function must be overwritten by a subclass.
Implements EMAN::Processor. Definition at line 1708 of file processor.h. 01709 { 01710 return "f(x) = 0 if x < value; f(x) = 1 if x >= value."; 01711 }
|
|
Get the processor's name. Each processor is identified by a unique name.
Implements EMAN::Processor. Definition at line 1693 of file processor.h. 01694 {
01695 return NAME;
01696 }
|
|
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 1701 of file processor.h. References EMAN::TypeDict::put(). 01702 { 01703 TypeDict d; 01704 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" ); 01705 return d; 01706 }
|
|
Definition at line 1697 of file processor.h. 01698 { 01699 return new BinarizeProcessor(); 01700 }
|
|
Implements EMAN::RealPixelProcessor. Definition at line 1716 of file processor.h. References x. 01717 { 01718 if (*x < value) 01719 { 01720 *x = 0; 01721 } 01722 else 01723 { 01724 *x = 1; 01725 } 01726 }
|
|
Definition at line 92 of file processor.cpp. |