EMAN2
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
EMAN::ComplexPixelProcessor Class Referenceabstract

The base class for fourier space processor working on individual pixels. More...

#include <processor.h>

Inheritance diagram for EMAN::ComplexPixelProcessor:
Inheritance graph
[legend]
Collaboration diagram for EMAN::ComplexPixelProcessor:
Collaboration graph
[legend]

Public Member Functions

void process_inplace (EMData *image)
 To process an image in-place. More...
 
- Public Member Functions inherited from EMAN::Processor
virtual ~Processor ()
 
virtual EMDataprocess (const EMData *const image)
 To proccess an image out-of-place. More...
 
virtual void process_list_inplace (vector< EMData * > &images)
 To process multiple images using the same algorithm. More...
 
virtual string get_name () const =0
 Get the processor's name. More...
 
virtual Dict get_params () const
 Get the processor parameters in a key/value dictionary. More...
 
virtual void set_params (const Dict &new_params)
 Set the processor parameters using a key/value dictionary. More...
 
virtual TypeDict get_param_types () const
 Get processor parameter information in a dictionary. More...
 
virtual string get_desc () const =0
 Get the descrition of this specific processor. More...
 

Static Public Member Functions

static string get_group_desc ()
 
- Static Public Member Functions inherited from EMAN::Processor
static string get_group_desc ()
 Get the description of this group of processors. More...
 
static void EMFourierFilterInPlace (EMData *fimage, Dict params)
 Compute a Fourier-filter processed image in place. More...
 
static EMDataEMFourierFilter (EMData *fimage, Dict params)
 Compute a Fourier-processor processed image without altering the original image. More...
 

Protected Member Functions

virtual void process_pixel (float *x) const =0
 

Additional Inherited Members

- Public Types inherited from EMAN::Processor
enum  fourier_filter_types {
  TOP_HAT_LOW_PASS , TOP_HAT_HIGH_PASS , TOP_HAT_BAND_PASS , TOP_HOMOMORPHIC ,
  GAUSS_LOW_PASS , GAUSS_HIGH_PASS , GAUSS_BAND_PASS , GAUSS_INVERSE ,
  GAUSS_HOMOMORPHIC , BUTTERWORTH_LOW_PASS , BUTTERWORTH_HIGH_PASS , BUTTERWORTH_HOMOMORPHIC ,
  KAISER_I0 , KAISER_SINH , KAISER_I0_INVERSE , KAISER_SINH_INVERSE ,
  SHIFT , TANH_LOW_PASS , TANH_HIGH_PASS , TANH_HOMOMORPHIC ,
  TANH_BAND_PASS , RADIAL_TABLE , CTF_
}
 Fourier filter Processor type enum. More...
 
- Protected Attributes inherited from EMAN::Processor
Dict params
 

Detailed Description

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.

Definition at line 4311 of file processor.h.

Member Function Documentation

◆ get_group_desc()

static string EMAN::ComplexPixelProcessor::get_group_desc ( )
inlinestatic

Definition at line 4316 of file processor.h.

4317 {
4318 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.";
4319 }

◆ process_inplace()

void ComplexPixelProcessor::process_inplace ( EMData image)
virtual

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.

Parameters
imageThe image to be processed.

Implements EMAN::Processor.

Definition at line 2453 of file processor.cpp.

2454{
2455 if (!image) {
2456 LOGWARN("NULL image");
2457 return;
2458 }
2459 if (!image->is_complex()) {
2460 LOGWARN("cannot apply complex processor on a real image. Nothing is done.");
2461 return;
2462 }
2463
2464 size_t size = (size_t)image->get_xsize() *
2465 (size_t)image->get_ysize() *
2466 (size_t)image->get_zsize();
2467 float *data = image->get_data();
2468
2469 image->ri2ap();
2470
2471 for (size_t i = 0; i < size; i += 2) {
2472 process_pixel(data);
2473 data += 2;
2474 }
2475
2476 image->update();
2477 image->ap2ri();
2478}
virtual void process_pixel(float *x) const =0
#define LOGWARN
Definition: log.h:53

References LOGWARN, and process_pixel().

◆ process_pixel()

virtual void EMAN::ComplexPixelProcessor::process_pixel ( float *  x) const
protectedpure virtual

Implemented in EMAN::ComplexNormPixel.

Referenced by process_inplace().


The documentation for this class was generated from the following files: