CustusX  18.04
An IGT application
cxBinaryThresholdImageFilter.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 CXSBINARYTHRESHOLDIMAGEFILTER_H_
13 #define CXSBINARYTHRESHOLDIMAGEFILTER_H_
14 
15 #include "cxFilterImpl.h"
16 
17 namespace cx
18 {
31 class cxResourceFilter_EXPORT BinaryThresholdImageFilter : public FilterImpl
32 {
33  Q_OBJECT
34 
35 public:
38 
39  virtual QString getType() const;
40  virtual QString getName() const;
41  virtual QString getHelp() const;
42  virtual void setActive(bool on);
43 
44  bool preProcess();
45  virtual bool execute();
46  virtual bool postProcess();
47 
48  // extensions:
49  DoublePairPropertyPtr getThresholdOption(QDomElement root);
50  ColorPropertyPtr getColorOption(QDomElement root);
51  BoolPropertyPtr getGenerateSurfaceOption(QDomElement root);
52 
53 protected:
54  virtual void createOptions();
55  virtual void createInputTypes();
56  virtual void createOutputTypes();
57 
58 protected slots:
59  void thresholdSlot();
60 private slots:
63  void imageChangedSlot(QString uid);
64 
65 private:
66  void stopPreview();
67 
68  DoublePairPropertyPtr mThresholdOption;
69  vtkImageDataPtr mRawResult;
70  vtkPolyDataPtr mRawContour;
71 
72 protected:
74 };
75 typedef boost::shared_ptr<class BinaryThresholdImageFilter> BinaryThresholdImageFilterPtr;
76 
77 
81 }//namespace cx
82 
83 #endif /* CXSBINARYTHRESHOLDIMAGEFILTER_H_ */
boost::shared_ptr< class ColorProperty > ColorPropertyPtr
boost::shared_ptr< class VisServices > VisServicesPtr
Definition: cxMainWindow.h:40
boost::shared_ptr< class Image > ImagePtr
Definition: cxDicomWidget.h:27
boost::shared_ptr< class BinaryThresholdImageFilter > BinaryThresholdImageFilterPtr
vtkSmartPointer< vtkPolyData > vtkPolyDataPtr
boost::shared_ptr< class DoublePairProperty > DoublePairPropertyPtr
boost::shared_ptr< class BoolProperty > BoolPropertyPtr
vtkSmartPointer< class vtkImageData > vtkImageDataPtr
Namespace for all CustusX production code.