EMAN2
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all 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]

Public Member Functions

string get_name () const
 Get the processor's name. More...
 
string get_desc () const
 Get the descrition of this specific processor. More...
 
- Public Member Functions inherited from EMAN::FourierAnlProcessor
void process_inplace (EMData *image)
 To process an image in-place. More...
 
TypeDict get_param_types () const
 Get processor parameter information in a dictionary. More...
 
- Public Member Functions inherited from EMAN::Processor
virtual ~Processor ()
 
virtual EMDataprocess (const EMData *const image)
 To proccess an image out-of-place. More...
 
virtual void process_list_inplace (vector< EMData * > &images)
 To process multiple images using the same algorithm. More...
 
virtual Dict get_params () const
 Get the processor parameters in a key/value dictionary. More...
 
virtual void set_params (const Dict &new_params)
 Set the processor parameters using a key/value dictionary. More...
 

Static Public Member Functions

static ProcessorNEW ()
 
- Static Public Member Functions inherited from EMAN::FourierAnlProcessor
static string get_group_desc ()
 
- Static Public Member Functions inherited from EMAN::Processor
static string get_group_desc ()
 Get the description of this group of processors. More...
 
static void EMFourierFilterInPlace (EMData *fimage, Dict params)
 Compute a Fourier-filter processed image in place. More...
 
static EMDataEMFourierFilter (EMData *fimage, Dict params)
 Compute a Fourier-processor processed image without altering the original image. More...
 

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
 
- Protected Attributes inherited from EMAN::Processor
Dict params
 

Additional Inherited Members

- Public Types inherited from EMAN::Processor
enum  fourier_filter_types {
  TOP_HAT_LOW_PASS , TOP_HAT_HIGH_PASS , TOP_HAT_BAND_PASS , TOP_HOMOMORPHIC ,
  GAUSS_LOW_PASS , GAUSS_HIGH_PASS , GAUSS_BAND_PASS , GAUSS_INVERSE ,
  GAUSS_HOMOMORPHIC , BUTTERWORTH_LOW_PASS , BUTTERWORTH_HIGH_PASS , BUTTERWORTH_HOMOMORPHIC ,
  KAISER_I0 , KAISER_SINH , KAISER_I0_INVERSE , KAISER_SINH_INVERSE ,
  SHIFT , TANH_LOW_PASS , TANH_HIGH_PASS , TANH_HOMOMORPHIC ,
  TANH_BAND_PASS , RADIAL_TABLE , CTF_
}
 Fourier filter Processor type enum. More...
 

Detailed Description

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

Definition at line 2005 of file processor.h.

Member Function Documentation

◆ create_radial_func()

void HighpassAutoPeakProcessor::create_radial_func ( vector< float > &  radial_mask,
EMData image 
) const
protectedvirtual

Implements EMAN::FourierAnlProcessor.

Definition at line 2148 of file processor.cpp.

2149{
2150 unsigned int c;
2151
2152// for (unsigned int i=0; i<radial_mask.size(); i++) printf("%d\t%f\n",i,radial_mask[i]);
2153 for (c=2; c<radial_mask.size(); c++) if (radial_mask[c-1]<=radial_mask[c]) break;
2154 if (c>highpass) c=(unsigned int)highpass; // the *2 is for the 2x oversampling
2155
2156 radial_mask[0]=0.0;
2157// for (int i=1; i<radial_mask.size(); i++) radial_mask[i]=(i<=c?radial_mask[c+1]/radial_mask[i]:1.0);
2158 for (unsigned int i=1; i<radial_mask.size(); i++) radial_mask[i]=(i<=c?0.0f:1.0f);
2159
2160 printf("%f %d\n",highpass,c);
2161// for (unsigned int i=0; i<radial_mask.size(); i++) printf("%d\t%f\n",i,radial_mask[i]);
2162
2163}

References highpass.

◆ get_desc()

string EMAN::HighpassAutoPeakProcessor::get_desc ( ) const
inlinevirtual

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

2018 {
2019 return "Attempts to automatically remove the low resolution peak present in virtually all cryoEM data.";
2020 }

◆ get_name()

string EMAN::HighpassAutoPeakProcessor::get_name ( ) const
inlinevirtual

Get the processor's name.

Each processor is identified by a unique name.

Returns
The processor's name.

Implements EMAN::Processor.

Definition at line 2008 of file processor.h.

2009 {
2010 return NAME;
2011 }
static const string NAME
Definition: processor.h:2022

References NAME.

◆ NEW()

static Processor * EMAN::HighpassAutoPeakProcessor::NEW ( )
inlinestatic

Definition at line 2012 of file processor.h.

2013 {
2014 return new HighpassAutoPeakProcessor();
2015 }
This processor attempts to remove the low resolution peak present in all cryoEM data.
Definition: processor.h:2006

◆ preprocess()

void HighpassAutoPeakProcessor::preprocess ( EMData image)
protectedvirtual

Reimplemented from EMAN::FourierAnlProcessor.

Definition at line 2127 of file processor.cpp.

2128{
2129 if(params.has_key("apix")) {
2130 image->set_attr("apix_x", (float)params["apix"]);
2131 image->set_attr("apix_y", (float)params["apix"]);
2132 image->set_attr("apix_z", (float)params["apix"]);
2133 }
2134
2135 const Dict dict = image->get_attr_dict();
2136
2137 if( params.has_key("cutoff_abs") ) {
2138 highpass = params["cutoff_abs"];
2139 }
2140 else if( params.has_key("cutoff_freq") ) {
2141 highpass = (float)params["cutoff_freq"] * (float)dict["apix_x"] * (float)dict["ny"] / 2.0f;
2142 }
2143 else if( params.has_key("cutoff_pixels") ) {
2144 highpass = (float)params["cutoff_pixels"] / (float)dict["nx"];
2145 }
2146}
Dict is a dictionary to store <string, EMObject> pair.
Definition: emobject.h:385
bool has_key(const string &key) const
Ask the Dictionary if it as a particular key.
Definition: emobject.h:511

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

Member Data Documentation

◆ highpass

float EMAN::HighpassAutoPeakProcessor::highpass
protected

Definition at line 2027 of file processor.h.

Referenced by create_radial_func(), and preprocess().

◆ NAME

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

Definition at line 2022 of file processor.h.

Referenced by get_name().


The documentation for this class was generated from the following files: