CustusX  2023.01.05-dev+develop.0da12
An IGT application
cxConnectedThresholdImageFilter.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 CXCONNECTEDTHRESHOLDIMAGEFILTER_H_
13 #define CXCONNECTEDTHRESHOLDIMAGEFILTER_H_
14 
16 #include "cxResourceFilterExport.h"
17 #include "cxAlgorithmHelpers.h"
18 
19 namespace cx
20 {
21 typedef boost::shared_ptr<class VisServices> VisServicesPtr;
22 
39 class cxResourceFilter_EXPORT ConnectedThresholdImageFilter : public ThreadedTimedAlgorithm<vtkImageDataPtr>
40 {
41  Q_OBJECT
42 
43 public:
44  ConnectedThresholdImageFilter(VisServicesPtr services);
46 
47  void setInput(ImagePtr image, QString outputBasePath, float lowerThreshold, float upperThreshold, int replaceValue, itkImageType::IndexType seed);
48  virtual void execute() { throw "not implemented!!"; }
49  ImagePtr getOutput();
50 
51 private slots:
52  virtual void postProcessingSlot();
53 
54 private:
55  virtual vtkImageDataPtr calculate();
56 
57  VisServicesPtr mServices;
58  QString mOutputBasePath;
59  ImagePtr mInput;
60  ImagePtr mOutput;
61 
62  float mLowerThreshold;
63  float mUpperTheshold;
64  int mReplaceValue;
65  itkImageType::IndexType mSeed;
66 };
67 
71 }
72 
73 #endif /* CXCONNECTEDTHRESHOLDIMAGEFILTER_H_ */
Base class for algorithms that wants to thread and time their execution. T is the return type of the ...
boost::shared_ptr< class VisServices > VisServicesPtr
Definition: cxMainWindow.h:40
boost::shared_ptr< class Image > ImagePtr
Definition: cxDicomWidget.h:27
vtkSmartPointer< class vtkImageData > vtkImageDataPtr
Namespace for all CustusX production code.