NorMIT-nav  18.04
An IGT application
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< SelectDataStringPropertyBasePtrgetInputTypes ()
 
virtual std::vector< SelectDataStringPropertyBasePtrgetOutputTypes ()
 
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 QString getNameSuffix ()
 
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< SelectDataStringPropertyBasePtrmInputTypes
 
std::vector< SelectDataStringPropertyBasePtrmOutputTypes
 
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 28 of file cxContourFilter.h.

Constructor & Destructor Documentation

cx::ContourFilter::ContourFilter ( VisServicesPtr  services)

Definition at line 38 of file cxContourFilter.cpp.

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

Definition at line 34 of file cxContourFilter.h.

Member Function Documentation

void cx::ContourFilter::createInputTypes ( )
protectedvirtual

Implements cx::FilterImpl.

Definition at line 129 of file cxContourFilter.cpp.

void cx::ContourFilter::createOptions ( )
protectedvirtual

Implements cx::FilterImpl.

Definition at line 113 of file cxContourFilter.cpp.

void cx::ContourFilter::createOutputTypes ( )
protectedvirtual

Implements cx::FilterImpl.

Definition at line 140 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 201 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 226 of file cxContourFilter.cpp.

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

Definition at line 106 of file cxContourFilter.cpp.

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

Definition at line 97 of file cxContourFilter.cpp.

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

Return a help text describing algorithm usage.

Implements cx::Filter.

Definition at line 53 of file cxContourFilter.cpp.

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

Return a descriptive name for this algorithm.

Implements cx::Filter.

Definition at line 43 of file cxContourFilter.cpp.

QString cx::ContourFilter::getNameSuffix ( )
static

Definition at line 65 of file cxContourFilter.cpp.

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

Definition at line 82 of file cxContourFilter.cpp.

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

Definition at line 70 of file cxContourFilter.cpp.

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

Definition at line 76 of file cxContourFilter.cpp.

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

Definition at line 88 of file cxContourFilter.cpp.

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

Return the type of this algorithm. Need to match id string in user documentation

Implements cx::Filter.

Definition at line 48 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 302 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 322 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 195 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 150 of file cxContourFilter.cpp.


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