#include <processor.h>
Inheritance diagram for EMAN::MaxShrinkProcessor:
Public Member Functions | |
virtual EMData * | process (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 Processor * | NEW () |
Static Public Attributes | |
static const string | NAME = "math.maxshrink" |
Classes | |
struct | GreaterThan |
n | The shrink factor | |
search | The search area (cubic volume width, usually the same as shrink) |
Definition at line 3332 of file processor.h.
string EMAN::MaxShrinkProcessor::get_desc | ( | ) | const [inline, virtual] |
Get the descrition of this specific processor.
This function must be overwritten by a subclass.
Implements EMAN::Processor.
Definition at line 3352 of file processor.h.
03353 { 03354 return "Shrink an image by a given amount (default 2), using the maximum value found in the pixel neighborhood."; 03355 }
string EMAN::MaxShrinkProcessor::get_name | ( | ) | const [inline, virtual] |
Get the processor's name.
Each processor is identified by a unique name.
Implements EMAN::Processor.
Definition at line 3357 of file processor.h.
References NAME.
03358 { 03359 return NAME; 03360 }
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.
Reimplemented from EMAN::Processor.
Definition at line 3366 of file processor.h.
References EMAN::EMObject::INT, and EMAN::TypeDict::put().
03367 { 03368 TypeDict d; 03369 d.put("n", EMObject::INT, "The shrink factor"); 03370 d.put("search", EMObject::INT, "The search area (cubic volume width, usually the same as shrink)"); 03371 return d; 03372 }
static Processor* EMAN::MaxShrinkProcessor::NEW | ( | ) | [inline, static] |
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 3341 of file processor.h.
References EMAN::Processor::params.
03342 { 03343 return BooleanShrinkProcessor::process<GreaterThan>(image, params); 03344 }
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.
image | The image to be processed. |
Implements EMAN::Processor.
Definition at line 3347 of file processor.h.
References EMAN::Processor::params.
03348 { 03349 BooleanShrinkProcessor::process_inplace<GreaterThan>(image, params); 03350 }
const string MaxShrinkProcessor::NAME = "math.maxshrink" [static] |