Fraxinus  16.5.0-fx-rc9
An IGT application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cx::ContourFilter Class Reference

#include <cxContourFilter.h>

Inheritance diagram for cx::ContourFilter:
cx::FilterImpl cx::Filter

Public Member Functions

 ContourFilter (VisServicesPtr services)
 
virtual ~ContourFilter ()
 
virtual QString getType () const
 
virtual QString getName () const
 
virtual QString getHelp () const
 
virtual void setActive (bool on)
 
bool preProcess ()
 
virtual bool execute ()
 
virtual bool postProcess ()
 
BoolPropertyPtr getReduceResolutionOption (QDomElement root)
 
BoolPropertyPtr getSmoothingOption (QDomElement root)
 
BoolPropertyPtr getPreserveTopologyOption (QDomElement root)
 
DoublePropertyPtr getSurfaceThresholdOption (QDomElement root)
 
DoublePropertyPtr getDecimationOption (QDomElement root)
 
ColorPropertyPtr getColorOption (QDomElement root)
 
- Public Member Functions inherited from cx::FilterImpl
virtual ~FilterImpl ()
 
virtual QString getUid () const
 
virtual void initialize (QDomElement root, QString uid="")
 
virtual std::vector< PropertyPtrgetOptions ()
 
virtual std::vector
< SelectDataStringPropertyBasePtr
getInputTypes ()
 
virtual std::vector
< SelectDataStringPropertyBasePtr
getOutputTypes ()
 
virtual bool hasPresets ()
 
virtual PresetsPtr getPresets ()
 
virtual QDomElement generatePresetFromCurrentlySetOptions (QString name)
 
- Public Member Functions inherited from cx::Filter
 Filter ()
 
virtual ~Filter ()
 

Static Public Member Functions

static vtkPolyDataPtr execute (vtkImageDataPtr input, double threshold, bool reduceResolution=false, bool smoothing=true, bool preserveTopology=true, double decimation=0.2)
 
static MeshPtr postProcess (PatientModelServicePtr patient, vtkPolyDataPtr contour, ImagePtr base, QColor color)
 

Protected Member Functions

virtual void createOptions ()
 
virtual void createInputTypes ()
 
virtual void createOutputTypes ()
 
- Protected Member Functions inherited from cx::FilterImpl
 FilterImpl (VisServicesPtr services)
 
ImagePtr getCopiedInputImage (int index=0)
 
void updateThresholdFromImageChange (QString uid, DoublePropertyPtr threshold)
 
void updateThresholdPairFromImageChange (QString uid, DoublePairPropertyPtr threshold)
 
PatientModelServicePtr patientService ()
 

Additional Inherited Members

- Public Slots inherited from cx::FilterImpl
virtual void requestSetPresetSlot (QString name)
 
- Public Slots inherited from cx::Filter
virtual void requestSetPresetSlot (QString name)=0
 
- Signals inherited from cx::Filter
void changed ()
 
- Protected Attributes inherited from cx::FilterImpl
std::vector
< SelectDataStringPropertyBasePtr
mInputTypes
 
std::vector
< SelectDataStringPropertyBasePtr
mOutputTypes
 
std::vector< PropertyPtrmOptionsAdapters
 
QDomElement mOptions
 
std::vector< DataPtrmCopiedInput
 
QDomElement mCopiedOptions
 
bool mActive
 
VisServicesPtr mServices
 

Detailed Description

Marching cubes surface generation.

Date
Nov 25, 2012
Author
christiana

Definition at line 49 of file cxContourFilter.h.

Constructor & Destructor Documentation

cx::ContourFilter::ContourFilter ( VisServicesPtr  services)

Definition at line 59 of file cxContourFilter.cpp.

virtual cx::ContourFilter::~ContourFilter ( )
inlinevirtual

Definition at line 55 of file cxContourFilter.h.

Member Function Documentation

void cx::ContourFilter::createInputTypes ( )
protectedvirtual

