EMAN2
Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes
EMAN::MaxShrinkProcessor Class Reference

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

#include <processor.h>

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

List of all members.

Classes

struct  GreaterThan

Public Member Functions

virtual EMDataprocess (const EMData *const image)
 The max 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.
virtual void process_inplace (EMData *image)
 To process an image in-place.
string get_desc () const
 Get the descrition of this specific processor.
string get_name () const
 Get the processor's name.
TypeDict get_param_types () const
 Get processor parameter information in a dictionary.

Static Public Member Functions

static ProcessorNEW ()

Static Public Attributes

static const string NAME = "math.maxshrink"

Detailed Description

MaxShrinkProcessors shrinks an image by in an integer amount, keeping the maximum 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 3519 of file processor.h.


Member Function Documentation

string EMAN::MaxShrinkProcessor::get_desc ( ) const [inline, virtual]

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

                        {
                                return "Shrink an image by a given amount (default 2), using the maximum value found in the pixel neighborhood.";
                        }
string EMAN::MaxShrinkProcessor::get_name ( ) const [inline, virtual]

Get the processor's name.

Each processor is identified by a unique name.

Returns:
The processor's name.

Implements EMAN::Processor.

Definition at line 3544 of file processor.h.

References NAME.

                        {
                                return NAME;
                        }
TypeDict EMAN::MaxShrinkProcessor::get_param_types ( ) const [inline, virtual]

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

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

                        {
                                TypeDict d;
                                d.put("n", EMObject::INT, "The shrink factor");
                                d.put("search", EMObject::INT, "The search area (cubic volume width, usually the same as shrink)");
                                return d;
                        }
static Processor* EMAN::MaxShrinkProcessor::NEW ( ) [inline, static]

Definition at line 3548 of file processor.h.

                        {
                                return new MaxShrinkProcessor();
                        }
virtual EMData* EMAN::MaxShrinkProcessor::process ( const EMData *const  image) [inline, virtual]

The max 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 more memory than necessary

Reimplemented from EMAN::Processor.

Definition at line 3528 of file processor.h.

References EMAN::Processor::params.

                        {
                                return BooleanShrinkProcessor::process<GreaterThan>(image, params);
                        }
virtual void EMAN::MaxShrinkProcessor::process_inplace ( EMData image) [inline, 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 3534 of file processor.h.

References EMAN::Processor::params.

                        {
                                BooleanShrinkProcessor::process_inplace<GreaterThan>(image, params);
                        }

Member Data Documentation

const string MaxShrinkProcessor::NAME = "math.maxshrink" [static]

Definition at line 3561 of file processor.h.

Referenced by get_name().


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