CustusX
15.3.3-beta
An IGT application
|
#include <cxFilter.h>
Public Slots | |
virtual void | requestSetPresetSlot (QString name)=0 |
Signals | |
void | changed () |
Public Member Functions | |
Filter () | |
virtual | ~Filter () |
virtual QString | getUid () const =0 |
virtual void | initialize (QDomElement root, QString uid="")=0 |
virtual QString | getType () const =0 |
virtual QString | getName () const =0 |
virtual QString | getHelp () const =0 |
virtual std::vector< PropertyPtr > | getOptions ()=0 |
virtual std::vector < SelectDataStringPropertyBasePtr > | getInputTypes ()=0 |
virtual std::vector < SelectDataStringPropertyBasePtr > | getOutputTypes ()=0 |
virtual bool | hasPresets ()=0 |
virtual PresetsPtr | getPresets ()=0 |
virtual QDomElement | generatePresetFromCurrentlySetOptions (QString name)=0 |
virtual void | setActive (bool on)=0 |
virtual bool | preProcess ()=0 |
virtual bool | execute ()=0 |
virtual bool | postProcess ()=0 |
Base class for CustusX filters/algorithms
Intended for use in a multithreaded environment.
The methods getHelp(), getName(), getInputTypes(), getOutputTypes(), getOptions() can be used outside of actual filter execution for initialization and gui interaction.
preProcess(), execute() and postProcess() must be called in sequence and together executes the algorithm. They work on a copy of the input data (the input volumes themselved are not copied, only pointers and options).
Definition at line 71 of file cxFilter.h.
cx::Filter::Filter | ( | ) |
Definition at line 38 of file cxFilter.cpp.
|
inlinevirtual |
Definition at line 77 of file cxFilter.h.
|
signal |
Signals that the filters internal structures has changed.
|
pure 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.
input | List of data inputs corresponding to getInputTypes() |
settings | Reference to settings file containing algorithm-specific settings |
Implemented in cx::TubeSegmentationFilter, cx::RouteToTargetFilter, cx::BinaryThresholdImageFilter, cx::ContourFilter, cx::LevelSetFilter, cx::BinaryThinningImageFilter3DFilter, cx::SmoothingImageFilter, cx::DummyFilter, cx::ResampleImageFilter, and cx::DilationFilter.
|
pure virtual |
Generates a preset from the filters currently set options.
Implemented in cx::TubeSegmentationFilter, and cx::FilterImpl.
|
pure virtual |
Return a help text describing algorithm usage.
Implemented in cx::TubeSegmentationFilter, cx::RouteToTargetFilter, cx::BinaryThresholdImageFilter, cx::ContourFilter, cx::LevelSetFilter, cx::BinaryThinningImageFilter3DFilter, cx::ResampleImageFilter, cx::SmoothingImageFilter, cx::DummyFilter, and cx::DilationFilter.
|
pure virtual |
List of input arguments.
Implemented in cx::FilterImpl.
|
pure virtual |
Return a descriptive name for this algorithm.
Implemented in cx::TubeSegmentationFilter, cx::RouteToTargetFilter, cx::BinaryThresholdImageFilter, cx::ContourFilter, cx::LevelSetFilter, cx::BinaryThinningImageFilter3DFilter, cx::ResampleImageFilter, cx::SmoothingImageFilter, cx::DummyFilter, and cx::DilationFilter.
|
pure virtual |
Fill options for this algorithm. The options use the input xml noe from init to fill.
Implemented in cx::FilterImpl.
|
pure virtual |
Return a help text describing algorithm usage.
Implemented in cx::FilterImpl.
|
pure virtual |
Returns the filters presets.
Implemented in cx::TubeSegmentationFilter, and cx::FilterImpl.
|
pure virtual |
Return the type of this algorithm.
Implemented in cx::TubeSegmentationFilter, cx::RouteToTargetFilter, cx::BinaryThresholdImageFilter, cx::ContourFilter, cx::LevelSetFilter, cx::BinaryThinningImageFilter3DFilter, cx::ResampleImageFilter, cx::SmoothingImageFilter, cx::DummyFilter, and cx::DilationFilter.
|
pure virtual |
Return a unique string for this algorithm.
Implemented in cx::FilterImpl.
|
pure virtual |
Checks wheter the filter has defined a set of presets.
Implemented in cx::TubeSegmentationFilter, and cx::FilterImpl.
|
pure virtual |
Initialize algorithm Fill options for this algorithm. Input is the root node for this algo, filled with stored settings (if any).
Set uid - if no uid is given, a default based on class name is used.
Implemented in cx::FilterImpl.
|
pure 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.
Implemented in cx::TubeSegmentationFilter, cx::RouteToTargetFilter, cx::BinaryThresholdImageFilter, cx::ContourFilter, cx::LevelSetFilter, cx::BinaryThinningImageFilter3DFilter, cx::SmoothingImageFilter, cx::DummyFilter, cx::ResampleImageFilter, and cx::DilationFilter.
|
pure 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)
outputPath | is path to data files for current patient. |
Implemented in cx::FilterImpl, cx::BinaryThresholdImageFilter, cx::ContourFilter, cx::LevelSetFilter, cx::BinaryThinningImageFilter3DFilter, and cx::DilationFilter.
|
pure virtualslot |
Ask the filter to load a preset.
Implemented in cx::TubeSegmentationFilter.
|
pure 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.
Implemented in cx::FilterImpl, cx::BinaryThresholdImageFilter, cx::ContourFilter, and cx::LevelSetFilter.