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

EMAN::NormalizeRampNormVar Class Reference

Normalize the image whilst also removing any ramps. More...

#include <processor.h>

Inheritance diagram for EMAN::NormalizeRampNormVar:

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

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.
void process_inplace (EMData *image)
 To process an image in-place.

Static Public Member Functions

static ProcessorNEW ()

Static Public Attributes

static const string NAME = "normalize.ramp.normvar"

Detailed Description

Normalize the image whilst also removing any ramps.

Ramps are removed first, then mean and sigma becomes 0 and 1 respectively This is essential Pawel Penczek's preferred method of particle normalization

Author:
David Woolford
Date:
Mid 2008

Definition at line 4209 of file processor.h.


Member Function Documentation

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

04223                         {
04224                                 return "First call filter.ramp on the image, then make the mean 0 and norm 1";
04225                         }

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

References NAME.

04213                         {
04214                                 return NAME;
04215                         }

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

Definition at line 4217 of file processor.h.

04218                         {
04219                                 return new NormalizeRampNormVar();
04220                         }

void NormalizeRampNormVar::process_inplace EMData image  )  [virtual]
 

To process an image in-place.

For those processors which can only be processed out-of-place, override this function to just print out some error message to remind user call the out-of-place version.

Parameters:
image The image to be processed.

Implements EMAN::Processor.

Definition at line 3616 of file processor.cpp.

References EMAN::EMData::add(), EMAN::EMData::get_xsize(), infomask(), EMAN::EMData::is_complex(), LOGWARN, EMAN::EMData::mult(), EMAN::EMData::process_inplace(), and EMAN::EMData::update().

03617 {
03618         if (!image) {
03619                 LOGWARN("cannot do normalization on NULL image");
03620                 return;
03621         }
03622 
03623         if (image->is_complex()) {
03624                 LOGWARN("cannot do normalization on complex image");
03625                 return;
03626         }
03627 
03628         image->process_inplace( "filter.ramp" );
03629         int nx = image->get_xsize();
03630         EMData mask(nx,nx);
03631         mask.process_inplace("testimage.circlesphere", Dict("radius",nx/2-2,"fill",1));
03632 
03633         vector<float> rstls = Util::infomask( image, &mask, false);
03634         image->add((float)-rstls[0]);
03635         image->mult((float)1.0/rstls[1]);
03636         image->update();
03637 }


Member Data Documentation

const string NormalizeRampNormVar::NAME = "normalize.ramp.normvar" [static]
 

Definition at line 4229 of file processor.h.

Referenced by get_name().


The documentation for this class was generated from the following files:
Generated on Mon Jul 19 13:07:02 2010 for EMAN2 by  doxygen 1.4.4