#include <processor.h>
Inheritance diagram for EMAN::NormalizeMaxMinProcessor:
Public Member Functions | |
string | get_name () const |
Get the processor's name. | |
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 = "normalize.maxmin" |
Protected Member Functions | |
float | calc_sigma (EMData *image) const |
float | calc_mean (EMData *image) const |
mean -> (maxval-minval)/2; std dev = (maxval+minval)/2;
Definition at line 4353 of file processor.h.
float NormalizeMaxMinProcessor::calc_mean | ( | EMData * | image | ) | const [protected, virtual] |
Implements EMAN::NormalizeProcessor.
Definition at line 3724 of file processor.cpp.
References EMAN::EMData::get_attr(), and LOGWARN.
03725 { 03726 if (!image) { 03727 LOGWARN("NULL Image"); 03728 return 0; 03729 } 03730 float maxval = image->get_attr("maximum"); 03731 float minval = image->get_attr("minimum"); 03732 return (maxval - minval) / 2; 03733 }
float NormalizeMaxMinProcessor::calc_sigma | ( | EMData * | image | ) | const [protected, virtual] |
Reimplemented from EMAN::NormalizeProcessor.
Definition at line 3713 of file processor.cpp.
References EMAN::EMData::get_attr(), and LOGWARN.
03714 { 03715 if (!image) { 03716 LOGWARN("NULL Image"); 03717 return 0; 03718 } 03719 float maxval = image->get_attr("maximum"); 03720 float minval = image->get_attr("minimum"); 03721 return (maxval + minval) / 2; 03722 }
string EMAN::NormalizeMaxMinProcessor::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 4366 of file processor.h.
04367 { 04368 return "normalizes an image. mean -> (maxval-minval)/2; std dev = (maxval+minval)/2;"; 04369 }
string EMAN::NormalizeMaxMinProcessor::get_name | ( | ) | const [inline, virtual] |
Get the processor's name.
Each processor is identified by a unique name.
Implements EMAN::Processor.
Definition at line 4356 of file processor.h.
References NAME.
04357 { 04358 return NAME; 04359 }
static Processor* EMAN::NormalizeMaxMinProcessor::NEW | ( | ) | [inline, static] |
Definition at line 4361 of file processor.h.
04362 { 04363 return new NormalizeMaxMinProcessor(); 04364 }
const string NormalizeMaxMinProcessor::NAME = "normalize.maxmin" [static] |