#include <processor.h>
Inheritance diagram for EMAN::SNREvalProcessor:


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 | |
| Processor * | NEW () |
Static Public Attributes | |
| const string | NAME = "eval.maskedsnr" |
Protected Attributes | |
| EMData * | sum |
| int | dosqrt |
Definition at line 395 of file processor.h.
|
|
Get the descrition of this specific processor. This function must be overwritten by a subclass.
Implements EMAN::Processor. Definition at line 426 of file processor.h. 00427 {
00428 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";
00429 }
|
|
|
Get the processor's name. Each processor is identified by a unique name.
Implements EMAN::Processor. Definition at line 398 of file processor.h. 00399 {
00400 return NAME;
00401 }
|
|
|
Get processor parameter information in a dictionary. Each parameter has one record in the dictionary. Each record contains its name, data-type, and description.
Reimplemented from EMAN::Processor. Definition at line 413 of file processor.h. 00414 {
00415 TypeDict d;
00416 // d.put("sum", EMObject::EMDATA, "Adds the weights to sum for normalization");
00417 // d.put("sqrt", EMObject::INT, "Weights using sqrt of the amplitude if set");
00418 return d;
00419 }
|
|
|
Definition at line 421 of file processor.h. 00422 {
00423 return new SNREvalProcessor();
00424 }
|
|
|
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.
Implements EMAN::Processor. Definition at line 679 of file processor.cpp. References EMAN::EMData::add(), EMAN::EMData::copy(), EMAN::EMData::get_ysize(), EMAN::EMData::mult(), and EMAN::EMData::process_inplace(). 00680 {
00681 int ys=image->get_ysize();
00682
00683 EMData *mask1=new EMData(ys,ys,1);
00684 mask1->process_inplace("mask.gaussian",Dict("outer_radius", ys/2.0));
00685 EMData *mask2=mask1->copy();
00686 mask2->mult(-1.0f);
00687 mask2->add(1.0);
00688 mask2->process_inplace("mask.decayedge2d",Dict("width",4));
00689
00690 /*
00691
00692
00693
00694 mask1=EMData(ys2,ys2,1)
00695 mask1.to_one()
00696 mask1.process_inplace("mask.gaussian",{"outer_radius":radius})
00697 mask2=mask1.copy()*-1+1
00698 # mask1.process_inplace("mask.decayedge2d",{"width":4})
00699 mask2.process_inplace("mask.decayedge2d",{"width":4})
00700 mask1.clip_inplace(Region(-(ys2*(oversamp-1)/2),-(ys2*(oversamp-1)/2),ys,ys))
00701 mask2.clip_inplace(Region(-(ys2*(oversamp-1)/2),-(ys2*(oversamp-1)/2),ys,ys))
00702 ratio1=mask1.get_attr("square_sum")/(ys*ys) #/1.035
00703 ratio2=mask2.get_attr("square_sum")/(ys*ys)
00704 masks[(ys,radius)]=(mask1,ratio1,mask2,ratio2)
00705
00706
00707
00708 */
00709 }
|
|
|
Set the processor parameters using a key/value dictionary.
Reimplemented from EMAN::Processor. Definition at line 405 of file processor.h. 00406 {
00407 params = new_params;
00408 // sum = params["sum"];
00409 // dosqrt = params["sqrt"];
00410 // printf("%s %f\n",params.keys()[0].c_str(),lowpass);
00411 }
|
|
|
Definition at line 435 of file processor.h. |
|
|
Definition at line 62 of file processor.cpp. |
|
|
Definition at line 434 of file processor.h. |
1.3.9.1