EMAN2
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes
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 1045 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 1402 of file processor.cpp.

References highpass.

{
        unsigned int c;

//      for (unsigned int i=0; i<radial_mask.size(); i++) printf("%d\t%f\n",i,radial_mask[i]);
        for (c=2; c<radial_mask.size(); c++) if (radial_mask[c-1]<=radial_mask[c]) break;
        if (c>highpass) c=(unsigned int)highpass;               // the *2 is for the 2x oversampling

        radial_mask[0]=0.0;
//      for (int i=1; i<radial_mask.size(); i++) radial_mask[i]=(i<=c?radial_mask[c+1]/radial_mask[i]:1.0);
        for (unsigned int i=1; i<radial_mask.size(); i++) radial_mask[i]=(i<=c?0.0f:1.0f);

        printf("%f %d\n",highpass,c);
//      for (unsigned int i=0; i<radial_mask.size(); i++) printf("%d\t%f\n",i,radial_mask[i]);

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

                {
                        return "Attempts to automatically remove the low resolution peak present in virtually all cryoEM data.";
                }
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 1048 of file processor.h.

References NAME.

                {
                        return NAME;
                }
static Processor* EMAN::HighpassAutoPeakProcessor::NEW ( ) [inline, static]

Definition at line 1052 of file processor.h.

                {
                        return new HighpassAutoPeakProcessor();
                }
void HighpassAutoPeakProcessor::preprocess ( EMData image) [protected, virtual]

Reimplemented from EMAN::FourierAnlProcessor.

Definition at line 1381 of file processor.cpp.

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

{
        if(params.has_key("apix")) {
                image->set_attr("apix_x", (float)params["apix"]);
                image->set_attr("apix_y", (float)params["apix"]);
                image->set_attr("apix_z", (float)params["apix"]);
        }

        const Dict dict = image->get_attr_dict();

        if( params.has_key("cutoff_abs") ) {
                highpass = params["cutoff_abs"];
        }
        else if( params.has_key("cutoff_freq") ) {
                highpass = (float)params["cutoff_freq"] * (float)dict["apix_x"] * (float)dict["nx"] / 2.0f;
        }
        else if( params.has_key("cutoff_pixels") ) {
                highpass = (float)params["cutoff_pixels"] / (float)dict["nx"];
        }
}

Member Data Documentation

Definition at line 1067 of file processor.h.

Referenced by create_radial_func(), and preprocess().

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

Definition at line 1062 of file processor.h.

Referenced by get_name().


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