#include <processor.h>
Inheritance diagram for EMAN::ImageProcessor:
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 EMData * | create_processor_image () const =0 |
|
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 321 of file processor.h. 00322 { 00323 return "An Image Processor defines a way to create a processor image. The processor image is used to multiply the input-image in the fourier space. ImageFilter class is the base class. Each specific ImageFilter class must define function create_processor_image(). "; 00324 }
|
|
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 502 of file processor.cpp. References create_processor_image(), data, EMAN::EMData::do_fft(), EMAN::EMData::do_ift(), EMAN::EMData::get_data(), EMAN::EMData::is_complex(), LOGWARN, t, and EMAN::EMData::update(). 00503 { 00504 if (!image) { 00505 LOGWARN("NULL image"); 00506 return; 00507 } 00508 00509 EMData *processor_image = create_processor_image(); 00510 00511 if (image->is_complex()) { 00512 (*image) *= *processor_image; 00513 } 00514 else { 00515 EMData *fft = image->do_fft(); 00516 (*fft) *= (*processor_image); 00517 EMData *ift = fft->do_ift(); 00518 00519 float *data = image->get_data(); 00520 float *t = data; 00521 float *ift_data = ift->get_data(); 00522 00523 data = ift_data; 00524 ift_data = t; 00525 00526 ift->update(); 00527 00528 if( fft ) 00529 { 00530 delete fft; 00531 fft = 0; 00532 } 00533 00534 if( ift ) 00535 { 00536 delete ift; 00537 ift = 0; 00538 } 00539 } 00540 00541 image->update(); 00542 }
|