#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 2082 of file processor.h.
|
Definition at line 2085 of file processor.h. References is_complex(), nx, and ny.
|
|
Reimplemented in EMAN::CircularMaskProcessor, EMAN::MaskEdgeMeanProcessor, and EMAN::MaskGaussInvProcessor. Definition at line 2097 of file processor.h. Referenced by process_inplace(). 02098 { 02099 }
|
|
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 2090 of file processor.h. 02091 { 02092 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()."; 02093 }
|
|
Reimplemented in EMAN::CircularMaskProcessor. Definition at line 2100 of file processor.h. Referenced by process_inplace(). 02101 { 02102 return true; 02103 }
|
|
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 1189 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. 01190 { 01191 if (!image) { 01192 LOGWARN("NULL Image"); 01193 return; 01194 } 01195 01196 maxval = image->get_attr("maximum"); 01197 mean = image->get_attr("mean"); 01198 sigma = image->get_attr("sigma"); 01199 nx = image->get_xsize(); 01200 ny = image->get_ysize(); 01201 nz = image->get_zsize(); 01202 is_complex = image->is_complex(); 01203 01204 calc_locals(image); 01205 01206 01207 if (!is_valid()) { 01208 return; 01209 } 01210 01211 float *data = image->get_data(); 01212 size_t i = 0; 01213 01214 for (int z = 0; z < nz; z++) { 01215 for (int y = 0; y < ny; y++) { 01216 for (int x = 0; x < nx; x++) { 01217 process_pixel(&data[i], x, y, z); 01218 ++i; 01219 } 01220 } 01221 } 01222 image->update(); 01223 }
|
|
Implemented in EMAN::CircularMaskProcessor, and EMAN::MaskGaussNonuniformProcessor. Referenced by process_inplace(). |
|
Definition at line 2112 of file processor.h. Referenced by process_inplace(). |
|
Definition at line 2110 of file processor.h. Referenced by process_inplace(). |
|
Definition at line 2108 of file processor.h. Referenced by process_inplace(). |
|
Definition at line 2105 of file processor.h. Referenced by process_inplace(). |
|
Definition at line 2106 of file processor.h. Referenced by process_inplace(). |
|
Definition at line 2107 of file processor.h. Referenced by process_inplace(). |
|
Definition at line 2109 of file processor.h. Referenced by process_inplace(). |