Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef _MITKUNSTRUCTUREDGRIDCLUSTERINGFILTER_h__
18 #define _MITKUNSTRUCTUREDGRIDCLUSTERINGFILTER_h__
19 
21 
22 #include <mitkCommon.h>
23 
24 #include <mitkUnstructuredGrid.h>
26 #include <vtkIdList.h>
27 #include <vtkPoints.h>
28 #include <vtkSmartPointer.h>
29 
30 namespace mitk
31 {
67  {
68  public:
70  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
71 
72 
73  itkSetMacro(eps, double) itkGetMacro(eps, double)
74 
75 
76  itkSetMacro(MinPts, int) itkGetMacro(MinPts, int)
77 
78 
79  itkSetMacro(Meshing, bool)
80 
81 
82  virtual std::vector<mitk::UnstructuredGrid::Pointer> GetAllClusters();
83 
85  virtual int GetNumberOfFoundClusters();
86 
87  protected:
90 
93 
95  virtual void GenerateOutputInformation();
96 
98  virtual void GenerateData();
99 
100  private:
102  void ExpandCluster(int id, vtkIdList *pointIDs, vtkPoints *cluster, vtkPoints *inpPoints);
103 
105  mitk::UnstructuredGrid::Pointer m_UnstructGrid;
106 
108  std::vector<vtkSmartPointer<vtkPoints>> m_Clusters;
109 
111  std::vector<vtkSmartPointer<vtkDoubleArray>> m_DistanceArrays;
112 
114  double m_eps;
115 
117  int m_MinPts;
118 
120  bool m_Meshing;
121 
124  bool m_DistCalc;
125  };
126 
127 } // namespace mitk
128 
129 #endif //_MITKUNSTRUCTUREDGRIDCLUSTERINGFILTER_h__
Superclass of all classes generating some kind of mitk::BaseData.
DataCollection - Class to facilitate loading/accessing structured data.
#define MITKALGORITHMSEXT_EXPORT
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44
This filter uses the DBSCAN algorithm for clustering an mitk::UnstructuredGrid. "MinPts" defines the ...
MITKCORE_EXPORT const ScalarType eps