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

Perform a multiplication of real image with a radial table. More...

#include <processor.h>

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

Public Member Functions

string get_name () const
 Get the processor's name. More...
 
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_desc () const
 Get the descrition of this specific processor. More...
 
- Public Member Functions inherited from EMAN::CircularMaskProcessor
 CircularMaskProcessor ()
 
- 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.radialprofile"
 

Protected Member Functions

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

Protected Attributes

vector< float > table
 
- Protected Attributes inherited from EMAN::CircularMaskProcessor
float inner_radius
 
float outer_radius
 
float inner_radius_square
 
float outer_radius_square
 
float dx
 
float dy
 
float dz
 
float xc
 
float yc
 
float zc
 
- 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

Perform a multiplication of real image with a radial table.

Parameters
tablea radial table for multiplication
Exceptions
ImageFormatExceptionthis filter only apply to real image

Definition at line 9141 of file processor.h.

Member Function Documentation

◆ get_desc()

string EMAN::RadialProcessor::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.

Reimplemented from EMAN::CircularMaskProcessor.

Definition at line 9168 of file processor.h.

9169 {
9170 return "Multiply a real-space image by a radial function. 1 value / pixel, extending to corner. Missing values -> 0.";
9171 }

◆ get_name()

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

9147 {
9148 return NAME;
9149 }
static const string NAME
Definition: processor.h:9172

References NAME.

◆ get_param_types()

TypeDict EMAN::RadialProcessor::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::CircularMaskProcessor.

Definition at line 9161 of file processor.h.

9162 {
9163 TypeDict d;
9164 d.put("table", EMObject::FLOATARRAY, "Radial array of floats, 1 float/pixel");
9165 return d;
9166 }
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::FLOATARRAY, and EMAN::TypeDict::put().

◆ NEW()

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

Definition at line 9151 of file processor.h.

9152 {
9153 return new RadialProcessor();
9154 }
Perform a multiplication of real image with a radial table.
Definition: processor.h:9142

◆ process_dist_pixel()

void EMAN::RadialProcessor::process_dist_pixel ( float *  pixel,
float  dist 
) const
inlineprotectedvirtual

Implements EMAN::CircularMaskProcessor.

Definition at line 9174 of file processor.h.

9175 {
9176
9177// vector<float> table = params["table"];
9178 int tsize = table.size();
9179 float d = sqrt(dist);
9180 if (d>tsize-1) { *pixel=0.0f; return; }
9181
9182 int ir = int(d);
9183 float df = d - float(ir);
9184
9185 float f = table[ir] + df*(table[ir+1]-table[ir]);
9186// printf("%f\t%d\t%f\t%f\t%f\n",d, ir, f, *pixel, *pixel*f);
9187
9188 *pixel=*pixel * f;
9189 }
vector< float > table
Definition: processor.h:9190
EMData * sqrt() const
return square root of current image

References sqrt(), and table.

◆ set_params()

void EMAN::RadialProcessor::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::CircularMaskProcessor.

Definition at line 9156 of file processor.h.

9157 {
9159 table = params["table"];;
9160 }
void set_params(const Dict &new_params)
Set the processor parameters using a key/value dictionary.
Definition: processor.h:3728

References EMAN::Processor::params, EMAN::CircularMaskProcessor::set_params(), and table.

Member Data Documentation

◆ NAME

const string RadialProcessor::NAME = "mask.radialprofile"
static

Definition at line 9172 of file processor.h.

Referenced by get_name().

◆ table

vector<float> EMAN::RadialProcessor::table
protected

Definition at line 9190 of file processor.h.

Referenced by process_dist_pixel(), and set_params().


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