#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 2167 of file processor.h.
|
Definition at line 2170 of file processor.h. References is_complex(), nx, and ny.
|
|
Reimplemented in EMAN::CircularMaskProcessor, EMAN::MaskEdgeMeanProcessor, and EMAN::MaskGaussInvProcessor. Definition at line 2182 of file processor.h. Referenced by process_inplace(). 02183 { 02184 }
|
|
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 2175 of file processor.h. 02176 { 02177 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()."; 02178 }
|
|
Reimplemented in EMAN::CircularMaskProcessor. Definition at line 2185 of file processor.h. Referenced by process_inplace(). 02186 { 02187 return true; 02188 }
|
|
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 1251 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. 01252 { 01253 if (!image) { 01254 LOGWARN("NULL Image"); 01255 return; 01256 } 01257 01258 maxval = image->get_attr("maximum"); 01259 mean = image->get_attr("mean"); 01260 sigma = image->get_attr("sigma"); 01261 nx = image->get_xsize(); 01262 ny = image->get_ysize(); 01263 nz = image->get_zsize(); 01264 is_complex = image->is_complex(); 01265 01266 calc_locals(image); 01267 01268 01269 if (!is_valid()) { 01270 return; 01271 } 01272 01273 float *data = image->get_data(); 01274 size_t i = 0; 01275 01276 for (int z = 0; z < nz; z++) { 01277 for (int y = 0; y < ny; y++) { 01278 for (int x = 0; x < nx; x++) { 01279 process_pixel(&data[i], x, y, z); 01280 ++i; 01281 } 01282 } 01283 } 01284 image->update(); 01285 }
|
|
Implemented in EMAN::CircularMaskProcessor, and EMAN::MaskGaussNonuniformProcessor. Referenced by process_inplace(). |
|
Definition at line 2197 of file processor.h. Referenced by process_inplace(). |
|
Definition at line 2195 of file processor.h. Referenced by process_inplace(). |
|
Definition at line 2193 of file processor.h. Referenced by process_inplace(). |
|
Definition at line 2190 of file processor.h. Referenced by process_inplace(). |
|
Definition at line 2191 of file processor.h. Referenced by process_inplace(). |
|
Definition at line 2192 of file processor.h. Referenced by process_inplace(). |
|
Definition at line 2194 of file processor.h. Referenced by process_inplace(). |