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


Member Function Documentation

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

Implements EMAN::NormalizeProcessor.

Definition at line 3632 of file processor.cpp.

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

03633 {
03634         if (!image) {
03635                 LOGWARN("NULL Image");
03636                 return 0;
03637         }
03638         float maxval = image->get_attr("maximum");
03639         float minval = image->get_attr("minimum");
03640         return (maxval - minval) / 2;
03641 }

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

Reimplemented from EMAN::NormalizeProcessor.

Definition at line 3621 of file processor.cpp.

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

03622 {
03623         if (!image) {
03624                 LOGWARN("NULL Image");
03625                 return 0;
03626         }
03627         float maxval = image->get_attr("maximum");
03628         float minval = image->get_attr("minimum");
03629         return (maxval + minval) / 2;
03630 }

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

04236                 {
04237                         return "normalizes an image. mean -> (maxval-minval)/2; std dev = (maxval+minval)/2;";
04238                 }

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

04226                 {
04227                         return NAME;
04228                 }

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

Definition at line 4230 of file processor.h.

04231                 {
04232                         return new NormalizeMaxMinProcessor();
04233                 }


Member Data Documentation

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

Definition at line 149 of file processor.cpp.


The documentation for this class was generated from the following files:
Generated on Mon Mar 7 18:17:44 2011 for EMAN2 by  doxygen 1.3.9.1