Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File 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]
List of all members.

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

ProcessorNEW ()

Static Public Attributes

const string NAME = "math.minshrink"

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:
n The shrink factor
search The search area (cubic volume width, usually the same as shrink)

Definition at line 3345 of file processor.h.


Member Function Documentation

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

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

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

03370                         {
03371                                 return NAME;
03372                         }

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

References EMAN::TypeDict::put().

03379                         {
03380                                 TypeDict d;
03381                                 d.put("n", EMObject::INT, "The shrink factor");
03382                                 d.put("search", EMObject::INT, "The search area (cubic volume width, usually the same as shrink)");
03383                                 return d;
03384                         }

Processor* EMAN::MinShrinkProcessor::NEW  )  [inline, static]
 

Definition at line 3373 of file processor.h.

03374                         {
03375                                 return new MinShrinkProcessor();
03376                         }

virtual EMData* EMAN::MinShrinkProcessor::process const EMData *const   image  )  [inline, virtual]
 

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

03355                         {
03356                                 return BooleanShrinkProcessor::process<LessThan>(image, params);
03357                         }

virtual void EMAN::MinShrinkProcessor::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:
image The image to be processed.

Implements EMAN::Processor.

Definition at line 3360 of file processor.h.

03361                         {
03362                                 BooleanShrinkProcessor::process_inplace<LessThan>(image, params);
03363                         }


Member Data Documentation

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

Definition at line 125 of file processor.cpp.


The documentation for this class was generated from the following files:
Generated on Thu Nov 17 12:46:11 2011 for EMAN2 by  doxygen 1.3.9.1