EMAN2
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
EMAN::Wiener2DAutoAreaProcessor Class Reference

Automatically determines the background for the image then uses this to perform Wiener filters on overlapping subregions of the image, which are then combined using linear interpolation. More...

#include <processor.h>

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

Public Member Functions

string get_name () const
 Get the processor's name. More...
 
virtual EMDataprocess (const EMData *const image)
 To proccess an image out-of-place. More...
 
void process_inplace (EMData *image)
 To process an image in-place. More...
 
void set_params (const Dict &new_params)
 Set the processor parameters using a key/value dictionary. More...
 
TypeDict get_param_types () const
 Get processor parameter information in a dictionary. More...
 
string get_desc () const
 Get the descrition of this specific processor. More...
 
- Public Member Functions inherited from EMAN::Processor
virtual ~Processor ()
 
virtual void process_list_inplace (vector< EMData * > &images)
 To process multiple images using the same algorithm. More...
 
virtual Dict get_params () const
 Get the processor parameters in a key/value dictionary. More...
 

Static Public Member Functions

static ProcessorNEW ()
 
- Static Public Member Functions inherited from EMAN::Processor
static string get_group_desc ()
 Get the description of this group of processors. More...
 
static void EMFourierFilterInPlace (EMData *fimage, Dict params)
 Compute a Fourier-filter processed image in place. More...
 
static EMDataEMFourierFilter (EMData *fimage, Dict params)
 Compute a Fourier-processor processed image without altering the original image. More...
 

Static Public Attributes

static const string NAME = "filter.wiener2dauto"
 

Protected Attributes

int bgsize
 
- Protected Attributes inherited from EMAN::Processor
Dict params
 

Additional Inherited Members

- Public Types inherited from EMAN::Processor
enum  fourier_filter_types {
  TOP_HAT_LOW_PASS , TOP_HAT_HIGH_PASS , TOP_HAT_BAND_PASS , TOP_HOMOMORPHIC ,
  GAUSS_LOW_PASS , GAUSS_HIGH_PASS , GAUSS_BAND_PASS , GAUSS_INVERSE ,
  GAUSS_HOMOMORPHIC , BUTTERWORTH_LOW_PASS , BUTTERWORTH_HIGH_PASS , BUTTERWORTH_HOMOMORPHIC ,
  KAISER_I0 , KAISER_SINH , KAISER_I0_INVERSE , KAISER_SINH_INVERSE ,
  SHIFT , TANH_LOW_PASS , TANH_HIGH_PASS , TANH_HOMOMORPHIC ,
  TANH_BAND_PASS , RADIAL_TABLE , CTF_
}
 Fourier filter Processor type enum. More...
 

Detailed Description

Automatically determines the background for the image then uses this to perform Wiener filters on overlapping subregions of the image, which are then combined using linear interpolation.

Parameters
size[in]size in pixels of the boxes to chop the image into during processing
Author
Steve Ludtke
Date
2007/11/06

Definition at line 1612 of file processor.h.

Member Function Documentation

◆ get_desc()

string EMAN::Wiener2DAutoAreaProcessor::get_desc ( ) const
inlinevirtual

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

1644 {
1645 return "Automatically detrmines the background for the image then uses this to perform Wiener filters on overlapping subregions of the image, which are then combined using linear interpolation";
1646 }

◆ get_name()

string EMAN::Wiener2DAutoAreaProcessor::get_name ( ) const
inlinevirtual

Get the processor's name.

Each processor is identified by a unique name.

Returns
The processor's name.

Implements EMAN::Processor.

Definition at line 1615 of file processor.h.

1616 {
1617 return NAME;
1618 }
static const string NAME
Definition: processor.h:1648

References NAME.

◆ get_param_types()

TypeDict EMAN::Wiener2DAutoAreaProcessor::get_param_types ( ) const
inlinevirtual

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

1632 {
1633 TypeDict d;
1634 d.put("size", EMObject::INT, "Size in pixels of the boxes to chop the image into");
1635 return d;
1636 }
TypeDict is a dictionary to store <string, EMObject::ObjectType> pair.
Definition: emobject.h:305
void put(const string &key, EMObject::ObjectType o, const string &desc="")
Definition: emobject.h:330

References EMAN::EMObject::INT, and EMAN::TypeDict::put().

◆ NEW()

static Processor * EMAN::Wiener2DAutoAreaProcessor::NEW ( )
inlinestatic

Definition at line 1638 of file processor.h.

1639 {
1640 return new Wiener2DAutoAreaProcessor();
1641 }
Automatically determines the background for the image then uses this to perform Wiener filters on ove...
Definition: processor.h:1613

◆ process()

EMData * Wiener2DAutoAreaProcessor::process ( const EMData *const  image)
virtual

To proccess an image out-of-place.

For those processors which can only be processed out-of-place, override this function to give the right behavior.

Parameters
imageThe image will be copied, actual process happen on copy of image.
Returns
the image processing result, may or may not be the same size of the input image

Reimplemented from EMAN::Processor.

Definition at line 1955 of file processor.cpp.

1956{
1957// TODO NOT IMPLEMENTED YET !!!
1958 EMData *ret = 0;
1959 const EMData *fft;
1960// float *fftd;
1961// int f=0;
1962
1963 if (!image) {
1964 LOGWARN("NULL Image");
1965 return ret;
1966 }
1967 throw NullPointerException("Processor not yet implemented");
1968
1969// if (!image->is_complex()) {
1970// fft = image->do_fft();
1971// fftd = fft->get_data();
1972// f=1;
1973// }
1974// else {
1975// fft=image;
1976// fftd=image->get_data();
1977// }
1978
1979 return ret;
1980}
EMData stores an image's data and defines core image processing routines.
Definition: emdata.h:82
#define NullPointerException(desc)
Definition: exception.h:241
#define LOGWARN
Definition: log.h:53

References LOGWARN, and NullPointerException.

Referenced by process_inplace().

◆ process_inplace()

void Wiener2DAutoAreaProcessor::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
imageThe image to be processed.

Implements EMAN::Processor.

Definition at line 1982 of file processor.cpp.

1982 {
1983 EMData *tmp=process(image);
1984 memcpy(image->get_data(),tmp->get_data(),image->get_xsize()*image->get_ysize()*image->get_zsize()*sizeof(float));
1985 delete tmp;
1986 image->update();
1987 return;
1988}
virtual EMData * process(const EMData *const image)
To proccess an image out-of-place.
Definition: processor.cpp:1955

References process().

◆ set_params()

void EMAN::Wiener2DAutoAreaProcessor::set_params ( const Dict new_params)
inlinevirtual

Set the processor parameters using a key/value dictionary.

Parameters
new_paramsA dictionary containing the new parameters.

Reimplemented from EMAN::Processor.

Definition at line 1624 of file processor.h.

1625 {
1626 params = new_params;
1627 bgsize = params["size"];
1628// printf("%s %f\n",params.keys()[0].c_str(),lowpass);
1629 }

References bgsize, and EMAN::Processor::params.

Member Data Documentation

◆ bgsize

int EMAN::Wiener2DAutoAreaProcessor::bgsize
protected

Definition at line 1651 of file processor.h.

Referenced by set_params().

◆ NAME

const string Wiener2DAutoAreaProcessor::NAME = "filter.wiener2dauto"
static

Definition at line 1648 of file processor.h.

Referenced by get_name().


The documentation for this class was generated from the following files: