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

EMAN::MaskGaussNonuniformProcessor Class Reference

a gaussian falloff to zero, with nonisotropic widths along x,y,z More...

#include <processor.h>

Inheritance diagram for EMAN::MaskGaussNonuniformProcessor:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MaskGaussNonuniformProcessor ()
void set_params (const Dict &new_params)
 Set the processor parameters using a key/value dictionary.
TypeDict get_param_types () const
 Get processor parameter information in a dictionary.
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 = "mask.gaussian.nonuniform"

Protected Member Functions

void process_pixel (float *pixel, int xi, int yi, int zi) const

Protected Attributes

float radius_x
float radius_y
float radius_z
float gauss_width

Detailed Description

a gaussian falloff to zero, with nonisotropic widths along x,y,z

Parameters:
radius_x x-axis radius
radius_y y-axis radius
radius_z z-axis radius
gauss_width Gaussian falloff width, relative to each radius, default 0.05

Definition at line 2625 of file processor.h.


Constructor & Destructor Documentation

EMAN::MaskGaussNonuniformProcessor::MaskGaussNonuniformProcessor  )  [inline]
 

Definition at line 2628 of file processor.h.

02628                                               :radius_x(0), radius_y(0), radius_z(0), gauss_width(0)
02629                 {
02630                 }


Member Function Documentation

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

02671                 {
02672                         return "A Gaussian falloff to zero. Nonisotropic, specify inner radius for x,y,z and Gaussian falloff width. Falloff \
02673 width is also nonisotropic and relative to the radii, with 1 being equal to the radius on that axis.";
02674                 }

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

02662                 {
02663                         return NAME;
02664                 }

TypeDict EMAN::MaskGaussNonuniformProcessor::get_param_types  )  const [inline, virtual]
 

Get processor parameter information in a dictionary.

Each parameter has one record in the dictionary. Each record contains its name, data-type, and description.

Returns:
A dictionary containing the parameter info.

Reimplemented from EMAN::Processor.

Definition at line 2649 of file processor.h.

References EMAN::TypeDict::put().

02650                 {
02651                         TypeDict d;
02652 
02653                         d.put("radius_x", EMObject::INT, "x-axis radius");
02654                         d.put("radius_y", EMObject::INT, "y-axis radius");
02655                         d.put("radius_z", EMObject::INT, "z-axis radius");
02656                         d.put("gauss_width", EMObject::FLOAT, "Gaussian falloff width, relative to each radius, default 0.05");
02657 
02658                         return d;
02659                 }

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

Definition at line 2665 of file processor.h.

02666                 {
02667                         return new MaskGaussNonuniformProcessor();
02668                 }

void EMAN::MaskGaussNonuniformProcessor::process_pixel float *  pixel,
int  xi,
int  yi,
int  zi
const [inline, protected, virtual]
 

Implements EMAN::CoordinateProcessor.

Definition at line 2679 of file processor.h.

References dist(), nx, ny, and sqrt().

02680                 {
02681                         float dist = pow((xi - nx/2)/radius_x,2.0f) + pow((yi - ny/2)/radius_y,2.0f) + pow((zi - nz/2)/radius_z,2.0f);
02682                         if (dist>1.0) (*pixel)*=exp(-pow((sqrt(dist)-1.0f)/gauss_width,2.0f));
02683                 }

void EMAN::MaskGaussNonuniformProcessor::set_params const Dict new_params  )  [inline, virtual]
 

Set the processor parameters using a key/value dictionary.

Parameters:
new_params A dictionary containing the new parameters.

Reimplemented from EMAN::Processor.

Definition at line 2632 of file processor.h.

02633                 {
02634                         params = new_params;
02635 
02636                         if (params.has_key("radius_x")) radius_x=params["radius_x"];
02637                         else radius_x=5.0;
02638 
02639                         if (params.has_key("radius_y")) radius_y=params["radius_y"];
02640                         else radius_y=5.0;
02641 
02642                         if (params.has_key("radius_z")) radius_z=params["radius_z"];
02643                         else radius_z=5.0;
02644 
02645                         if (params.has_key("gauss_width")) gauss_width=params["gauss_width"];
02646                         else gauss_width=0.05f;
02647                 }


Member Data Documentation

float EMAN::MaskGaussNonuniformProcessor::gauss_width [protected]
 

Definition at line 2685 of file processor.h.

const string MaskGaussNonuniformProcessor::NAME = "mask.gaussian.nonuniform" [static]
 

Definition at line 108 of file processor.cpp.

float EMAN::MaskGaussNonuniformProcessor::radius_x [protected]
 

Definition at line 2685 of file processor.h.

float EMAN::MaskGaussNonuniformProcessor::radius_y [protected]
 

Definition at line 2685 of file processor.h.

float EMAN::MaskGaussNonuniformProcessor::radius_z [protected]
 

Definition at line 2685 of file processor.h.


The documentation for this class was generated from the following files:
Generated on Tue Jun 11 13:48:36 2013 for EMAN2 by  doxygen 1.3.9.1