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:

[legend]
Collaboration diagram for EMAN::NormalizeMaxMinProcessor:
[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 4313 of file processor.h.


Member Function Documentation

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

Implements EMAN::NormalizeProcessor.

Definition at line 3617 of file processor.cpp.

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

03618 {
03619         if (!image) {
03620                 LOGWARN("NULL Image");
03621                 return 0;
03622         }
03623         float maxval = image->get_attr("maximum");
03624         float minval = image->get_attr("minimum");
03625         return (maxval - minval) / 2;
03626 }

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

Reimplemented from EMAN::NormalizeProcessor.

Definition at line 3606 of file processor.cpp.

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

03607 {
03608         if (!image) {
03609                 LOGWARN("NULL Image");
03610                 return 0;
03611         }
03612         float maxval = image->get_attr("maximum");
03613         float minval = image->get_attr("minimum");
03614         return (maxval + minval) / 2;
03615 }

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

04327                 {
04328                         return "normalizes an image. mean -> (maxval-minval)/2; std dev = (maxval+minval)/2;";
04329                 }

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

04317                 {
04318                         return NAME;
04319                 }

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

Definition at line 4321 of file processor.h.

04322                 {
04323                         return new NormalizeMaxMinProcessor();
04324                 }


Member Data Documentation

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

Definition at line 151 of file processor.cpp.


The documentation for this class was generated from the following files:
Generated on Fri Apr 30 15:39:24 2010 for EMAN2 by  doxygen 1.3.9.1