Implements cx::FilterImpl.

Definition at line 145 of file cxContourFilter.cpp.

void cx::ContourFilter::createOptions ( )
protectedvirtual

Implements cx::FilterImpl.

Definition at line 129 of file cxContourFilter.cpp.

void cx::ContourFilter::createOutputTypes ( )
protectedvirtual

Implements cx::FilterImpl.

Definition at line 156 of file cxContourFilter.cpp.

bool cx::ContourFilter::execute ( )
virtual

Execute filter with the given inputs and produce an output. This method is threadable - can be executed in a secondary thread. Assumes preprocess has been called.

Returns
success.

Implements cx::Filter.

Definition at line 215 of file cxContourFilter.cpp.

vtkPolyDataPtr cx::ContourFilter::execute ( vtkImageDataPtr  input,
double  threshold,
bool  reduceResolution = false,
bool  smoothing = true,
bool  preserveTopology = true,
double  decimation = 0.2 
)
static

This is the core algorithm, call this if you dont need all the filter stuff. Generate a contour from a vtkImageData.

Definition at line 240 of file cxContourFilter.cpp.

ColorPropertyPtr cx::ContourFilter::getColorOption ( QDomElement  root)

Definition at line 122 of file cxContourFilter.cpp.

DoublePropertyPtr cx::ContourFilter::getDecimationOption ( QDomElement  root)

Definition at line 113 of file cxContourFilter.cpp.

QString cx::ContourFilter::getHelp ( ) const
virtual

Return a help text describing algorithm usage.

Implements cx::Filter.

Definition at line 74 of file cxContourFilter.cpp.

QString cx::ContourFilter::getName ( ) const
virtual

Return a descriptive name for this algorithm.

Implements cx::Filter.

Definition at line 64 of file cxContourFilter.cpp.

BoolPropertyPtr cx::ContourFilter::getPreserveTopologyOption ( QDomElement  root)

Definition at line 98 of file cxContourFilter.cpp.

BoolPropertyPtr cx::ContourFilter::getReduceResolutionOption ( QDomElement  root)

Definition at line 86 of file cxContourFilter.cpp.

BoolPropertyPtr cx::ContourFilter::getSmoothingOption ( QDomElement  root)

Definition at line 92 of file cxContourFilter.cpp.

DoublePropertyPtr cx::ContourFilter::getSurfaceThresholdOption ( QDomElement  root)

Definition at line 104 of file cxContourFilter.cpp.

QString cx::ContourFilter::getType ( ) const
virtual

Return the type of this algorithm.

Implements cx::Filter.

Definition at line 69 of file cxContourFilter.cpp.

bool cx::ContourFilter::postProcess ( )
virtual

Perform postprocessing tasks and set result from calculation into the output adapters.

Must be called from the main thread. Assumes execute() has been called.

Returns
success.

Implements cx::Filter.

Definition at line 316 of file cxContourFilter.cpp.

MeshPtr cx::ContourFilter::postProcess ( PatientModelServicePtr  patient,
vtkPolyDataPtr  contour,
ImagePtr  base,
QColor  color 
)
static

Generate a mesh from the contour using base to generate name. Save to dataManager.

Definition at line 336 of file cxContourFilter.cpp.

bool cx::ContourFilter::preProcess ( )
virtual

Perform main thread preprocessing. Copies input data from options and the input adapters into thread-safe storage. Assumes getOptions(), getInputTypes(), getOutputTypes() has been called (this initializes options)

Returns
success.

Reimplemented from cx::FilterImpl.

Definition at line 209 of file cxContourFilter.cpp.

void cx::ContourFilter::setActive ( bool  on)
virtual

Set Active state. Active filters are used by the ui (or similar) and can interact with the system, for example by showing a preview.

Inactive filters should no interact with the system.

Reimplemented from cx::FilterImpl.

Definition at line 166 of file cxContourFilter.cpp.


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