#include <processor.h>
Inheritance diagram for EMAN::CoordinateProcessor:
Public Member Functions | |
CoordinateProcessor () | |
void | process_inplace (EMData *image) |
To process an image in-place. | |
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 *pixel, int xi, int yi, int zi) const =0 |
virtual void | calc_locals (EMData *) |
virtual bool | is_valid () const |
Protected Attributes | |
int | nx |
int | ny |
int | nz |
float | mean |
float | sigma |
float | maxval |
bool | is_complex |
This is the base class. Specific coordinate processor should implement process_pixel().
Definition at line 2258 of file processor.h.
|
Definition at line 2261 of file processor.h.
|
|
Reimplemented in EMAN::CircularMaskProcessor, EMAN::MaskEdgeMeanProcessor, and EMAN::MaskGaussInvProcessor. Definition at line 2273 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 2266 of file processor.h. 02267 { 02268 return "CoordinateProcessor applies processing based on a pixel's value and it coordinates. This is the base class. Specific coordinate processor should implement process_pixel()."; 02269 }
|
|
Reimplemented in EMAN::CircularMaskProcessor. Definition at line 2276 of file processor.h. Referenced by process_inplace().
|
|
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 1234 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(), EMAN::EMData::is_complex(), is_complex, is_valid(), LOGWARN, maxval, mean, nx, ny, nz, process_pixel(), sigma, EMAN::EMData::update(), x, and y. 01235 { 01236 if (!image) { 01237 LOGWARN("NULL Image"); 01238 return; 01239 } 01240 01241 maxval = image->get_attr("maximum"); 01242 mean = image->get_attr("mean"); 01243 sigma = image->get_attr("sigma"); 01244 nx = image->get_xsize(); 01245 ny = image->get_ysize(); 01246 nz = image->get_zsize(); 01247 is_complex = image->is_complex(); 01248 01249 calc_locals(image); 01250 01251 01252 if (!is_valid()) { 01253 return; 01254 } 01255 01256 float *data = image->get_data(); 01257 size_t i = 0; 01258 01259 for (int z = 0; z < nz; z++) { 01260 for (int y = 0; y < ny; y++) { 01261 for (int x = 0; x < nx; x++) { 01262 process_pixel(&data[i], x, y, z); 01263 ++i; 01264 } 01265 } 01266 } 01267 image->update(); 01268 }
|
|
Implemented in EMAN::CircularMaskProcessor, and EMAN::MaskGaussNonuniformProcessor. Referenced by process_inplace(). |
|
Definition at line 2288 of file processor.h. Referenced by EMAN::CircularMaskProcessor::is_valid(), and process_inplace(). |
|
Definition at line 2286 of file processor.h. Referenced by process_inplace(). |
|
Definition at line 2284 of file processor.h. Referenced by EMAN::MaskNoiseProcessor::process_dist_pixel(), and process_inplace(). |
|
Definition at line 2281 of file processor.h. Referenced by EMAN::MaskEdgeMeanProcessor::calc_locals(), EMAN::CircularMaskProcessor::calc_locals(), process_inplace(), and EMAN::MaskGaussNonuniformProcessor::process_pixel(). |
|
Definition at line 2282 of file processor.h. Referenced by EMAN::MaskGaussInvProcessor::calc_locals(), EMAN::MaskEdgeMeanProcessor::calc_locals(), EMAN::CircularMaskProcessor::calc_locals(), process_inplace(), and EMAN::MaskGaussNonuniformProcessor::process_pixel(). |
|
Definition at line 2283 of file processor.h. Referenced by EMAN::MaskEdgeMeanProcessor::calc_locals(), EMAN::CircularMaskProcessor::calc_locals(), process_inplace(), and EMAN::MaskGaussNonuniformProcessor::process_pixel(). |
|
Definition at line 2285 of file processor.h. Referenced by EMAN::MaskNoiseProcessor::process_dist_pixel(), and process_inplace(). |