#include <processor.h>
Inheritance diagram for EMAN::RealPixelProcessor:
Public Member Functions | |
RealPixelProcessor () | |
void | process_inplace (EMData *image) |
To process an image in-place. | |
virtual void | set_params (const Dict &new_params) |
Set the processor parameters using a key/value dictionary. | |
Static Public Member Functions | |
static string | get_group_desc () |
Get the description of this group of processors. | |
Protected Member Functions | |
virtual void | process_pixel (float *x) const =0 |
virtual void | calc_locals (EMData *) |
virtual void | normalize (EMData *) const |
Protected Attributes | |
float | value |
float | maxval |
float | mean |
float | sigma |
The processor won't consider the pixel's coordinates and neighbors.
Definition at line 1221 of file processor.h.
|
Definition at line 1224 of file processor.h.
|
|
Definition at line 1245 of file processor.h. Referenced by process_inplace().
|
|
Get the description of this group of processors. This function is defined in a parent class. It gives a introduction to a group of processors.
Reimplemented from EMAN::Processor. Definition at line 1238 of file processor.h. 01239 { 01240 return "The base class for real space processor working on individual pixels. The processor won't consider the pixel's coordinates and neighbors."; 01241 }
|
|
Definition at line 1248 of file processor.h.
|
|
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 1317 of file processor.cpp. References calc_locals(), data, EMAN::EMData::get_attr(), EMAN::EMData::get_data(), EMAN::EMData::get_xsize(), EMAN::EMData::get_ysize(), EMAN::EMData::get_zsize(), LOGWARN, maxval, mean, process_pixel(), sigma, and EMAN::EMData::update(). 01318 { 01319 if (!image) { 01320 LOGWARN("NULL Image"); 01321 return; 01322 } 01323 01324 maxval = image->get_attr("maximum"); 01325 mean = image->get_attr("mean"); 01326 sigma = image->get_attr("sigma"); 01327 01328 calc_locals(image); 01329 01330 size_t size = (size_t)image->get_xsize() * 01331 (size_t)image->get_ysize() * 01332 (size_t)image->get_zsize(); 01333 float *data = image->get_data(); 01334 01335 for (size_t i = 0; i < size; i++) { 01336 process_pixel(&data[i]); 01337 } 01338 image->update(); 01339 }
|
|
|
Set the processor parameters using a key/value dictionary.
Reimplemented from EMAN::Processor. Reimplemented in EMAN::InvertCarefullyProcessor, EMAN::ValuePowProcessor, EMAN::CollapseProcessor, EMAN::LinearXformProcessor, EMAN::ExpProcessor, EMAN::FiniteProcessor, EMAN::RangeThresholdProcessor, and EMAN::SigmaProcessor. Definition at line 1229 of file processor.h. References EMAN::Processor::params, EMAN::Dict::size(), value, and EMAN::Dict::values(). 01230 { 01231 params = new_params; 01232 if (params.size() == 1) { 01233 vector < EMObject > dict_values = params.values(); 01234 value = dict_values[0]; 01235 } 01236 }
|
|
Definition at line 1253 of file processor.h. Referenced by process_inplace(). |
|
Definition at line 1254 of file processor.h. Referenced by process_inplace(), and EMAN::SigmaProcessor::process_pixel(). |
|
Definition at line 1255 of file processor.h. Referenced by process_inplace(), and EMAN::SigmaProcessor::process_pixel(). |
|
Definition at line 1252 of file processor.h. Referenced by EMAN::CollapseProcessor::process_pixel(), EMAN::BinarizeProcessor::process_pixel(), EMAN::CutToZeroProcessor::process_pixel(), EMAN::ToZeroProcessor::process_pixel(), EMAN::CollapseProcessor::set_params(), and set_params(). |