EMAN2
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions
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

static ProcessorNEW ()

Static Public Attributes

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


Member Function Documentation

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

Implements EMAN::NormalizeProcessor.

Definition at line 3894 of file processor.cpp.

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

{
        if (!image) {
                LOGWARN("NULL Image");
                return 0;
        }
        float maxval = image->get_attr("maximum");
        float minval = image->get_attr("minimum");
        return (maxval - minval) / 2;
}
float NormalizeMaxMinProcessor::calc_sigma ( EMData image) const [protected, virtual]

Reimplemented from EMAN::NormalizeProcessor.

Definition at line 3883 of file processor.cpp.

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

{
        if (!image) {
                LOGWARN("NULL Image");
                return 0;
        }
        float maxval = image->get_attr("maximum");
        float minval = image->get_attr("minimum");
        return (maxval + minval) / 2;
}
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 4609 of file processor.h.

                {
                        return "normalizes an image. mean -> (maxval-minval)/2; std dev = (maxval+minval)/2;";
                }
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 4599 of file processor.h.

References NAME.

                {
                        return NAME;
                }
static Processor* EMAN::NormalizeMaxMinProcessor::NEW ( ) [inline, static]

Definition at line 4604 of file processor.h.

                {
                        return new NormalizeMaxMinProcessor();
                }

Member Data Documentation

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

Definition at line 4614 of file processor.h.

Referenced by get_name().


The documentation for this class was generated from the following files: