#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 656 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 687 of file processor.h. 00688 { 00689 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"; 00690 }
|
|
Get the processor's name. Each processor is identified by a unique name.
Implements EMAN::Processor. Definition at line 659 of file processor.h. 00660 {
00661 return NAME;
00662 }
|
|
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 675 of file processor.h. References EMAN::TypeDict::put(). 00676 { 00677 TypeDict d; 00678 d.put("size", EMObject::INT, "Size in pixels of the boxes to chop the image into"); 00679 return d; 00680 }
|
|
Definition at line 682 of file processor.h. 00683 { 00684 return new Wiener2DAutoAreaProcessor(); 00685 }
|
|
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 1048 of file processor.cpp. References EMAN::EMData::do_fft(), EMAN::EMData::get_data(), EMAN::EMData::is_complex(), LOGWARN, and NullPointerException. Referenced by process_inplace(). 01049 { 01050 // TODO NOT IMPLEMENTED YET !!! 01051 EMData *ret = 0; 01052 const EMData *fft; 01053 float *fftd; 01054 int f=0; 01055 01056 if (!image) { 01057 LOGWARN("NULL Image"); 01058 return ret; 01059 } 01060 throw NullPointerException("Processor not yet implemented"); 01061 01062 if (!image->is_complex()) { 01063 fft = image->do_fft(); 01064 fftd = fft->get_data(); 01065 f=1; 01066 } 01067 else { 01068 fft=image; 01069 fftd=image->get_data(); 01070 } 01071 01072 return ret; 01073 }
|
|
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 1075 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(). 01075 { 01076 EMData *tmp=process(image); 01077 memcpy(image->get_data(),tmp->get_data(),image->get_xsize()*image->get_ysize()*image->get_zsize()*sizeof(float)); 01078 delete tmp; 01079 image->update(); 01080 return; 01081 }
|
|
Set the processor parameters using a key/value dictionary.
Reimplemented from EMAN::Processor. Definition at line 668 of file processor.h. 00669 { 00670 params = new_params; 00671 bgsize = params["size"]; 00672 // printf("%s %f\n",params.keys()[0].c_str(),lowpass); 00673 }
|
|
Definition at line 695 of file processor.h. |
|
Definition at line 66 of file processor.cpp. |