#include <processor_sparx.h>
Inheritance diagram for EMAN::NewLowpassGaussProcessor:
Public Member Functions | |
string | get_name () const |
Get the processor's name. | |
string | get_desc () const |
Get the descrition of this specific processor. | |
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 | |
static Processor * | NEW () |
Static Public Attributes | |
static const string | NAME = "filter.lowpass.gauss" |
cutoff_abs | Gaussian sigma. |
Definition at line 304 of file processor_sparx.h.
string EMAN::NewLowpassGaussProcessor::get_desc | ( | ) | const [inline, virtual] |
Get the descrition of this specific processor.
This function must be overwritten by a subclass.
Implements EMAN::Processor.
Definition at line 311 of file processor_sparx.h.
string EMAN::NewLowpassGaussProcessor::get_name | ( | ) | const [inline, virtual] |
Get the processor's name.
Each processor is identified by a unique name.
Implements EMAN::Processor.
Definition at line 307 of file processor_sparx.h.
References NAME.
00308 { return NAME; }
TypeDict EMAN::NewLowpassGaussProcessor::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.
Reimplemented from EMAN::NewFourierProcessor.
Definition at line 332 of file processor_sparx.h.
References EMAN::EMObject::FLOAT, EMAN::NewFourierProcessor::get_param_types(), and EMAN::TypeDict::put().
00333 { 00334 TypeDict d = NewFourierProcessor::get_param_types(); 00335 d.put("cutoff_resolv", EMObject::FLOAT, "Resolvibility in 1/A, applied using filter.lowpass.gauss where cutoff_freq = sqrt(-4ln(0.36)/pi^2R^2) & R = 1/cf*apix"); 00336 return d; 00337 }
static Processor* EMAN::NewLowpassGaussProcessor::NEW | ( | ) | [inline, static] |
void EMAN::NewLowpassGaussProcessor::process_inplace | ( | EMData * | image | ) | [inline, 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.
image | The image to be processed. |
Implements EMAN::Processor.
Definition at line 315 of file processor_sparx.h.
References EMAN::Processor::EMFourierFilterInPlace(), EMAN::Processor::GAUSS_LOW_PASS, EMAN::EMData::get_attr_dict(), EMAN::Dict::has_key(), log(), EMAN::Processor::params, EMAN::NewFourierProcessor::preprocessandconvertpars(), R, and sqrt().
00315 { 00316 params["filter_type"] = GAUSS_LOW_PASS; 00317 preprocessandconvertpars(image); 00318 00319 if(params.has_key("cutoff_resolv")){ 00320 00321 const Dict dict = image->get_attr_dict(); 00322 00323 // here I have added a little function to filter to a resolvability (John Flanagan 20/09/2010) 00324 float R = 1/((float)params["cutoff_resolv"]*(float)dict["apix_x"]); // convert to pixels 00325 float rsigma = sqrt((-4*log(0.36f))/(pow(M_PI,2)*pow(R,2))); // find optimal sigma 00326 params["cutoff_abs"] = rsigma / sqrt(2.0f); // patch to fix the 2s^2 problem 00327 params["sigma"] = rsigma / sqrt(2.0f); // patch to fix the 2s^2 problem 00328 } 00329 00330 EMFourierFilterInPlace(image, params); 00331 }
const string NewLowpassGaussProcessor::NAME = "filter.lowpass.gauss" [static] |