#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 | |
static Processor * | NEW () |
Static Public Attributes | |
static 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 2115 of file processor.h.
|
Definition at line 2118 of file processor.h. Referenced by NEW().
|
|
Get the descrition of this specific processor. This function must be overwritten by a subclass.
Implements EMAN::Processor. Definition at line 2146 of file processor.h. 02147 { 02148 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"; 02149 }
|
|
Get the processor's name. Each processor is identified by a unique name.
Implements EMAN::Processor. Definition at line 2122 of file processor.h. References NAME. 02123 { 02124 return NAME; 02125 }
|
|
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 2138 of file processor.h. References EMAN::EMObject::FLOAT, and EMAN::TypeDict::put(). 02139 { 02140 TypeDict d; 02141 d.put("low", EMObject::FLOAT, "The lower limit of the range that will be set to 1"); 02142 d.put("high", EMObject::FLOAT, "The upper limit of the range that will be set to 1"); 02143 return d; 02144 }
|
|
Definition at line 2126 of file processor.h. References RangeThresholdProcessor(). 02127 { 02128 return new RangeThresholdProcessor(); 02129 }
|
|
Implements EMAN::RealPixelProcessor. Definition at line 2154 of file processor.h. 02155 { 02156 if (*x >= low && *x <= high) { 02157 *x = 1; 02158 } 02159 else { 02160 *x = 0; 02161 } 02162 }
|
|
Set the processor parameters using a key/value dictionary.
Reimplemented from EMAN::RealPixelProcessor. Definition at line 2131 of file processor.h. References EMAN::Dict::get(), high, low, and EMAN::Processor::params. 02132 { 02133 params = new_params; 02134 low = params.get("low"); 02135 high = params.get("high"); 02136 }
|
|
Definition at line 2165 of file processor.h. Referenced by process_pixel(), and set_params(). |
|
Definition at line 2164 of file processor.h. Referenced by process_pixel(), and set_params(). |
|
Definition at line 2151 of file processor.h. Referenced by get_name(). |