#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 2161 of file processor.h.
EMAN::RangeThresholdProcessor::RangeThresholdProcessor | ( | ) | [inline] |
string EMAN::RangeThresholdProcessor::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 2192 of file processor.h.
02193 { 02194 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"; 02195 }
string EMAN::RangeThresholdProcessor::get_name | ( | ) | const [inline, virtual] |
Get the processor's name.
Each processor is identified by a unique name.
Implements EMAN::Processor.
Definition at line 2168 of file processor.h.
References NAME.
02169 { 02170 return NAME; 02171 }
TypeDict EMAN::RangeThresholdProcessor::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 2184 of file processor.h.
References EMAN::EMObject::FLOAT, and EMAN::TypeDict::put().
02185 { 02186 TypeDict d; 02187 d.put("low", EMObject::FLOAT, "The lower limit of the range that will be set to 1"); 02188 d.put("high", EMObject::FLOAT, "The upper limit of the range that will be set to 1"); 02189 return d; 02190 }
static Processor* EMAN::RangeThresholdProcessor::NEW | ( | ) | [inline, static] |
Definition at line 2172 of file processor.h.
References RangeThresholdProcessor().
02173 { 02174 return new RangeThresholdProcessor(); 02175 }
void EMAN::RangeThresholdProcessor::process_pixel | ( | float * | x | ) | const [inline, protected, virtual] |
void EMAN::RangeThresholdProcessor::set_params | ( | const Dict & | new_params | ) | [inline, virtual] |
Set the processor parameters using a key/value dictionary.
new_params | A dictionary containing the new parameters. |
Reimplemented from EMAN::RealPixelProcessor.
Definition at line 2177 of file processor.h.
References EMAN::Dict::get(), high, low, and EMAN::Processor::params.
02178 { 02179 params = new_params; 02180 low = params.get("low"); 02181 high = params.get("high"); 02182 }
float EMAN::RangeThresholdProcessor::high [private] |
float EMAN::RangeThresholdProcessor::low [private] |
const string RangeThresholdProcessor::NAME = "threshold.binaryrange" [static] |