#include <processor.h>
Inheritance diagram for EMAN::FourierProcessor:
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) const =0 |
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 336 of file processor.h.
|
Implemented in EMAN::LinearRampFourierProcessor, and EMAN::LinearRampProcessor. Referenced by process_inplace(). |
|
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.
Reimplemented from EMAN::Processor. Definition at line 341 of file processor.h. 00342 { 00343 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]. "; 00344 }
|
|
Get processor parameter information in a dictionary. Each parameter has one record in the dictionary. Each record contains its name, data-type, and description.
Reimplemented from EMAN::Processor. Reimplemented in EMAN::LinearRampProcessor. Definition at line 346 of file processor.h. References EMAN::TypeDict::put(). 00347 { 00348 TypeDict d; 00349 d.put("cutoff_abs", EMObject::FLOAT, "Processor radius in terms of Nyquist (0-.5)"); 00350 d.put("cutoff_pixels", EMObject::FLOAT, " Width in Fourier pixels (0 - size()/2)"); 00351 d.put("cutoff_freq", EMObject::FLOAT, "Resolution in 1/A (0 - 1 / size*apix)"); 00352 d.put("apix", EMObject::FLOAT, " Override A/pix in the image header (changes x,y and z)"); 00353 return d; 00354 }
|
|
Definition at line 357 of file processor.h. Referenced by process_inplace(). 00357 {}
|
|
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.
Implements EMAN::Processor. Definition at line 533 of file processor.cpp. References EMAN::EMData::apply_radial_func(), create_radial_func(), EMAN::EMData::do_fft(), EMAN::EMData::do_ift(), FFTRADIALOVERSAMPLE, 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(). 00534 { 00535 if (!image) { 00536 LOGWARN("NULL Image"); 00537 return; 00538 } 00539 00540 preprocess(image); 00541 00542 int array_size = FFTRADIALOVERSAMPLE * image->get_ysize(); 00543 float step=0.5f/array_size; 00544 00545 vector < float >yarray(array_size); 00546 00547 create_radial_func(yarray); 00548 00549 if (image->is_complex()) { 00550 image->apply_radial_func(0, step, yarray); 00551 } 00552 else { 00553 EMData *fft = image->do_fft(); 00554 fft->apply_radial_func(0, step, yarray); 00555 EMData *ift = fft->do_ift(); 00556 00557 memcpy(image->get_data(),ift->get_data(),ift->get_xsize()*ift->get_ysize()*ift->get_zsize()*sizeof(float)); 00558 00559 //ift->update(); Unecessary 00560 00561 if( fft ) 00562 { 00563 delete fft; 00564 fft = 0; 00565 } 00566 00567 if( ift ) 00568 { 00569 delete ift; 00570 ift = 0; 00571 } 00572 } 00573 00574 image->update(); 00575 }
|