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

EMAN::FourierAnlProcessor Class Reference

Same as FourierProcessor, except first computes the current image radial power spectrum and passes it to the processor (no radial oversampling, number of elements = radius). More...

#include <processor.h>

Inheritance diagram for EMAN::FourierAnlProcessor:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

void process_inplace (EMData *image)
 To process an image in-place.
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 *)
virtual void create_radial_func (vector< float > &radial_mask, EMData *image) const =0

Detailed Description

Same as FourierProcessor, except first computes the current image radial power spectrum and passes it to the processor (no radial oversampling, number of elements = radius).

Parameters:
cutoff_abs Processor radius in terms of Nyquist (0-.5).
cutoff_pixels Width in Fourier pixels (0 - size()/2).
cutoff_freq Resolution in 1/A (0 - 1 / size*apix).
apix Override A/pix in the image header (changes x,y and z).

Definition at line 393 of file processor.h.


Member Function Documentation

virtual void EMAN::FourierAnlProcessor::create_radial_func vector< float > &  radial_mask,
EMData image
const [protected, pure virtual]
 

Implemented in EMAN::LowpassAutoBProcessor, EMAN::HighpassAutoPeakProcessor, EMAN::MatchSFProcessor, and EMAN::SetSFProcessor.

Referenced by process_inplace().

string EMAN::FourierAnlProcessor::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::Processor.

Definition at line 398 of file processor.h.

00399                 {
00400                         return "Fourier Filter processors are a group of processor in the frequency domain. Before using such processors on an image, the image must be transformed from real space to the fourier space. FourierProcessor class is the base class of fourier space processors. Each specific processor is either a lowpass filter processor, or a highpass filter processor, or neighter. The unit of lowpass and highpass parameters are in terms of Nyquist, valid range is [0,0.5]. ";
00401                 }

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

Reimplemented in EMAN::LowpassAutoBProcessor, EMAN::MatchSFProcessor, and EMAN::SetSFProcessor.

Definition at line 403 of file processor.h.

References EMAN::TypeDict::put().

00404                 {
00405                         TypeDict d;
00406                         d.put("cutoff_abs", EMObject::FLOAT, "Processor radius in terms of Nyquist (0-.5)");
00407                         d.put("cutoff_pixels", EMObject::FLOAT, " Width in Fourier pixels (0 - size()/2)");
00408                         d.put("cutoff_freq", EMObject::FLOAT, "1/Resolution in 1/A (0 - 1 / 2*apix). eg - a 20 A filter is cutoff_freq=0.05");
00409                         d.put("apix", EMObject::FLOAT, " Override A/pix in the image header (changes x,y and z)");
00410                         return d;
00411                 }

virtual void EMAN::FourierAnlProcessor::preprocess EMData  )  [inline, protected, virtual]
 

Reimplemented in EMAN::LowpassAutoBProcessor, and EMAN::HighpassAutoPeakProcessor.

Definition at line 414 of file processor.h.

Referenced by process_inplace().

00414 {}

void FourierAnlProcessor::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 590 of file processor.cpp.

References EMAN::EMData::apply_radial_func(), EMAN::EMData::calc_radial_dist(), create_radial_func(), EMAN::EMData::do_fft(), EMAN::EMData::do_ift(), EMAN::EMData::get_data(), EMAN::EMData::get_xsize(), EMAN::EMData::get_ysize(), EMAN::EMData::get_zsize(), EMAN::EMData::is_complex(), LOGWARN, preprocess(), and EMAN::EMData::update().

00591 {
00592         if (!image) {
00593                 LOGWARN("NULL Image");
00594                 return;
00595         }
00596 
00597         preprocess(image);
00598 
00599 //      int array_size = FFTRADIALOVERSAMPLE * image->get_ysize();
00600 //      float step=0.5f/array_size;
00601 //
00602 //      vector < float >yarray(array_size);
00603 
00604 
00605         if (image->is_complex()) {
00606                 vector <float>yarray = image->calc_radial_dist(image->get_ysize()/2,0,1.0,1);
00607                 create_radial_func(yarray,image);
00608                 image->apply_radial_func(0, 0.5f/yarray.size(), yarray);
00609         }
00610         else {
00611                 EMData *fft = image->do_fft();
00612                 vector <float>yarray = fft->calc_radial_dist(fft->get_ysize()/2,0,1.0,1);
00613                 create_radial_func(yarray,image);
00614                 fft->apply_radial_func(0, 0.5f/yarray.size(), yarray,0);                // 4/30/10 stevel turned off interpolation to fix problem with matched filter
00615                 EMData *ift = fft->do_ift();
00616 
00617                 memcpy(image->get_data(),ift->get_data(),ift->get_xsize()*ift->get_ysize()*ift->get_zsize()*sizeof(float));
00618 
00619                 //ift->update(); Unecessary
00620 
00621                 delete fft;
00622                 delete ift;
00623 
00624         }
00625 
00626         image->update();
00627 }


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