#include <processor.h>
Inheritance diagram for EMAN::RangeThresholdProcessor:
Public Member Functions | |
RangeThresholdProcessor () | |
string | get_name () const |
Get the processor's name. | |
void | set_params (const Dict &new_params) |
Set the processor parameters using a key/value dictionary. | |
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.binaryrange" |
Protected Member Functions | |
void | process_pixel (float *x) const |
Private Attributes | |
float | low |
float | high |
low | The lower limit of the range that will be set to 1 | |
high | The upper limit of the range that will be set to 1 |
Definition at line 2114 of file processor.h.
|
Definition at line 2117 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 2145 of file processor.h. 02146 { 02147 return "Range thresholding. A range of values is set to 1, all else is set to 0. f(x) = 1 if (low <= x <= high); else f(x) = 0"; 02148 }
|
|
Get the processor's name. Each processor is identified by a unique name.
Implements EMAN::Processor. Definition at line 2121 of file processor.h. 02122 {
02123 return NAME;
02124 }
|
|
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 2137 of file processor.h. References EMAN::TypeDict::put(). 02138 { 02139 TypeDict d; 02140 d.put("low", EMObject::FLOAT, "The lower limit of the range that will be set to 1"); 02141 d.put("high", EMObject::FLOAT, "The upper limit of the range that will be set to 1"); 02142 return d; 02143 }
|
|
Definition at line 2125 of file processor.h. 02126 { 02127 return new RangeThresholdProcessor(); 02128 }
|
|
Implements EMAN::RealPixelProcessor. Definition at line 2153 of file processor.h. References x. 02154 { 02155 if (*x >= low && *x <= high) { 02156 *x = 1; 02157 } 02158 else { 02159 *x = 0; 02160 } 02161 }
|
|
Set the processor parameters using a key/value dictionary.
Reimplemented from EMAN::RealPixelProcessor. Definition at line 2130 of file processor.h. References EMAN::Dict::get(). 02131 { 02132 params = new_params; 02133 low = params.get("low"); 02134 high = params.get("high"); 02135 }
|
|
Definition at line 2164 of file processor.h. |
|
Definition at line 2163 of file processor.h. |
|
Definition at line 101 of file processor.cpp. |