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

static ProcessorNEW ()

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

Detailed Description

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

Definition at line 1002 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 1147 of file processor.cpp.

References highpass.

01148 {
01149         unsigned int c;
01150 
01151 //      for (unsigned int i=0; i<radial_mask.size(); i++) printf("%d\t%f\n",i,radial_mask[i]);
01152         for (c=2; c<radial_mask.size(); c++) if (radial_mask[c-1]<=radial_mask[c]) break;
01153         if (c>highpass) c=(unsigned int)highpass;               // the *2 is for the 2x oversampling
01154 
01155         radial_mask[0]=0.0;
01156 //      for (int i=1; i<radial_mask.size(); i++) radial_mask[i]=(i<=c?radial_mask[c+1]/radial_mask[i]:1.0);
01157         for (unsigned int i=1; i<radial_mask.size(); i++) radial_mask[i]=(i<=c?0.0f:1.0f);
01158 
01159         printf("%f %d\n",highpass,c);
01160 //      for (unsigned int i=0; i<radial_mask.size(); i++) printf("%d\t%f\n",i,radial_mask[i]);
01161 
01162 }

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

01015                 {
01016                         return "Attempts to automatically remove the low resolution peak present in virtually all cryoEM data.";
01017                 }

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

References NAME.

01006                 {
01007                         return NAME;
01008                 }

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

Definition at line 1009 of file processor.h.

01010                 {
01011                         return new HighpassAutoPeakProcessor();
01012                 }

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

Reimplemented from EMAN::FourierAnlProcessor.

Definition at line 1126 of file processor.cpp.

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

01127 {
01128         if(params.has_key("apix")) {
01129                 image->set_attr("apix_x", (float)params["apix"]);
01130                 image->set_attr("apix_y", (float)params["apix"]);
01131                 image->set_attr("apix_z", (float)params["apix"]);
01132         }
01133 
01134         const Dict dict = image->get_attr_dict();
01135 
01136         if( params.has_key("cutoff_abs") ) {
01137                 highpass = params["cutoff_abs"];
01138         }
01139         else if( params.has_key("cutoff_freq") ) {
01140                 highpass = (float)params["cutoff_freq"] * (float)dict["apix_x"] * (float)dict["nx"] / 2.0f;
01141         }
01142         else if( params.has_key("cutoff_pixels") ) {
01143                 highpass = (float)params["cutoff_pixels"] / (float)dict["nx"];
01144         }
01145 }


Member Data Documentation

float EMAN::HighpassAutoPeakProcessor::highpass [protected]

Definition at line 1024 of file processor.h.

Referenced by create_radial_func(), and preprocess().

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

Definition at line 1019 of file processor.h.

Referenced by get_name().


The documentation for this class was generated from the following files:
Generated on Tue May 25 17:16:28 2010 for EMAN2 by  doxygen 1.4.7