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


Public Member Functions | |
| string | get_name () const |
| Get the processor's name. | |
| string | get_desc () const |
| Get the descrition of this specific processor. | |
| void | process_inplace (EMData *image) |
| To process an image in-place. | |
Static Public Member Functions | |
| Processor * | NEW () |
Static Public Attributes | |
| const string | NAME = "normalize.ramp.normvar" |
Ramps are removed first, then mean and sigma becomes 0 and 1 respectively This is essential Pawel Penczek's preferred method of particle normalization
Definition at line 4172 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 4185 of file processor.h. 04186 {
04187 return "First call filter.ramp on the image, then make the mean 0 and norm 1";
04188 }
|
|
|
Get the processor's name. Each processor is identified by a unique name.
Implements EMAN::Processor. Definition at line 4175 of file processor.h. 04176 {
04177 return NAME;
04178 }
|
|
|
Definition at line 4180 of file processor.h. 04181 {
04182 return new NormalizeRampNormVar();
04183 }
|
|
|
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 3583 of file processor.cpp. References EMAN::EMData::add(), EMAN::EMData::get_xsize(), infomask(), EMAN::EMData::is_complex(), LOGWARN, EMAN::EMData::mult(), nx, EMAN::EMData::process_inplace(), and EMAN::EMData::update(). 03584 {
03585 if (!image) {
03586 LOGWARN("cannot do normalization on NULL image");
03587 return;
03588 }
03589
03590 if (image->is_complex()) {
03591 LOGWARN("cannot do normalization on complex image");
03592 return;
03593 }
03594
03595 image->process_inplace( "filter.ramp" );
03596 int nx = image->get_xsize();
03597 EMData mask(nx,nx);
03598 mask.process_inplace("testimage.circlesphere", Dict("radius",nx/2-2,"fill",1));
03599
03600 vector<float> rstls = Util::infomask( image, &mask, false);
03601 image->add((float)-rstls[0]);
03602 image->mult((float)1.0/rstls[1]);
03603 image->update();
03604 }
|
|
|
Definition at line 152 of file processor.cpp. |
1.3.9.1