EMAN::LowpassFourierProcessor Class Reference

Low-pass processor attenuates amplitudes at high spatial frequencies. More...

#include <processor.h>

Inheritance diagram for EMAN::LowpassFourierProcessor:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LowpassFourierProcessor ()
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.

Static Public Member Functions

static string get_group_desc ()
 Get the description of this group of processors.

Protected Member Functions

virtual void preprocess (EMData *image)

Protected Attributes

float lowpass

Detailed Description

Low-pass processor attenuates amplitudes at high spatial frequencies.

It has the result of blurring the image, and of eliminating sharp edges and noise. The base class for all low pass fourier processors.

Parameters:
lowpass Processor radius in terms of Nyquist (0-.5)

Definition at line 810 of file processor.h.


Constructor & Destructor Documentation

EMAN::LowpassFourierProcessor::LowpassFourierProcessor (  )  [inline]

Definition at line 813 of file processor.h.

00813                                          :lowpass(0)
00814                 {
00815                 }


Member Function Documentation

static string EMAN::LowpassFourierProcessor::get_group_desc (  )  [inline, static]

Get the description of this group of processors.

This function is defined in a parent class. It gives a introduction to a group of processors.

Returns:
The description of this group of processors.

Reimplemented from EMAN::FourierProcessor.

Definition at line 833 of file processor.h.

00834                 {
00835                         return "Low-pass processor attenuates amplitudes at high spatial frequencies. It has the result of blurring the image, and of eliminating sharp edges and noise. The base class for all low pass fourier processors.";
00836                 }

TypeDict EMAN::LowpassFourierProcessor::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::FourierProcessor.

Definition at line 826 of file processor.h.

References EMAN::EMObject::FLOAT, EMAN::FourierProcessor::get_param_types(), and EMAN::TypeDict::put().

00827                 {
00828                         TypeDict d = FourierProcessor::get_param_types();
00829                         d.put("lowpass", EMObject::FLOAT, "Processor radius in terms of Nyquist (0-.5)");
00830                         return d;
00831                 }

void LowpassFourierProcessor::preprocess ( EMData image  )  [protected, virtual]

Reimplemented from EMAN::FourierProcessor.

Definition at line 682 of file processor.cpp.

References EMAN::EMData::get_attr_dict(), EMAN::Dict::has_key(), lowpass, EMAN::Processor::params, and EMAN::EMData::set_attr().

00683 {
00684         if(params.has_key("apix")) {
00685                 image->set_attr("apix_x", (float)params["apix"]);
00686                 image->set_attr("apix_y", (float)params["apix"]);
00687                 image->set_attr("apix_z", (float)params["apix"]);
00688         }
00689 
00690         const Dict dict = image->get_attr_dict();
00691 
00692         if( params.has_key("cutoff_abs") ) {
00693                 lowpass = params["cutoff_abs"];
00694         }
00695         else if( params.has_key("cutoff_freq") ) {
00696                 lowpass = (float)params["cutoff_freq"] * (float)dict["apix_x"] * (float)dict["nx"] / 2.0f;
00697         }
00698         else if( params.has_key("cutoff_pixels") ) {
00699                 lowpass = (float)params["cutoff_pixels"] / (float)dict["nx"];
00700         }
00701 }

void EMAN::LowpassFourierProcessor::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 817 of file processor.h.

References EMAN::Dict::has_key(), lowpass, and EMAN::Processor::params.

00818                 {
00819                         params = new_params;
00820                         if( params.has_key("lowpass") ) {
00821                                 lowpass = params["lowpass"];
00822                         }
00823 //                      printf("%s %f\n",params.keys()[0].c_str(),lowpass);
00824                 }


Member Data Documentation

float EMAN::LowpassFourierProcessor::lowpass [protected]

Definition at line 840 of file processor.h.

Referenced by EMAN::LowpassTanhProcessor::create_radial_func(), EMAN::LowpassGaussProcessor::create_radial_func(), EMAN::LowpassSharpCutoffProcessor::create_radial_func(), preprocess(), and set_params().


The documentation for this class was generated from the following files:
Generated on Mon Jul 19 12:42:59 2010 for EMAN2 by  doxygen 1.4.7