Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
mitkUnstructuredGridClusteringFilter.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkUnstructuredGridClusteringFilter_h
14 #define mitkUnstructuredGridClusteringFilter_h
15 
17 
18 #include <mitkCommon.h>
19 
20 #include <mitkUnstructuredGrid.h>
22 #include <vtkIdList.h>
23 #include <vtkPoints.h>
24 #include <vtkSmartPointer.h>
25 
26 namespace mitk
27 {
63  {
64  public:
66  itkFactorylessNewMacro(Self);
67  itkCloneMacro(Self);
68 
70  itkSetMacro(eps, double);
71  itkGetMacro(eps, double);
72 
74  itkSetMacro(MinPts, int);
75  itkGetMacro(MinPts, int);
76 
78  itkSetMacro(Meshing, bool);
79 
81  virtual std::vector<mitk::UnstructuredGrid::Pointer> GetAllClusters();
82 
84  virtual int GetNumberOfFoundClusters();
85 
86  protected:
89 
92 
94  void GenerateOutputInformation() override;
95 
97  void GenerateData() override;
98 
99  private:
101  void ExpandCluster(int id, vtkIdList *pointIDs, vtkPoints *cluster, vtkPoints *inpPoints);
102 
104  mitk::UnstructuredGrid::Pointer m_UnstructGrid;
105 
107  std::vector<vtkSmartPointer<vtkPoints>> m_Clusters;
108 
110  std::vector<vtkSmartPointer<vtkDoubleArray>> m_DistanceArrays;
111 
113  double m_eps;
114 
116  int m_MinPts;
117 
119  bool m_Meshing;
120 
123  bool m_DistCalc;
124  };
125 
126 } // namespace mitk
127 
128 #endif
mitk::eps
const MITKCORE_EXPORT ScalarType eps
mitk::UnstructuredGridToUnstructuredGridFilter
Definition: mitkUnstructuredGridToUnstructuredGridFilter.h:26
mitk::UnstructuredGridClusteringFilter
This filter uses the DBSCAN algorithm for clustering an mitk::UnstructuredGrid. "MinPts" defines the ...
Definition: mitkUnstructuredGridClusteringFilter.h:62
mitkUnstructuredGridToUnstructuredGridFilter.h
itk::SmartPointer< Self >
MitkAlgorithmsExtExports.h
mitkUnstructuredGrid.h
MITKALGORITHMSEXT_EXPORT
#define MITKALGORITHMSEXT_EXPORT
Definition: MitkAlgorithmsExtExports.h:15
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::BaseDataSource
Superclass of all classes generating some kind of mitk::BaseData.
Definition: mitkBaseDataSource.h:71
mitkCommon.h
mitkClassMacro
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36