#include <processor.h>
Inheritance diagram for EMAN::NormalizeLREdgeMeanProcessor:
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.lredge" |
Protected Member Functions | |
float | calc_mean (EMData *image) const |
Definition at line 4327 of file processor.h.
|
Implements EMAN::NormalizeProcessor. Definition at line 3735 of file processor.cpp. References EMAN::EMData::get_data(), EMAN::EMData::get_xsize(), EMAN::EMData::get_ysize(), EMAN::EMData::get_zsize(), and LOGWARN. 03736 { 03737 if (!image) { 03738 LOGWARN("NULL Image"); 03739 return 0; 03740 } 03741 double sum = 0; 03742 int nx = image->get_xsize(); 03743 int ny = image->get_ysize(); 03744 int nz = image->get_zsize(); 03745 float *d = image->get_data(); 03746 int nyz = ny * nz; 03747 03748 for (int i = 0; i < nyz; i++) { 03749 size_t l = i * nx; 03750 size_t r = l + nx - 2; 03751 sum += d[l] + d[l + 1] + d[r] + d[r + 1]; 03752 } 03753 float mean = (float) sum / (4 * nyz); 03754 return mean; 03755 }
|
|
Get the descrition of this specific processor. This function must be overwritten by a subclass.
Implements EMAN::Processor. Definition at line 4340 of file processor.h.
|
|
Get the processor's name. Each processor is identified by a unique name.
Implements EMAN::Processor. Definition at line 4330 of file processor.h. References NAME. 04331 { 04332 return NAME; 04333 }
|
|
Definition at line 4335 of file processor.h. 04336 { 04337 return new NormalizeLREdgeMeanProcessor(); 04338 }
|
|
Definition at line 4345 of file processor.h. Referenced by get_name(). |