Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

EMAN::NormalizeUnitSumProcessor Class Reference

Normalize an image so its elements sum to 1.0 (fails if mean=0). More...

#include <processor.h>

Inheritance diagram for EMAN::NormalizeUnitSumProcessor:

Inheritance graph
[legend]
Collaboration diagram for EMAN::NormalizeUnitSumProcessor:

Collaboration graph
[legend]
List of all members.

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

ProcessorNEW ()

Static Public Attributes

const string NAME = "normalize.unitsum"

Protected Member Functions

float calc_sigma (EMData *image) const
float calc_mean (EMData *image) const

Detailed Description

Normalize an image so its elements sum to 1.0 (fails if mean=0).

Definition at line 4154 of file processor.h.


Member Function Documentation

float EMAN::NormalizeUnitSumProcessor::calc_mean EMData image  )  const [inline, protected, virtual]
 

Implements EMAN::NormalizeProcessor.

Definition at line 4179 of file processor.h.

04179 { return 0; }

float NormalizeUnitSumProcessor::calc_sigma EMData image  )  const [protected, virtual]
 

Reimplemented from EMAN::NormalizeProcessor.

Definition at line 3597 of file processor.cpp.

References EMAN::EMData::get_attr(), EMAN::EMData::get_xsize(), EMAN::EMData::get_ysize(), EMAN::EMData::get_zsize(), and LOGWARN.

03598 {
03599         if (!image) {
03600                 LOGWARN("NULL Image");
03601                 return 0;
03602         }
03603         float ret=(float)image->get_attr("mean")*image->get_xsize()*image->get_ysize()*image->get_zsize();
03604         return ret==0.0f?1.0f:ret;
03605 }

string EMAN::NormalizeUnitSumProcessor::get_desc  )  const [inline, virtual]
 

Get the descrition of this specific processor.

This function must be overwritten by a subclass.

Returns:
The description of this processor.

Implements EMAN::Processor.

Definition at line 4167 of file processor.h.

04168                 {
04169                         return "Normalize an image so its elements sum to 1.0 (fails if mean=0)";
04170                 }

string EMAN::NormalizeUnitSumProcessor::get_name  )  const [inline, virtual]
 

Get the processor's name.

Each processor is identified by a unique name.

Returns:
The processor's name.

Implements EMAN::Processor.

Definition at line 4157 of file processor.h.

04158                 {
04159                         return NAME;
04160                 }

Processor* EMAN::NormalizeUnitSumProcessor::NEW  )  [inline, static]
 

Definition at line 4162 of file processor.h.

04163                 {
04164                         return new NormalizeUnitSumProcessor();
04165                 }


Member Data Documentation

const string NormalizeUnitSumProcessor::NAME = "normalize.unitsum" [static]
 

Definition at line 144 of file processor.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Jun 11 13:42:32 2013 for EMAN2 by  doxygen 1.3.9.1