EMAN2
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
EMAN::VerticalStripeProcessor Class Reference

Tries to fix images scanned on the zeiss for poor ccd normalization. More...

#include <processor.h>

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

Public Member Functions

void process_inplace (EMData *image)
 To process an image in-place. More...
 
string get_name () const
 Get the processor's name. More...
 
string get_desc () const
 Get the descrition of this specific processor. 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 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...
 

Static Public Member Functions

static ProcessorNEW ()
 
- 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...
 

Static Public Attributes

static const string NAME = "math.verticalstripefix"
 

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

Tries to fix images scanned on the zeiss for poor ccd normalization.

Definition at line 5337 of file processor.h.

Member Function Documentation

◆ get_desc()

string EMAN::VerticalStripeProcessor::get_desc ( ) const
inlinevirtual

Get the descrition of this specific processor.

This function must be overwritten by a subclass.

Returns
The description of this processor.

Implements EMAN::Processor.

Definition at line 5352 of file processor.h.

5353 {
5354 return "Tries to fix images scanned on the zeiss for poor ccd normalization.";
5355 }

◆ get_name()

string EMAN::VerticalStripeProcessor::get_name ( ) const
inlinevirtual

Get the processor's name.

Each processor is identified by a unique name.

Returns
The processor's name.

Implements EMAN::Processor.

Definition at line 5342 of file processor.h.

5343 {
5344 return NAME;
5345 }
static const string NAME
Definition: processor.h:5357

References NAME.

◆ NEW()

static Processor * EMAN::VerticalStripeProcessor::NEW ( )
inlinestatic

Definition at line 5347 of file processor.h.

5348 {
5349 return new VerticalStripeProcessor();
5350 }
Tries to fix images scanned on the zeiss for poor ccd normalization.
Definition: processor.h:5338

◆ process_inplace()

void VerticalStripeProcessor::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 3956 of file processor.cpp.

3957{
3958 if (!image) {
3959 LOGWARN("NULL Image");
3960 return;
3961 }
3962
3963 int nx = image->get_xsize();
3964 int ny = image->get_ysize();
3965 int nz = image->get_zsize();
3966
3967 float *data = image->get_data();
3968 float sigma = image->get_attr("sigma");
3969
3970 for (int k = 0; k < nz; k++) {
3971 for (int i = 0; i < nx; i++) {
3972 double sum = 0;
3973 for (int j = ny / 4; j < 3 * ny / 4; j++) {
3974 sum += data[i + j * nx];
3975 }
3976
3977 float mean = (float)sum / (ny / 2);
3978 for (int j = 0; j < ny; j++) {
3979 data[i + j * nx] = (data[i + j * nx] - mean) / sigma;
3980 }
3981 }
3982 }
3983
3984 image->update();
3985}
#define LOGWARN
Definition: log.h:53

References LOGWARN.

Member Data Documentation

◆ NAME

const string VerticalStripeProcessor::NAME = "math.verticalstripefix"
static

Definition at line 5357 of file processor.h.

Referenced by get_name().


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