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

EMAN::NormalizeMaxMinProcessor Class Reference

normalizes an image. More...

#include <processor.h>

Inheritance diagram for EMAN::NormalizeMaxMinProcessor:

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

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.maxmin"

Protected Member Functions

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

Detailed Description

normalizes an image.

mean -> (maxval-minval)/2; std dev = (maxval+minval)/2;

Definition at line 4137 of file processor.h.


Member Function Documentation

float NormalizeMaxMinProcessor::calc_mean EMData image  )  const [protected, virtual]
 

Implements EMAN::NormalizeProcessor.

Definition at line 3572 of file processor.cpp.

References EMAN::EMData::get_attr(), and LOGWARN.

03573 {
03574         if (!image) {
03575                 LOGWARN("NULL Image");
03576                 return 0;
03577         }
03578         float maxval = image->get_attr("maximum");
03579         float minval = image->get_attr("minimum");
03580         return (maxval - minval) / 2;
03581 }

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

Reimplemented from EMAN::NormalizeProcessor.

Definition at line 3561 of file processor.cpp.

References EMAN::EMData::get_attr(), and LOGWARN.

03562 {
03563         if (!image) {
03564                 LOGWARN("NULL Image");
03565                 return 0;
03566         }
03567         float maxval = image->get_attr("maximum");
03568         float minval = image->get_attr("minimum");
03569         return (maxval + minval) / 2;
03570 }

string EMAN::NormalizeMaxMinProcessor::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 4150 of file processor.h.

04151                 {
04152                         return "normalizes an image. mean -> (maxval-minval)/2; std dev = (maxval+minval)/2;";
04153                 }

string EMAN::NormalizeMaxMinProcessor::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 4140 of file processor.h.

04141                 {
04142                         return NAME;
04143                 }

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

Definition at line 4145 of file processor.h.

04146                 {
04147                         return new NormalizeMaxMinProcessor();
04148                 }


Member Data Documentation

const string NormalizeMaxMinProcessor::NAME = "normalize.maxmin" [static]
 

Definition at line 146 of file processor.cpp.


The documentation for this class was generated from the following files:
Generated on Thu Dec 9 13:48:06 2010 for EMAN2 by  doxygen 1.3.9.1