EMAN2
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
EMAN::MaskGaussNonuniformProcessor Class Reference

a gaussian falloff to zero, with anisotropic widths along x,y,z More...

#include <processor.h>

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

Public Member Functions

 MaskGaussNonuniformProcessor ()
 
void set_params (const Dict &new_params)
 Set the processor parameters using a key/value dictionary. More...
 
TypeDict get_param_types () const
 Get processor parameter information in a dictionary. More...
 
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::CoordinateProcessor
 CoordinateProcessor ()
 
void process_inplace (EMData *image)
 To process an image in-place. 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...
 

Static Public Member Functions

static ProcessorNEW ()
 
- Static Public Member Functions inherited from EMAN::CoordinateProcessor
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 = "mask.gaussian.nonuniform"
 

Protected Member Functions

void process_pixel (float *pixel, int xi, int yi, int zi) const
 
- Protected Member Functions inherited from EMAN::CoordinateProcessor
virtual void calc_locals (EMData *)
 
virtual bool is_valid () const
 

Protected Attributes

float radius_x
 
float radius_y
 
float radius_z
 
float gauss_width
 
float dx
 
float dy
 
float dz
 
- Protected Attributes inherited from EMAN::CoordinateProcessor
int nx
 
int ny
 
int nz
 
float mean
 
float sigma
 
float maxval
 
bool is_complex
 
- 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

a gaussian falloff to zero, with anisotropic widths along x,y,z

Parameters
radius_xx-axis radius
radius_yy-axis radius
radius_zz-axis radius
gauss_widthGaussian falloff width, relative to each radius, default 0.05

Definition at line 4050 of file processor.h.

Constructor & Destructor Documentation

◆ MaskGaussNonuniformProcessor()

EMAN::MaskGaussNonuniformProcessor::MaskGaussNonuniformProcessor ( )
inline

Member Function Documentation

◆ get_desc()

string EMAN::MaskGaussNonuniformProcessor::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 4108 of file processor.h.

4109 {
4110 return "A Gaussian falloff to zero. Anisotropic, specify inner radius for x,y,z and Gaussian falloff width. Falloff \
4111width is also anisotropic and relative to the radii, with 1 being equal to the radius on that axis.";
4112 }

◆ get_name()

string EMAN::MaskGaussNonuniformProcessor::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 4099 of file processor.h.

4100 {
4101 return NAME;
4102 }

References NAME.

◆ get_param_types()

TypeDict EMAN::MaskGaussNonuniformProcessor::get_param_types ( ) const
inlinevirtual

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::Processor.

Definition at line 4079 of file processor.h.

4080 {
4081 TypeDict d;
4082
4083 d.put("radius_x", EMObject::INT, "x-axis radius");
4084 d.put("radius_y", EMObject::INT, "y-axis radius");
4085 d.put("radius_z", EMObject::INT, "z-axis radius");
4086 d.put("gauss_width", EMObject::FLOAT, "Gaussian falloff width, relative to each radius, default 0.05");
4087
4088 d.put("dx", EMObject::FLOAT,
4089 "Modify mask center by dx relative to the default center nx/2");
4090 d.put("dy", EMObject::FLOAT,
4091 "Modify mask center by dy relative to the default center ny/2");
4092 d.put("dz", EMObject::FLOAT,
4093 "Modify mask center by dz relative to the default center nz/2");
4094
4095
4096 return d;
4097 }
TypeDict is a dictionary to store <string, EMObject::ObjectType> pair.
Definition: emobject.h:305
void put(const string &key, EMObject::ObjectType o, const string &desc="")
Definition: emobject.h:330

References EMAN::EMObject::FLOAT, EMAN::EMObject::INT, and EMAN::TypeDict::put().

◆ NEW()

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

Definition at line 4103 of file processor.h.

4104 {
4105 return new MaskGaussNonuniformProcessor();
4106 }

References MaskGaussNonuniformProcessor().

◆ process_pixel()

void EMAN::MaskGaussNonuniformProcessor::process_pixel ( float *  pixel,
int  xi,
int  yi,
int  zi 
) const
inlineprotectedvirtual

Implements EMAN::CoordinateProcessor.

Definition at line 4117 of file processor.h.

4118 {
4119 float dist = pow((xi - (nx/2+dx))/radius_x,2.0f) + pow((yi - (ny/2+dy))/radius_y,2.0f) + pow((zi - (nz/2+dz))/radius_z,2.0f);
4120 if (dist>1.0) (*pixel)*=exp(-pow((sqrt(dist)-1.0f)/gauss_width,2.0f));
4121 }
EMData * sqrt() const
return square root of current image

References dx, dy, dz, gauss_width, EMAN::CoordinateProcessor::nx, EMAN::CoordinateProcessor::ny, EMAN::CoordinateProcessor::nz, radius_x, radius_y, radius_z, and sqrt().

◆ set_params()

void EMAN::MaskGaussNonuniformProcessor::set_params ( const Dict new_params)
inlinevirtual

Set the processor parameters using a key/value dictionary.

Parameters
new_paramsA dictionary containing the new parameters.

Reimplemented from EMAN::Processor.

Definition at line 4057 of file processor.h.

4058 {
4059 params = new_params;
4060
4061 if (params.has_key("radius_x")) radius_x=params["radius_x"];
4062 else radius_x=5.0;
4063
4064 if (params.has_key("radius_y")) radius_y=params["radius_y"];
4065 else radius_y=5.0;
4066
4067 if (params.has_key("radius_z")) radius_z=params["radius_z"];
4068 else radius_z=5.0;
4069
4070 dx=dy=dz=0.0;
4071 if (params.has_key("dx")) dx=params["dx"];
4072 if (params.has_key("dy")) dy=params["dy"];
4073 if (params.has_key("dz")) dz=params["dz"];
4074
4075 if (params.has_key("gauss_width")) gauss_width=params["gauss_width"];
4076 else gauss_width=0.05f;
4077 }
bool has_key(const string &key) const
Ask the Dictionary if it as a particular key.
Definition: emobject.h:511

References dx, dy, dz, gauss_width, EMAN::Dict::has_key(), EMAN::Processor::params, radius_x, radius_y, and radius_z.

Member Data Documentation

◆ dx

float EMAN::MaskGaussNonuniformProcessor::dx
protected

Definition at line 4123 of file processor.h.

Referenced by process_pixel(), and set_params().

◆ dy

float EMAN::MaskGaussNonuniformProcessor::dy
protected

Definition at line 4123 of file processor.h.

Referenced by process_pixel(), and set_params().

◆ dz

float EMAN::MaskGaussNonuniformProcessor::dz
protected

Definition at line 4123 of file processor.h.

Referenced by process_pixel(), and set_params().

◆ gauss_width

float EMAN::MaskGaussNonuniformProcessor::gauss_width
protected

Definition at line 4123 of file processor.h.

Referenced by process_pixel(), and set_params().

◆ NAME

const string MaskGaussNonuniformProcessor::NAME = "mask.gaussian.nonuniform"
static

Definition at line 4114 of file processor.h.

Referenced by get_name().

◆ radius_x

float EMAN::MaskGaussNonuniformProcessor::radius_x
protected

Definition at line 4123 of file processor.h.

Referenced by process_pixel(), and set_params().

◆ radius_y

float EMAN::MaskGaussNonuniformProcessor::radius_y
protected

Definition at line 4123 of file processor.h.

Referenced by process_pixel(), and set_params().

◆ radius_z

float EMAN::MaskGaussNonuniformProcessor::radius_z
protected

Definition at line 4123 of file processor.h.

Referenced by process_pixel(), and set_params().


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