CustusX  2023.01.05-dev+develop.0da12
An IGT application
cxFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 
12 #ifndef CXFILTER_H
13 #define CXFILTER_H
14 
15 #include "cxResourceFilterExport.h"
16 
17 #include <vector>
18 #include <QObject>
19 
20 #include "cxPresets.h"
21 #include "cxForwardDeclarations.h"
22 class QDomElement;
23 
24 #define FilterService_iid "cx::Filter"
25 
26 namespace cx
27 {
28 typedef boost::shared_ptr<class SelectDataStringPropertyBase> SelectDataStringPropertyBasePtr;
29 
30 typedef boost::shared_ptr<class Filter> FilterPtr;
31 
32 
50 class cxResourceFilter_EXPORT Filter : public QObject
51 {
52  Q_OBJECT
53 
54 public:
55  Filter();
56  virtual ~Filter() {}
57 
61  virtual QString getUid() const = 0;
69  virtual void initialize(QDomElement root, QString uid = "") = 0;
73  virtual QString getType() const = 0;
77  virtual QString getName() const = 0;
81  virtual QString getHelp() const = 0;
86  virtual std::vector<PropertyPtr> getOptions() = 0;
90  virtual std::vector<SelectDataStringPropertyBasePtr> getInputTypes() = 0;
94  virtual std::vector<SelectDataStringPropertyBasePtr> getOutputTypes() = 0;
95 
99  virtual bool hasPresets() = 0;
100 
104  virtual PresetsPtr getPresets() = 0;
108  virtual QDomElement generatePresetFromCurrentlySetOptions(QString name) = 0;
116  virtual void setActive(bool on) = 0;
125  virtual bool preProcess() = 0;
133  virtual bool execute() = 0;
144  virtual bool postProcess() = 0;
145 
146 public slots:
150  virtual void requestSetPresetSlot(QString name) = 0;
151 
152 signals:
156  void changed();
157 
158 };
159 
160 } // namespace cx
161 
162 Q_DECLARE_INTERFACE(cx::Filter, FilterService_iid)
163 
164 #endif // CXFILTER_H
virtual ~Filter()
Definition: cxFilter.h:56
#define FilterService_iid
Definition: cxFilter.h:24
boost::shared_ptr< class Filter > FilterPtr
boost::shared_ptr< class SelectDataStringPropertyBase > SelectDataStringPropertyBasePtr
boost::shared_ptr< class Presets > PresetsPtr
Namespace for all CustusX production code.