Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

EMAN::HighpassAutoPeakProcessor Class Reference

This processor attempts to remove the low resolution peak present in all cryoEM data. More...

#include <processor.h>

Inheritance diagram for EMAN::HighpassAutoPeakProcessor:

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

Collaboration graph
[legend]
List of all members.

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

ProcessorNEW ()

Static Public Attributes

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

Detailed Description

This processor attempts to remove the low resolution peak present in all cryoEM data.

Definition at line 993 of file processor.h.


Member Function Documentation

void HighpassAutoPeakProcessor::create_radial_func vector< float > &  radial_mask,
EMData image
const [protected, virtual]
 

Implements EMAN::FourierAnlProcessor.

Definition at line 1241 of file processor.cpp.

References highpass.

01242 {
01243         unsigned int c;
01244 
01245 //      for (unsigned int i=0; i<radial_mask.size(); i++) printf("%d\t%f\n",i,radial_mask[i]);
01246         for (c=2; c<radial_mask.size(); c++) if (radial_mask[c-1]<=radial_mask[c]) break;
01247         if (c>highpass) c=(unsigned int)highpass;               // the *2 is for the 2x oversampling
01248 
01249         radial_mask[0]=0.0;
01250 //      for (int i=1; i<radial_mask.size(); i++) radial_mask[i]=(i<=c?radial_mask[c+1]/radial_mask[i]:1.0);
01251         for (unsigned int i=1; i<radial_mask.size(); i++) radial_mask[i]=(i<=c?0.0f:1.0f);
01252 
01253         printf("%f %d\n",highpass,c);
01254 //      for (unsigned int i=0; i<radial_mask.size(); i++) printf("%d\t%f\n",i,radial_mask[i]);
01255 
01256 }

string EMAN::HighpassAutoPeakProcessor::get_desc  )  const [inline, virtual]
 

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

01006                 {
01007                         return "Attempts to automatically remove the low resolution peak present in virtually all cryoEM data.";
01008                 }

string EMAN::HighpassAutoPeakProcessor::get_name  )  const [inline, virtual]
 

Get the processor's name.

Each processor is identified by a unique name.

Returns:
The processor's name.

Implements EMAN::Processor.

Definition at line 996 of file processor.h.

00997                 {
00998                         return NAME;
00999                 }

Processor* EMAN::HighpassAutoPeakProcessor::NEW  )  [inline, static]
 

Definition at line 1000 of file processor.h.

01001                 {
01002                         return new HighpassAutoPeakProcessor();
01003                 }

void HighpassAutoPeakProcessor::preprocess EMData image  )  [protected, virtual]
 

Reimplemented from EMAN::FourierAnlProcessor.

Definition at line 1220 of file processor.cpp.

References EMAN::EMData::get_attr_dict(), EMAN::Dict::has_key(), highpass, and EMAN::EMData::set_attr().

01221 {
01222         if(params.has_key("apix")) {
01223                 image->set_attr("apix_x", (float)params["apix"]);
01224                 image->set_attr("apix_y", (float)params["apix"]);
01225                 image->set_attr("apix_z", (float)params["apix"]);
01226         }
01227 
01228         const Dict dict = image->get_attr_dict();
01229 
01230         if( params.has_key("cutoff_abs") ) {
01231                 highpass = params["cutoff_abs"];
01232         }
01233         else if( params.has_key("cutoff_freq") ) {
01234                 highpass = (float)params["cutoff_freq"] * (float)dict["apix_x"] * (float)dict["nx"] / 2.0f;
01235         }
01236         else if( params.has_key("cutoff_pixels") ) {
01237                 highpass = (float)params["cutoff_pixels"] / (float)dict["nx"];
01238         }
01239 }


Member Data Documentation

float EMAN::HighpassAutoPeakProcessor::highpass [protected]
 

Definition at line 1015 of file processor.h.

Referenced by create_radial_func(), and preprocess().

const string HighpassAutoPeakProcessor::NAME = "filter.highpass.autopeak" [static]
 

Definition at line 72 of file processor.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Jun 11 13:42:14 2013 for EMAN2 by  doxygen 1.3.9.1