EMAN::BinarySkeletonizerProcessor Class Reference

#include <processor.h>

Inheritance diagram for EMAN::BinarySkeletonizerProcessor:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

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

Static Public Member Functions

static ProcessorNEW ()


Detailed Description

Definition at line 6509 of file processor.h.


Member Function Documentation

EMData * BinarySkeletonizerProcessor::process ( EMData image  )  [virtual]

Definition at line 9556 of file processor.cpp.

References wustl_mm::SkeletonMaker::Volume::get_emdata(), wustl_mm::SkeletonMaker::Volume::getVolumeData(), wustl_mm::SkeletonMaker::VolumeData::owns_emdata, EMAN::Processor::params, and EMAN::Dict::set_default().

Referenced by process_inplace().

09557 {
09558         using namespace wustl_mm::GraySkeletonCPP;
09559         using namespace wustl_mm::SkeletonMaker;
09560 
09561         Volume * vimage = new Volume(image);
09562         VolumeSkeletonizer vskeletonizer;
09563         float threshold = params["threshold"];
09564         int min_curvew = params.set_default("min_curve_width", 3);
09565         int min_srfcw = params.set_default("min_surface_width", 4);
09566         //cout << "PeformPureJuSkeletonization" << endl;
09567         Volume* vskel = vskeletonizer.PerformPureJuSkeletonization(vimage, "unused", static_cast<double>(threshold), min_curvew, min_srfcw);
09568         //cout << "skeletonization done" << endl;
09569         vskel->getVolumeData()->owns_emdata = false; //ensure the EMData object will remain when the Volume and its VolumeData object are freed
09570         EMData* skel = vskel->get_emdata();
09571         //skel->write_image("test-skel.mrc");
09572         return skel;
09573 }

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

Implements EMAN::Processor.

Definition at line 9575 of file processor.cpp.

References process().

09576 {
09577         EMData* em_skel = this->process(image);
09578         *image = *em_skel;
09579         delete em_skel;
09580         em_skel = NULL;
09581         return;
09582 }

virtual string EMAN::BinarySkeletonizerProcessor::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 6515 of file processor.h.

06516                 {
06517                         return "gorgon.binary_skel";
06518                 }

static Processor* EMAN::BinarySkeletonizerProcessor::NEW (  )  [inline, static]

Definition at line 6519 of file processor.h.

06520                 {
06521                         return new BinarySkeletonizerProcessor();
06522                 }

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

06524                 {
06525                         return "Creates a skeleton of the 3D image by considering whether density is above or below a threshold value.";
06526                 }

virtual TypeDict EMAN::BinarySkeletonizerProcessor::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 6527 of file processor.h.

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

06528                 {
06529                         TypeDict d;
06530                         d.put("threshold", EMObject::FLOAT, "Threshold value.");
06531                         d.put("min_curve_width", EMObject::INT, "Minimum curve width.");
06532                         d.put("min_surface_width", EMObject::INT, "Minimum surface width.");
06533                         return d;
06534                 }


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

Generated on Sat Nov 21 02:20:40 2009 for EMAN2 by  doxygen 1.5.6