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

EMAN::LowpassFourierProcessor Class Reference

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

#include <processor.h>

Inheritance diagram for EMAN::LowpassFourierProcessor:

[legend]
Collaboration diagram for EMAN::LowpassFourierProcessor:
[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

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


Constructor & Destructor Documentation

EMAN::LowpassFourierProcessor::LowpassFourierProcessor  )  [inline]
 

Definition at line 773 of file processor.h.

00773                                          :lowpass(0)
00774                 {
00775                 }


Member Function Documentation

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

00794                 {
00795                         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.";
00796                 }

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

References EMAN::TypeDict::put().

00787                 {
00788                         TypeDict d = FourierProcessor::get_param_types();
00789                         d.put("lowpass", EMObject::FLOAT, "Processor radius in terms of Nyquist (0-.5)");
00790                         return d;
00791                 }

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

Reimplemented from EMAN::FourierProcessor.

Definition at line 680 of file processor.cpp.

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

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

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

00778                 {
00779                         params = new_params;
00780                         if( params.has_key("lowpass") ) {
00781                                 lowpass = params["lowpass"];
00782                         }
00783 //                      printf("%s %f\n",params.keys()[0].c_str(),lowpass);
00784                 }


Member Data Documentation

float EMAN::LowpassFourierProcessor::lowpass [protected]
 

Definition at line 800 of file processor.h.

Referenced by preprocess().


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