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

Evaluate individual particle images using a tenchique similar to that used for CTF evaluation. More...

#include <processor.h>

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

Public Member Functions

string get_name () const
 Get the processor's name. More...
 
void process_inplace (EMData *image)
 To process an image in-place. 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::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::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 = "eval.maskedsnr"
 

Protected Attributes

EMDatasum
 
int dosqrt
 
- 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

Evaluate individual particle images using a tenchique similar to that used for CTF evaluation.

Definition at line 455 of file processor.h.

Member Function Documentation

◆ get_desc()

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

487 {
488 return "Evaluates the SNR of the particle using a masking method similar to that used in the CTF analysis process. The image is not changed. The resulting value is placed in the particle dictionary as eval_maskedsnr";
489 }

◆ get_name()

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

459 {
460 return NAME;
461 }
static const string NAME
Definition: processor.h:491

References NAME.

◆ get_param_types()

TypeDict EMAN::SNREvalProcessor::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 473 of file processor.h.

474 {
475 TypeDict d;
476// d.put("sum", EMObject::EMDATA, "Adds the weights to sum for normalization");
477// d.put("sqrt", EMObject::INT, "Weights using sqrt of the amplitude if set");
478 return d;
479 }
TypeDict is a dictionary to store <string, EMObject::ObjectType> pair.
Definition: emobject.h:305

◆ NEW()

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

Definition at line 481 of file processor.h.

482 {
483 return new SNREvalProcessor();
484 }
Evaluate individual particle images using a tenchique similar to that used for CTF evaluation.
Definition: processor.h:456

◆ process_inplace()

void SNREvalProcessor::process_inplace ( EMData image)
virtual

To process an image in-place.

For those processors which can only be processed out-of-place, override this function to just print out some error message to remind user call the out-of-place version.

Parameters
imageThe image to be processed.

Implements EMAN::Processor.

Definition at line 1218 of file processor.cpp.

1219{
1220 int ys=image->get_ysize();
1221
1222 EMData *mask1=new EMData(ys,ys,1);
1223 mask1->process_inplace("mask.gaussian",Dict("outer_radius", ys/2.0));
1224 EMData *mask2=mask1->copy();
1225 mask2->mult(-1.0f);
1226 mask2->add(1.0);
1227 mask2->process_inplace("mask.decayedge2d",Dict("width",4));
1228
1229/*
1230
1231
1232
1233mask1=EMData(ys2,ys2,1)
1234 mask1.to_one()
1235 mask1.process_inplace("mask.gaussian",{"outer_radius":radius})
1236 mask2=mask1.copy()*-1+1
1237# mask1.process_inplace("mask.decayedge2d",{"width":4})
1238 mask2.process_inplace("mask.decayedge2d",{"width":4})
1239 mask1.clip_inplace(Region(-(ys2*(oversamp-1)/2),-(ys2*(oversamp-1)/2),ys,ys))
1240 mask2.clip_inplace(Region(-(ys2*(oversamp-1)/2),-(ys2*(oversamp-1)/2),ys,ys))
1241 ratio1=mask1.get_attr("square_sum")/(ys*ys) #/1.035
1242 ratio2=mask2.get_attr("square_sum")/(ys*ys)
1243 masks[(ys,radius)]=(mask1,ratio1,mask2,ratio2)
1244
1245
1246
1247*/
1248}
Dict is a dictionary to store <string, EMObject> pair.
Definition: emobject.h:385
EMData stores an image's data and defines core image processing routines.
Definition: emdata.h:82

◆ set_params()

void EMAN::SNREvalProcessor::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 465 of file processor.h.

466 {
467 params = new_params;
468// sum = params["sum"];
469// dosqrt = params["sqrt"];
470// printf("%s %f\n",params.keys()[0].c_str(),lowpass);
471 }

References EMAN::Processor::params.

Member Data Documentation

◆ dosqrt

int EMAN::SNREvalProcessor::dosqrt
protected

Definition at line 495 of file processor.h.

◆ NAME

const string SNREvalProcessor::NAME = "eval.maskedsnr"
static

Definition at line 491 of file processor.h.

Referenced by get_name().

◆ sum

EMData* EMAN::SNREvalProcessor::sum
protected

Definition at line 494 of file processor.h.


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