NorMIT-nav  22.09
An IGT application
cxPipeline.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 #ifndef CXPIPELINE_H
12 #define CXPIPELINE_H
13 
14 #include "cxResourceFilterExport.h"
15 
16 #include "cxFilter.h"
17 #include "cxFilterGroup.h"
18 #include "cxXmlOptionItem.h"
20 
21 namespace cx
22 {
23 typedef boost::shared_ptr<class TimedBaseAlgorithm> TimedAlgorithmPtr;
24 typedef boost::shared_ptr<class CompositeTimedAlgorithm> CompositeTimedAlgorithmPtr;
25 
26 typedef boost::shared_ptr<class StringPropertyFusedInputOutputSelectData> StringPropertyFusedInputOutputSelectDataPtr;
27 
37 {
38  Q_OBJECT
39 public:
42 
43 public: // basic methods
44  virtual QString getDisplayName() const;
45  virtual bool setValue(const QString& value);
46  virtual QString getValue() const;
47 
48 public: // optional methods
49  virtual QStringList getValueRange() const;
50  virtual QString convertInternal2Display(QString internal);
51  virtual QString getHelp() const;
52 
53 public: // interface extension
54  virtual DataPtr getData() const;
55  virtual void setValueName(const QString name);
56  virtual void setHelp(QString text);
57 
58 protected slots:
59  void inputDataChangedSlot();
60  void changedSlot();
61 
62 protected:
66  QString mValueName;
67 };
68 
69 
70 
78 class cxResourceFilter_EXPORT Pipeline : public QObject
79 {
80  Q_OBJECT
81 public:
82  explicit Pipeline(PatientModelServicePtr patientModelService, QObject *parent = 0);
86  void initialize(FilterGroupPtr filter);
90  FilterGroupPtr getFilters() const;
97  void setOption(QString valueName, QVariant value);
106  std::vector<SelectDataStringPropertyBasePtr> getNodes();
112  TimedAlgorithmPtr getTimedAlgorithm(QString uid);
119  TimedAlgorithmPtr getPipelineTimedAlgorithm();
129  void execute(QString uid = "");
130 
131 signals:
132 
133 public slots:
134  void nodeValueChanged(QString uid, int index);
135 
136 private:
137  void setOption(PropertyPtr adapter, QVariant value);
138  std::vector<SelectDataStringPropertyBasePtr> createNodes();
139 
140  FilterGroupPtr mFilters;
141  std::vector<SelectDataStringPropertyBasePtr> mNodes;
142  std::map<QString, TimedAlgorithmPtr> mTimedAlgorithm;
143  CompositeTimedAlgorithmPtr mCompositeTimedAlgorithm;
144  PatientModelServicePtr mPatientModelService;
145 };
146 typedef boost::shared_ptr<Pipeline> PipelinePtr;
147 
148 } // namespace cx
149 
150 #endif // CXPIPELINE_H
cx::SelectDataStringPropertyBase
Definition: cxSelectDataStringPropertyBase.h:32
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cxXmlOptionItem.h
cx::TimedAlgorithmPtr
boost::shared_ptr< class TimedBaseAlgorithm > TimedAlgorithmPtr
Definition: cxReconstructionExecuter.h:27
cx::PropertyPtr
boost::shared_ptr< class Property > PropertyPtr
Definition: cxLocalServerStreamerServer.h:25
cxFilter.h
cx::PatientModelServicePtr
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
Definition: cxLogicManager.h:25
cx::DataPtr
boost::shared_ptr< class Data > DataPtr
Definition: cxRegistrationApplicator.h:22
cx::StringPropertyFusedInputOutputSelectData::mValueName
QString mValueName
Definition: cxPipeline.h:66
cx::PipelinePtr
boost::shared_ptr< Pipeline > PipelinePtr
Definition: cxPipeline.h:146
cx::StringPropertyFusedInputOutputSelectData::~StringPropertyFusedInputOutputSelectData
virtual ~StringPropertyFusedInputOutputSelectData()
Definition: cxPipeline.h:40
cx::StringPropertyFusedInputOutputSelectDataPtr
boost::shared_ptr< class StringPropertyFusedInputOutputSelectData > StringPropertyFusedInputOutputSelectDataPtr
Definition: cxPipeline.h:26
cxFilterGroup.h
cx::CompositeTimedAlgorithmPtr
boost::shared_ptr< class CompositeTimedAlgorithm > CompositeTimedAlgorithmPtr
Definition: cxUsReconstructionService.h:34
cx::FilterGroupPtr
boost::shared_ptr< FilterGroup > FilterGroupPtr
Definition: cxFilterGroup.h:65
cx::StringPropertyFusedInputOutputSelectData::mBase
SelectDataStringPropertyBasePtr mBase
Definition: cxPipeline.h:65
cxSelectDataStringProperty.h
cx::Pipeline
Definition: cxPipeline.h:78
cx::StringPropertyFusedInputOutputSelectData::mInput
SelectDataStringPropertyBasePtr mInput
Definition: cxPipeline.h:64
cx::SelectDataStringPropertyBasePtr
boost::shared_ptr< class SelectDataStringPropertyBase > SelectDataStringPropertyBasePtr
Definition: cxMeshGlyphsWidget.h:26
cx::StringPropertyFusedInputOutputSelectData
Definition: cxPipeline.h:36