#include <processor.h>
Inheritance diagram for EMAN::Wiener2DAutoAreaProcessor:


Public Member Functions | |
| string | get_name () const |
| Get the processor's name. | |
| virtual EMData * | process (const EMData *const image) |
| To proccess an image out-of-place. | |
| void | process_inplace (EMData *image) |
| To process an image in-place. | |
| 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. | |
| string | get_desc () const |
| Get the descrition of this specific processor. | |
Static Public Member Functions | |
| Processor * | NEW () |
Static Public Attributes | |
| const string | NAME = "filter.wiener2dauto" |
Protected Attributes | |
| int | bgsize |
| size[in] | size in pixels of the boxes to chop the image into during processing |
Definition at line 631 of file processor.h.
|
|
Get the descrition of this specific processor. This function must be overwritten by a subclass.
Implements EMAN::Processor. Definition at line 662 of file processor.h. 00663 {
00664 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";
00665 }
|
|
|
Get the processor's name. Each processor is identified by a unique name.
Implements EMAN::Processor. Definition at line 634 of file processor.h. 00635 {
00636 return NAME;
00637 }
|
|
|
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. Definition at line 650 of file processor.h. References EMAN::TypeDict::put(). 00651 {
00652 TypeDict d;
00653 d.put("size", EMObject::INT, "Size in pixels of the boxes to chop the image into");
00654 return d;
00655 }
|
|
|
Definition at line 657 of file processor.h. 00658 {
00659 return new Wiener2DAutoAreaProcessor();
00660 }
|
|
|
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.
Reimplemented from EMAN::Processor. Definition at line 1079 of file processor.cpp. References EMAN::EMData::do_fft(), EMAN::EMData::get_data(), EMAN::EMData::is_complex(), LOGWARN, and NullPointerException. Referenced by process_inplace(). 01080 {
01081 // TODO NOT IMPLEMENTED YET !!!
01082 EMData *ret = 0;
01083 const EMData *fft;
01084 float *fftd;
01085 int f=0;
01086
01087 if (!image) {
01088 LOGWARN("NULL Image");
01089 return ret;
01090 }
01091 throw NullPointerException("Processor not yet implemented");
01092
01093 if (!image->is_complex()) {
01094 fft = image->do_fft();
01095 fftd = fft->get_data();
01096 f=1;
01097 }
01098 else {
01099 fft=image;
01100 fftd=image->get_data();
01101 }
01102
01103 return ret;
01104 }
|
|
|
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 1106 of file processor.cpp. References EMAN::EMData::get_data(), EMAN::EMData::get_xsize(), EMAN::EMData::get_ysize(), EMAN::EMData::get_zsize(), process(), and EMAN::EMData::update(). 01106 {
01107 EMData *tmp=process(image);
01108 memcpy(image->get_data(),tmp->get_data(),image->get_xsize()*image->get_ysize()*image->get_zsize()*sizeof(float));
01109 delete tmp;
01110 image->update();
01111 return;
01112 }
|
|
|
Set the processor parameters using a key/value dictionary.
Reimplemented from EMAN::Processor. Definition at line 643 of file processor.h. 00644 {
00645 params = new_params;
00646 bgsize = params["size"];
00647 // printf("%s %f\n",params.keys()[0].c_str(),lowpass);
00648 }
|
|
|
Definition at line 670 of file processor.h. |
|
|
Definition at line 68 of file processor.cpp. |
1.3.9.1