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 4316 of file processor.h.


Member Function Documentation

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

Implements EMAN::NormalizeProcessor.

Definition at line 3691 of file processor.cpp.

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

03692 {
03693         if (!image) {
03694                 LOGWARN("NULL Image");
03695                 return 0;
03696         }
03697         float maxval = image->get_attr("maximum");
03698         float minval = image->get_attr("minimum");
03699         return (maxval - minval) / 2;
03700 }

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

Reimplemented from EMAN::NormalizeProcessor.

Definition at line 3680 of file processor.cpp.

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

03681 {
03682         if (!image) {
03683                 LOGWARN("NULL Image");
03684                 return 0;
03685         }
03686         float maxval = image->get_attr("maximum");
03687         float minval = image->get_attr("minimum");
03688         return (maxval + minval) / 2;
03689 }

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 4329 of file processor.h.

04330                 {
04331                         return "normalizes an image. mean -> (maxval-minval)/2; std dev = (maxval+minval)/2;";
04332                 }

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 4319 of file processor.h.

04320                 {
04321                         return NAME;
04322                 }

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

Definition at line 4324 of file processor.h.

04325                 {
04326                         return new NormalizeMaxMinProcessor();
04327                 }


Member Data Documentation

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

Definition at line 157 of file processor.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Jul 12 13:51:15 2011 for EMAN2 by  doxygen 1.3.9.1