#include <processor.h>
Inheritance diagram for EMAN::ComplexPixelProcessor:
Public Member Functions | |
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 *x) const =0 |
ri2ap() is called before processing, so individual pixels will be A/P rather than R/I. The processor won't consider the pixel's coordinates and neighbors.
Definition at line 2685 of file processor.h.
|
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 2690 of file processor.h. 02691 { 02692 return "The base class for fourier space processor working on individual pixels. ri2ap() is called before processing, so individual pixels will be A/P rather than R/I. The processor won't consider the pixel's coordinates and neighbors."; 02693 }
|
|
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 1535 of file processor.cpp. References EMAN::EMData::ap2ri(), data, EMAN::EMData::get_data(), EMAN::EMData::get_xsize(), EMAN::EMData::get_ysize(), EMAN::EMData::get_zsize(), EMAN::EMData::is_complex(), LOGWARN, process_pixel(), EMAN::EMData::ri2ap(), and EMAN::EMData::update(). 01536 { 01537 if (!image) { 01538 LOGWARN("NULL image"); 01539 return; 01540 } 01541 if (!image->is_complex()) { 01542 LOGWARN("cannot apply complex processor on a real image. Nothing is done."); 01543 return; 01544 } 01545 01546 size_t size = (size_t)image->get_xsize() * 01547 (size_t)image->get_ysize() * 01548 (size_t)image->get_zsize(); 01549 float *data = image->get_data(); 01550 01551 image->ri2ap(); 01552 01553 for (size_t i = 0; i < size; i += 2) { 01554 process_pixel(data); 01555 data += 2; 01556 } 01557 01558 image->update(); 01559 image->ap2ri(); 01560 }
|
|
Implemented in EMAN::ComplexNormPixel. Referenced by process_inplace(). |