#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 | |
| 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 2223 of file processor.h.
|
|
Definition at line 2226 of file processor.h. References is_complex(), nx, and ny.
|
|
|
Reimplemented in EMAN::CircularMaskProcessor, EMAN::MaskEdgeMeanProcessor, and EMAN::MaskGaussInvProcessor. Definition at line 2238 of file processor.h. Referenced by process_inplace(). 02239 {
02240 }
|
|
|
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 2231 of file processor.h. 02232 {
02233 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().";
02234 }
|
|
|
Reimplemented in EMAN::CircularMaskProcessor. Definition at line 2241 of file processor.h. Referenced by process_inplace(). 02242 {
02243 return true;
02244 }
|
|
|
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 1282 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. 01283 {
01284 if (!image) {
01285 LOGWARN("NULL Image");
01286 return;
01287 }
01288
01289 maxval = image->get_attr("maximum");
01290 mean = image->get_attr("mean");
01291 sigma = image->get_attr("sigma");
01292 nx = image->get_xsize();
01293 ny = image->get_ysize();
01294 nz = image->get_zsize();
01295 is_complex = image->is_complex();
01296
01297 calc_locals(image);
01298
01299
01300 if (!is_valid()) {
01301 return;
01302 }
01303
01304 float *data = image->get_data();
01305 size_t i = 0;
01306
01307 for (int z = 0; z < nz; z++) {
01308 for (int y = 0; y < ny; y++) {
01309 for (int x = 0; x < nx; x++) {
01310 process_pixel(&data[i], x, y, z);
01311 ++i;
01312 }
01313 }
01314 }
01315 image->update();
01316 }
|
|
||||||||||||||||||||
|
Implemented in EMAN::CircularMaskProcessor, and EMAN::MaskGaussNonuniformProcessor. Referenced by process_inplace(). |
|
|
Definition at line 2253 of file processor.h. Referenced by process_inplace(). |
|
|
Definition at line 2251 of file processor.h. Referenced by process_inplace(). |
|
|
Definition at line 2249 of file processor.h. Referenced by process_inplace(). |
|
|
Definition at line 2246 of file processor.h. Referenced by process_inplace(). |
|
|
Definition at line 2247 of file processor.h. Referenced by process_inplace(). |
|
|
Definition at line 2248 of file processor.h. Referenced by process_inplace(). |
|
|
Definition at line 2250 of file processor.h. Referenced by process_inplace(). |
1.3.9.1