#include <processor.h>
Inheritance diagram for EMAN::NormalizeUnitSumProcessor:


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 | |
| Processor * | NEW () |
Static Public Attributes | |
| const string | NAME = "normalize.unitsum" |
Protected Member Functions | |
| float | calc_sigma (EMData *image) const |
| float | calc_mean (EMData *image) const |
Definition at line 4076 of file processor.h.
|
|
Implements EMAN::NormalizeProcessor. Definition at line 4101 of file processor.h. 04101 { return 0; }
|
|
|
Reimplemented from EMAN::NormalizeProcessor. Definition at line 3500 of file processor.cpp. References EMAN::EMData::get_attr(), EMAN::EMData::get_xsize(), EMAN::EMData::get_ysize(), EMAN::EMData::get_zsize(), and LOGWARN. 03501 {
03502 if (!image) {
03503 LOGWARN("NULL Image");
03504 return 0;
03505 }
03506 float ret=(float)image->get_attr("mean")*image->get_xsize()*image->get_ysize()*image->get_zsize();
03507 return ret==0.0f?1.0f:ret;
03508 }
|
|
|
Get the descrition of this specific processor. This function must be overwritten by a subclass.
Implements EMAN::Processor. Definition at line 4089 of file processor.h. 04090 {
04091 return "Normalize an image so its elements sum to 1.0 (fails if mean=0)";
04092 }
|
|
|
Get the processor's name. Each processor is identified by a unique name.
Implements EMAN::Processor. Definition at line 4079 of file processor.h. 04080 {
04081 return NAME;
04082 }
|
|
|
Definition at line 4084 of file processor.h. 04085 {
04086 return new NormalizeUnitSumProcessor();
04087 }
|
|
|
Definition at line 149 of file processor.cpp. |
1.3.9.1