EMAN2
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes
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]

List of all members.

Public Member Functions

string get_name () const
 Get the processor's name.
void process_inplace (EMData *image)
 To process an image in-place.
void set_params (const Dict &new_params)
 Set the processor parameters using a key/value dictionary.
TypeDict get_param_types () const
 Get processor parameter information in a dictionary.
string get_desc () const
 Get the descrition of this specific processor.

Static Public Member Functions

static ProcessorNEW ()

Static Public Attributes

static const string NAME = "eval.maskedsnr"

Protected Attributes

EMDatasum
int dosqrt

Detailed Description

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

Definition at line 423 of file processor.h.


Member Function Documentation

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

                {
                        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";
                }
string EMAN::SNREvalProcessor::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 426 of file processor.h.

References NAME.

                {
                        return NAME;
                }
TypeDict EMAN::SNREvalProcessor::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::Processor.

Definition at line 441 of file processor.h.

                {
                        TypeDict d;
//                      d.put("sum", EMObject::EMDATA, "Adds the weights to sum for normalization");
//                      d.put("sqrt", EMObject::INT, "Weights using sqrt of the amplitude if set");
                        return d;
                }
static Processor* EMAN::SNREvalProcessor::NEW ( ) [inline, static]

Definition at line 449 of file processor.h.

                {
                        return new SNREvalProcessor();
                }
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 721 of file processor.cpp.

References EMAN::EMData::add(), EMAN::EMData::copy(), EMAN::EMData::get_ysize(), EMAN::EMData::mult(), and EMAN::EMData::process_inplace().

{
        int ys=image->get_ysize();

        EMData *mask1=new EMData(ys,ys,1);
        mask1->process_inplace("mask.gaussian",Dict("outer_radius", ys/2.0));
        EMData *mask2=mask1->copy();
        mask2->mult(-1.0f);
        mask2->add(1.0);
        mask2->process_inplace("mask.decayedge2d",Dict("width",4));

/*



mask1=EMData(ys2,ys2,1)
                mask1.to_one()
                mask1.process_inplace("mask.gaussian",{"outer_radius":radius})
                mask2=mask1.copy()*-1+1
#               mask1.process_inplace("mask.decayedge2d",{"width":4})
                mask2.process_inplace("mask.decayedge2d",{"width":4})
                mask1.clip_inplace(Region(-(ys2*(oversamp-1)/2),-(ys2*(oversamp-1)/2),ys,ys))
                mask2.clip_inplace(Region(-(ys2*(oversamp-1)/2),-(ys2*(oversamp-1)/2),ys,ys))
                ratio1=mask1.get_attr("square_sum")/(ys*ys)     #/1.035
                ratio2=mask2.get_attr("square_sum")/(ys*ys)
                masks[(ys,radius)]=(mask1,ratio1,mask2,ratio2)



*/
}
void EMAN::SNREvalProcessor::set_params ( const Dict new_params) [inline, virtual]

Set the processor parameters using a key/value dictionary.

Parameters:
new_paramsA dictionary containing the new parameters.

Reimplemented from EMAN::Processor.

Definition at line 433 of file processor.h.

References EMAN::Processor::params.

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

Member Data Documentation

Definition at line 463 of file processor.h.

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

Definition at line 459 of file processor.h.

Referenced by get_name().

Definition at line 462 of file processor.h.


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