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

EMAN::SetSFProcessor Class Reference

Sets the structure factor based on a 1D s/intensity curve as an XYData object. More...

#include <processor.h>

Inheritance diagram for EMAN::SetSFProcessor:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual string get_name () const
 Get the processor's name.
virtual string get_desc () const
 Get the descrition of this specific processor.
virtual TypeDict get_param_types () const
 Get processor parameter information in a dictionary.

Static Public Member Functions

ProcessorNEW ()

Static Public Attributes

const string NAME = "filter.setstrucfac"

Protected Member Functions

void create_radial_func (vector< float > &radial_mask, EMData *image) const

Detailed Description

Sets the structure factor based on a 1D s/intensity curve as an XYData object.

Parameters:
strucfac XYData object with the curve to be imposed as intensity as a function of s
apix A/pix value. Overrides and replaces apix_x/y/z in image

Definition at line 5488 of file processor.h.


Member Function Documentation

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

Implements EMAN::FourierAnlProcessor.

Definition at line 6049 of file processor.cpp.

References EMAN::EMData::get_attr(), EMAN::XYData::get_yatx(), EMAN::Dict::has_key(), EMAN::EMData::set_attr(), and sqrt().

06049                                                                                         {
06050         // The radial mask comes in with the existing radial image profile
06051         // The radial mask runs from 0 to the 1-D Nyquist (it leaves out the corners in Fourier space)
06052 
06053         XYData *sf = params["strucfac"];
06054         if(params.has_key("apix")) {
06055                 image->set_attr("apix_x", (float)params["apix"]);
06056                 image->set_attr("apix_y", (float)params["apix"]);
06057                 image->set_attr("apix_z", (float)params["apix"]);
06058         }
06059 
06060         float apix=image->get_attr("apix_x");
06061 
06062         int n = radial_mask.size();
06063         for (int i=0; i<n; i++) {
06064                 if (radial_mask[i]>0) radial_mask[i]= n*n*n*sqrt(sf->get_yatx(i/(apix*2.0f*n),false)/radial_mask[i]);
06065                 else if (i>0) radial_mask[i]=radial_mask[i-1];
06066         }
06067 
06068 }

virtual string EMAN::SetSFProcessor::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 5497 of file processor.h.

05498                 {
05499                         return "Filters the image so its 1-D power spectrum matches a supplied X-Y curve";
05500                 }

virtual string EMAN::SetSFProcessor::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 5492 of file processor.h.

05493                 {
05494                         return NAME;
05495                 }

virtual TypeDict EMAN::SetSFProcessor::get_param_types  )  const [inline, virtual]
 

Get processor parameter information in a dictionary.

Each parameter has one record in the dictionary. Each record contains its name, data-type, and description.

Returns:
A dictionary containing the parameter info.

Reimplemented from EMAN::FourierAnlProcessor.

Definition at line 5507 of file processor.h.

References EMAN::TypeDict::put().

05508                 {
05509                         TypeDict d;
05510                         d.put("strucfac", EMObject::XYDATA, "An XYData object contaning the curve to be imposed as a function of S");
05511                         d.put("apix", EMObject::FLOAT, " Override A/pix in the image header (changes x,y and z)");
05512                         return d;
05513                 }

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

Definition at line 5502 of file processor.h.

05503                 {
05504                         return new SetSFProcessor();
05505                 }


Member Data Documentation

const string SetSFProcessor::NAME = "filter.setstrucfac" [static]
 

Definition at line 182 of file processor.cpp.


The documentation for this class was generated from the following files:
Generated on Thu Dec 9 13:48:17 2010 for EMAN2 by  doxygen 1.3.9.1