#include <processor.h>
Inheritance diagram for EMAN::HighpassAutoPeakProcessor:
Public Member Functions | |
string | get_name () const |
Get the processor's name. | |
string | get_desc () const |
Get the descrition of this specific processor. | |
Static Public Member Functions | |
static Processor * | NEW () |
Static Public Attributes | |
static const string | NAME = "filter.highpass.autopeak" |
Protected Member Functions | |
void | create_radial_func (vector< float > &radial_mask, EMData *image) const |
virtual void | preprocess (EMData *image) |
Protected Attributes | |
float | highpass |
Definition at line 1042 of file processor.h.
void HighpassAutoPeakProcessor::create_radial_func | ( | vector< float > & | radial_mask, | |
EMData * | image | |||
) | const [protected, virtual] |
Implements EMAN::FourierAnlProcessor.
Definition at line 1254 of file processor.cpp.
References highpass.
01255 { 01256 unsigned int c; 01257 01258 // for (unsigned int i=0; i<radial_mask.size(); i++) printf("%d\t%f\n",i,radial_mask[i]); 01259 for (c=2; c<radial_mask.size(); c++) if (radial_mask[c-1]<=radial_mask[c]) break; 01260 if (c>highpass) c=(unsigned int)highpass; // the *2 is for the 2x oversampling 01261 01262 radial_mask[0]=0.0; 01263 // for (int i=1; i<radial_mask.size(); i++) radial_mask[i]=(i<=c?radial_mask[c+1]/radial_mask[i]:1.0); 01264 for (unsigned int i=1; i<radial_mask.size(); i++) radial_mask[i]=(i<=c?0.0f:1.0f); 01265 01266 printf("%f %d\n",highpass,c); 01267 // for (unsigned int i=0; i<radial_mask.size(); i++) printf("%d\t%f\n",i,radial_mask[i]); 01268 01269 }
string EMAN::HighpassAutoPeakProcessor::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 1054 of file processor.h.
01055 { 01056 return "Attempts to automatically remove the low resolution peak present in virtually all cryoEM data."; 01057 }
string EMAN::HighpassAutoPeakProcessor::get_name | ( | ) | const [inline, virtual] |
Get the processor's name.
Each processor is identified by a unique name.
Implements EMAN::Processor.
Definition at line 1045 of file processor.h.
References NAME.
01046 { 01047 return NAME; 01048 }
static Processor* EMAN::HighpassAutoPeakProcessor::NEW | ( | ) | [inline, static] |
Definition at line 1049 of file processor.h.
01050 { 01051 return new HighpassAutoPeakProcessor(); 01052 }
void HighpassAutoPeakProcessor::preprocess | ( | EMData * | image | ) | [protected, virtual] |
Reimplemented from EMAN::FourierAnlProcessor.
Definition at line 1233 of file processor.cpp.
References EMAN::EMData::get_attr_dict(), EMAN::Dict::has_key(), highpass, EMAN::Processor::params, and EMAN::EMData::set_attr().
01234 { 01235 if(params.has_key("apix")) { 01236 image->set_attr("apix_x", (float)params["apix"]); 01237 image->set_attr("apix_y", (float)params["apix"]); 01238 image->set_attr("apix_z", (float)params["apix"]); 01239 } 01240 01241 const Dict dict = image->get_attr_dict(); 01242 01243 if( params.has_key("cutoff_abs") ) { 01244 highpass = params["cutoff_abs"]; 01245 } 01246 else if( params.has_key("cutoff_freq") ) { 01247 highpass = (float)params["cutoff_freq"] * (float)dict["apix_x"] * (float)dict["nx"] / 2.0f; 01248 } 01249 else if( params.has_key("cutoff_pixels") ) { 01250 highpass = (float)params["cutoff_pixels"] / (float)dict["nx"]; 01251 } 01252 }
float EMAN::HighpassAutoPeakProcessor::highpass [protected] |
const string HighpassAutoPeakProcessor::NAME = "filter.highpass.autopeak" [static] |