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

MinShrinkProcessor shrinks an image by in an integer amount, keeping the minimum pixel value - useful when constructing binary search trees in the marching cubes algorithm. More...

#include <processor.h>

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

Classes

struct  LessThan
 

Public Member Functions

virtual EMDataprocess (const EMData *const image)
 The min shrink processor has its own process function to minise memory usage - if this function was not over written the base Processor class would create copy of the input image and hand it to the process_inplace function. More...
 
virtual void process_inplace (EMData *image)
 To process an image in-place. More...
 
string get_desc () const
 Get the descrition of this specific processor. More...
 
string get_name () const
 Get the processor's name. More...
 
TypeDict get_param_types () const
 Get processor parameter information in a dictionary. More...
 
- Public Member Functions inherited from EMAN::Processor
virtual ~Processor ()
 
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...
 

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.minshrink"
 

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 Member Functions inherited from EMAN::BooleanShrinkProcessor
template<class LogicOp >
EMDataprocess (const EMData *const image, Dict &params)
 Boolean shrink an image, returning the processed image. More...
 
template<class LogicOp >
void process_inplace (EMData *image, Dict &params)
 Boolean shrink an image inplace. More...
 
- Protected Attributes inherited from EMAN::Processor
Dict params
 

Detailed Description

MinShrinkProcessor shrinks an image by in an integer amount, keeping the minimum pixel value - useful when constructing binary search trees in the marching cubes algorithm.

Author
David Woolford
Date
September 2007
Parameters
nThe shrink factor
searchThe search area (cubic volume width, usually the same as shrink)

Definition at line 4936 of file processor.h.

Member Function Documentation

◆ get_desc()

string EMAN::MinShrinkProcessor::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 4955 of file processor.h.

4956 {
4957 return "Shrink an image by a given amount (default 2), using the minimum value found in the pixel neighborhood.";
4958 }

◆ get_name()

string EMAN::MinShrinkProcessor::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 4960 of file processor.h.

4961 {
4962 return NAME;
4963 }
static const string NAME
Definition: processor.h:4977

References NAME.

◆ get_param_types()

TypeDict EMAN::MinShrinkProcessor::get_param_types ( ) const
inlinevirtual

Get processor parameter information in a dictionary.

Each parameter has one record in the dictionary. Each record contains its name, data-type, and description.

Returns
A dictionary containing the parameter info.

Reimplemented from EMAN::Processor.

Definition at line 4969 of file processor.h.

4970 {
4971 TypeDict d;
4972 d.put("n", EMObject::INT, "The shrink factor");
4973 d.put("search", EMObject::INT, "The search area (cubic volume width, usually the same as shrink)");
4974 return d;
4975 }
TypeDict is a dictionary to store <string, EMObject::ObjectType> pair.
Definition: emobject.h:305
void put(const string &key, EMObject::ObjectType o, const string &desc="")
Definition: emobject.h:330

References EMAN::EMObject::INT, and EMAN::TypeDict::put().

◆ NEW()

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

Definition at line 4964 of file processor.h.

4965 {
4966 return new MinShrinkProcessor();
4967 }
MinShrinkProcessor shrinks an image by in an integer amount, keeping the minimum pixel value - useful...
Definition: processor.h:4937

◆ process()

virtual EMData * EMAN::MinShrinkProcessor::process ( const EMData *const  image)
inlinevirtual

The min shrink processor has its own process function to minise memory usage - if this function was not over written the base Processor class would create copy of the input image and hand it to the process_inplace function.

This latter approach mallocs and copies more memory than necessary

Reimplemented from EMAN::Processor.

Definition at line 4945 of file processor.h.

4946 {
4947 return BooleanShrinkProcessor::process<LessThan>(image, params);
4948 }

References EMAN::Processor::params.

◆ process_inplace()

virtual void EMAN::MinShrinkProcessor::process_inplace ( EMData image)
inlinevirtual

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 4951 of file processor.h.

4952 {
4953 BooleanShrinkProcessor::process_inplace<LessThan>(image, params);
4954 }

References EMAN::Processor::params.

Member Data Documentation

◆ NAME

const string MinShrinkProcessor::NAME = "math.minshrink"
static

Definition at line 4977 of file processor.h.

Referenced by get_name().


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