#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 1867 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 1885 of file processor.h. 01886 { 01887 return "f(x) = 0 if x < value; f(x) = 1 if x >= value."; 01888 }
|
|
Get the processor's name. Each processor is identified by a unique name.
Implements EMAN::Processor. Definition at line 1870 of file processor.h. 01871 {
01872 return NAME;
01873 }
|
|
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 1878 of file processor.h. References EMAN::TypeDict::put(). 01879 { 01880 TypeDict d; 01881 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" ); 01882 return d; 01883 }
|
|
Definition at line 1874 of file processor.h. 01875 { 01876 return new BinarizeProcessor(); 01877 }
|
|
Implements EMAN::RealPixelProcessor. Definition at line 1893 of file processor.h. References x. 01894 { 01895 if (*x < value) 01896 { 01897 *x = 0; 01898 } 01899 else 01900 { 01901 *x = 1; 01902 } 01903 }
|
|
Definition at line 94 of file processor.cpp. |