NorMIT-nav  2023.01.05-dev+develop.0da12
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_ */
cx::FilterImpl
Definition: cxFilterImpl.h:36
cx::ColorPropertyPtr
boost::shared_ptr< class ColorProperty > ColorPropertyPtr
Definition: cxForwardDeclarations.h:144
cx::BinaryThresholdImageFilter
Definition: cxBinaryThresholdImageFilter.h:31
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cx::BinaryThresholdImageFilter::~BinaryThresholdImageFilter
virtual ~BinaryThresholdImageFilter()
Definition: cxBinaryThresholdImageFilter.h:37
cx::BoolPropertyPtr
boost::shared_ptr< class BoolProperty > BoolPropertyPtr
Definition: cxPlusConnectWidget.h:29
cx::VisServicesPtr
boost::shared_ptr< class VisServices > VisServicesPtr
Definition: cxMainWindow.h:40
vtkImageDataPtr
vtkSmartPointer< class vtkImageData > vtkImageDataPtr
Definition: cxVideoConnectionWidget.h:30
cx::BinaryThresholdImageFilterPtr
boost::shared_ptr< class BinaryThresholdImageFilter > BinaryThresholdImageFilterPtr
Definition: cxBinaryThresholdImageFilter.h:75
cx::BinaryThresholdImageFilter::mPreviewImage
ImagePtr mPreviewImage
Definition: cxBinaryThresholdImageFilter.h:73
cx::DoublePairPropertyPtr
boost::shared_ptr< class DoublePairProperty > DoublePairPropertyPtr
Definition: cxForwardDeclarations.h:145
cx::ImagePtr
boost::shared_ptr< class Image > ImagePtr
Definition: cxDicomWidget.h:27
cx::vtkPolyDataPtr
vtkSmartPointer< vtkPolyData > vtkPolyDataPtr
Definition: cxCenterlineRegistration.h:42
cxFilterImpl.h