CustusX  18.04
An IGT application
cx::BinaryThresholdImageFilter Class Reference

#include <cxBinaryThresholdImageFilter.h>

Inheritance diagram for cx::BinaryThresholdImageFilter:
cx::FilterImpl cx::Filter

Public Member Functions

 BinaryThresholdImageFilter (VisServicesPtr services)
 
virtual ~BinaryThresholdImageFilter ()
 
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 ()
 
DoublePairPropertyPtr getThresholdOption (QDomElement root)
 
ColorPropertyPtr getColorOption (QDomElement root)
 
BoolPropertyPtr getGenerateSurfaceOption (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 ()
 

Protected Slots

void thresholdSlot ()
 

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 ()
 

Protected Attributes

ImagePtr mPreviewImage
 
- 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
 

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 ()
 

Detailed Description

Filter wrapping a itk::BinaryThresholdImageFilter.

Date
Nov 21, 2012
Author
christiana

Definition at line 31 of file cxBinaryThresholdImageFilter.h.

Constructor & Destructor Documentation

cx::BinaryThresholdImageFilter::BinaryThresholdImageFilter ( VisServicesPtr  services)

Definition at line 36 of file cxBinaryThresholdImageFilter.cpp.

virtual cx::BinaryThresholdImageFilter::~BinaryThresholdImageFilter ( )
inlinevirtual

Definition at line 37 of file cxBinaryThresholdImageFilter.h.

Member Function Documentation

void cx::BinaryThresholdImageFilter::createInputTypes ( )
protectedvirtual

Implements cx::FilterImpl.

Definition at line 95 of file cxBinaryThresholdImageFilter.cpp.

void cx::BinaryThresholdImageFilter::createOptions ( )
protectedvirtual

Implements cx::FilterImpl.

Definition at line 86 of file cxBinaryThresholdImageFilter.cpp.

void cx::BinaryThresholdImageFilter::createOutputTypes ( )
protectedvirtual

Implements cx::FilterImpl.

Definition at line 106 of file cxBinaryThresholdImageFilter.cpp.

bool cx::BinaryThresholdImageFilter::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.

because the segmented image is 0..1

Implements cx::Filter.

Definition at line 161 of file cxBinaryThresholdImageFilter.cpp.

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

Definition at line 79 of file cxBinaryThresholdImageFilter.cpp.

BoolPropertyPtr cx::BinaryThresholdImageFilter::getGenerateSurfaceOption ( QDomElement  root)

Definition at line 71 of file cxBinaryThresholdImageFilter.cpp.

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

Return a help text describing algorithm usage.

Implements cx::Filter.

Definition at line 51 of file cxBinaryThresholdImageFilter.cpp.

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

Return a descriptive name for this algorithm.

Implements cx::Filter.

Definition at line 41 of file cxBinaryThresholdImageFilter.cpp.

DoublePairPropertyPtr cx::BinaryThresholdImageFilter::getThresholdOption ( QDomElement  root)

Definition at line 63 of file cxBinaryThresholdImageFilter.cpp.

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

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

Implements cx::Filter.

Definition at line 46 of file cxBinaryThresholdImageFilter.cpp.

bool cx::BinaryThresholdImageFilter::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 210 of file cxBinaryThresholdImageFilter.cpp.

bool cx::BinaryThresholdImageFilter::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 154 of file cxBinaryThresholdImageFilter.cpp.

void cx::BinaryThresholdImageFilter::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 121 of file cxBinaryThresholdImageFilter.cpp.

void cx::BinaryThresholdImageFilter::thresholdSlot ( )
protectedslot

Definition at line 142 of file cxBinaryThresholdImageFilter.cpp.

Member Data Documentation

ImagePtr cx::BinaryThresholdImageFilter::mPreviewImage
protected

Definition at line 73 of file cxBinaryThresholdImageFilter.h.


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