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

#include <processor.h>

Inheritance diagram for EMAN::ImageProcessor:
Inheritance graph
[legend]
Collaboration diagram for EMAN::ImageProcessor:
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 EMDatacreate_processor_image () 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

Definition at line 312 of file processor.h.

Member Function Documentation

◆ create_processor_image()

virtual EMData * EMAN::ImageProcessor::create_processor_image ( ) const
protectedpure virtual

Referenced by process_inplace().

◆ get_group_desc()

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

Definition at line 317 of file processor.h.

318 {
319 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(). ";
320 }

◆ process_inplace()

void ImageProcessor::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 645 of file processor.cpp.

646{
647 if (!image) {
648 LOGWARN("NULL image");
649 return;
650 }
651
652 EMData *processor_image = create_processor_image();
653
654 if (image->is_complex()) {
655 (*image) *= *processor_image;
656 }
657 else {
658 EMData *fft = image->do_fft();
659 (*fft) *= (*processor_image);
660 EMData *ift = fft->do_ift();
661
662 float *data = image->get_data();
663 float *t = data;
664 float *ift_data = ift->get_data();
665
666 data = ift_data;
667 ift_data = t;
668
669 ift->update();
670
671 if( fft )
672 {
673 delete fft;
674 fft = 0;
675 }
676
677 if( ift )
678 {
679 delete ift;
680 ift = 0;
681 }
682 }
683
684 image->update();
685}
EMData stores an image's data and defines core image processing routines.
Definition: emdata.h:82
virtual EMData * create_processor_image() const =0
#define LOGWARN
Definition: log.h:53

References create_processor_image(), and LOGWARN.


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