#include <processor.h>
Inheritance diagram for EMAN::NSigmaClampingProcessor:
Public Member Functions | |
NSigmaClampingProcessor () | |
string | get_name () const |
Get the processor's name. | |
TypeDict | get_param_types () const |
Get processor parameter information in a dictionary. | |
void | process_inplace (EMData *image) |
To process an image in-place. | |
string | get_desc () const |
Get the descrition of this specific processor. | |
Static Public Member Functions | |
Processor * | NEW () |
Static Public Attributes | |
const string | NAME = "threshold.clampminmax.nsigma" |
Protected Attributes | |
float | default_sigma |
The parameter specified by the user is n, the default value of n is 2.
nsigma | The number (n) of sigmas to clamp min and max vals at, so that the clamped boundaries are mean-n*sigma and mean+n*sigma | |
tomean | Replace outlying pixels values with the mean pixel value instead |
Definition at line 1490 of file processor.h.
|
Definition at line 1493 of file processor.h. 01493 : default_sigma(2.0) {}
|
|
Get the descrition of this specific processor. This function must be overwritten by a subclass.
Reimplemented from EMAN::ClampingProcessor. Definition at line 1515 of file processor.h. 01516 { 01517 return "This function clamps the min and max vals in the image at minval and maxval at mean-n*sigma and mean+n*sigma, respectively. The parameter specified by the user is n, the default value of n is 2."; 01518 }
|
|
Get the processor's name. Each processor is identified by a unique name.
Reimplemented from EMAN::ClampingProcessor. Definition at line 1495 of file processor.h. 01496 {
01497 return NAME;
01498 }
|
|
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::ClampingProcessor. Definition at line 1505 of file processor.h. References EMAN::TypeDict::put(). 01506 { 01507 TypeDict d; 01508 d.put("nsigma", EMObject::FLOAT, "The number (n) of sigmas to clamp min and max vals at, so that the clamped boundaries are mean-n*sigma and mean+n*sigma" ); 01509 d.put("tomean", EMObject::BOOL, "Replace outlying pixels values with the mean pixel value instead" ); 01510 return d; 01511 }
|
|
Reimplemented from EMAN::ClampingProcessor. Definition at line 1500 of file processor.h. 01501 { 01502 return new NSigmaClampingProcessor(); 01503 }
|
|
To process an image in-place. For those processors which can only be processed out-of-place, override this function to just print out some error message to remind user call the out-of-place version.
Reimplemented from EMAN::ClampingProcessor. Definition at line 9078 of file processor.cpp. References default_sigma, EMAN::EMData::get_attr(), process_inplace(), and EMAN::Dict::set_default(). 09079 { 09080 float nsigma = params.set_default("nsigma",default_sigma); 09081 float sigma = image->get_attr("sigma"); 09082 float mean = image->get_attr("mean"); 09083 params.set_default("minval",mean - nsigma*sigma); 09084 params.set_default("maxval",mean + nsigma*sigma); 09085 09086 ClampingProcessor::process_inplace(image); 09087 }
|
|
Definition at line 1523 of file processor.h. Referenced by process_inplace(). |
|
Reimplemented from EMAN::ClampingProcessor. Definition at line 86 of file processor.cpp. |