Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitk::UnstructuredGridClusteringFilter Class Reference

This filter uses the DBSCAN algorithm for clustering an mitk::UnstructuredGrid. "MinPts" defines the number of neighbours which are required to be a kernel point if a point is in range of a kernel point but hasnt enough neighbours this point is added to the cluster but is a density reachable point and the cluster ends at this point. "eps" is the range in which the neighbours are searched. If "Meshing" is set the clusteres UnstructuredGrid is meshed and visible in 2D renderwindows. More...

#include <mitkUnstructuredGridClusteringFilter.h>

Inheritance diagram for mitk::UnstructuredGridClusteringFilter:
Collaboration diagram for mitk::UnstructuredGridClusteringFilter:

Public Member Functions

 mitkClassMacro (UnstructuredGridClusteringFilter, UnstructuredGridToUnstructuredGridFilter) static Pointer New()
 
Pointer Clone () const
 
virtual void Seteps (double _arg)
 
virtual double Geteps ()
 
virtual void SetMinPts (int _arg)
 
virtual int GetMinPts ()
 
virtual void SetMeshing (bool _arg)
 
virtual std::vector< mitk::UnstructuredGrid::PointerGetAllClusters ()
 
virtual int GetNumberOfFoundClusters ()
 
- Public Member Functions inherited from mitk::UnstructuredGridToUnstructuredGridFilter
 mitkClassMacro (UnstructuredGridToUnstructuredGridFilter, UnstructuredGridSource) static Pointer New()
 
Pointer Clone () const
 
const mitk::UnstructuredGridGetInput (void)
 
virtual const mitk::UnstructuredGridGetInput (unsigned int idx)
 
virtual void SetInput (const UnstructuredGrid *grid)
 
virtual void SetInput (unsigned int idx, const UnstructuredGrid *grid)
 
virtual void CreateOutputsForAllInputs (unsigned int idx)
 
- Public Member Functions inherited from mitk::UnstructuredGridSource
 mitkClassMacro (UnstructuredGridSource, BaseDataSource) static Pointer New()
 
Pointer Clone () const
 
virtual mitkBaseDataSourceGetOutputDeclarations itk::DataObject::Pointer MakeOutput (DataObjectPointerArraySizeType idx) override
 
virtual itk::DataObject::Pointer MakeOutput (const DataObjectIdentifierType &name) override
 
- Public Member Functions inherited from mitk::BaseDataSource
virtual std::vector< std::string > GetClassHierarchy () const
 
virtual const char * GetClassName () const
 
OutputTypeGetOutput ()
 
const OutputTypeGetOutput () const
 
OutputTypeGetOutput (DataObjectPointerArraySizeType idx)
 
const OutputTypeGetOutput (DataObjectPointerArraySizeType idx) const
 
virtual void GraftOutput (OutputType *output)
 Graft the specified BaseData onto this BaseDataSource's output. More...
 
virtual void GraftOutput (const DataObjectIdentifierType &key, OutputType *output)
 
virtual void GraftNthOutput (unsigned int idx, OutputType *output)
 Graft the specified base data object onto this BaseDataSource's idx'th output. More...
 
bool Updating () const
 Access itk::ProcessObject::m_Updating. More...
 

Protected Member Functions

 UnstructuredGridClusteringFilter ()
 
virtual ~UnstructuredGridClusteringFilter ()
 
virtual void GenerateOutputInformation ()
 
virtual void GenerateData ()
 
- Protected Member Functions inherited from mitk::UnstructuredGridToUnstructuredGridFilter
 UnstructuredGridToUnstructuredGridFilter ()
 
virtual ~UnstructuredGridToUnstructuredGridFilter ()
 
- Protected Member Functions inherited from mitk::UnstructuredGridSource
 UnstructuredGridSource ()
 
virtual ~UnstructuredGridSource ()
 
- Protected Member Functions inherited from mitk::BaseDataSource
 BaseDataSource ()
 
virtual ~BaseDataSource ()
 

Additional Inherited Members

- Public Types inherited from mitk::UnstructuredGridSource
typedef mitk::UnstructuredGrid OutputType
 
- Public Types inherited from mitk::BaseDataSource
typedef BaseDataSource Self
 
typedef itk::ProcessObject Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef BaseData OutputType
 
typedef itk::DataObject::DataObjectIdentifierType DataObjectIdentifierType
 
- Static Public Member Functions inherited from mitk::BaseDataSource
static const char * GetStaticNameOfClass ()
 
- Static Protected Member Functions inherited from mitk::BaseDataSource
static Pointer New ()
 

Detailed Description

This filter uses the DBSCAN algorithm for clustering an mitk::UnstructuredGrid. "MinPts" defines the number of neighbours which are required to be a kernel point if a point is in range of a kernel point but hasnt enough neighbours this point is added to the cluster but is a density reachable point and the cluster ends at this point. "eps" is the range in which the neighbours are searched. If "Meshing" is set the clusteres UnstructuredGrid is meshed and visible in 2D renderwindows.

DBSCAN algorithm:

DBSCAN(D, eps, MinPts)
C = 0
for each unvisited point P in dataset D
  mark P as visited
  N = D.regionQuery(P, eps)
  if sizeof(N) < MinPts
    mark P as NOISE
  else
    C = next cluster
    expandCluster(P, N, C, eps, MinPts)

expandCluster(P, N, C, eps, MinPts)
  add P to cluster C
  for each point P' in N
    if P' is not visited
      mark P' as visited
      N' = D.regionQuery(P', eps)
      if sizeof(N') >= MinPts
        N = N joined with N'
    if P' is not yet member of any cluster
      add P' to cluster C

Definition at line 66 of file mitkUnstructuredGridClusteringFilter.h.

Constructor & Destructor Documentation

mitk::UnstructuredGridClusteringFilter::UnstructuredGridClusteringFilter ( )
protected

Constructor

Definition at line 32 of file mitkUnstructuredGridClusteringFilter.cpp.

References mitk::UnstructuredGrid::New().

mitk::UnstructuredGridClusteringFilter::~UnstructuredGridClusteringFilter ( )
protectedvirtual

Destructor

Definition at line 38 of file mitkUnstructuredGridClusteringFilter.cpp.

Member Function Documentation

Pointer mitk::UnstructuredGridClusteringFilter::Clone ( ) const
void mitk::UnstructuredGridClusteringFilter::GenerateData ( )
protectedvirtual

Is called by the Update() method

Definition at line 55 of file mitkUnstructuredGridClusteringFilter.cpp.

References clusterVector, mitk::New(), and pLocator.

void mitk::UnstructuredGridClusteringFilter::GenerateOutputInformation ( )
protectedvirtual

Defines the output of the filter

Reimplemented from mitk::UnstructuredGridToUnstructuredGridFilter.

Definition at line 50 of file mitkUnstructuredGridClusteringFilter.cpp.

std::vector< mitk::UnstructuredGrid::Pointer > mitk::UnstructuredGridClusteringFilter::GetAllClusters ( )
virtual

Returns all clusters as UnstructuredGrids which were found

Definition at line 228 of file mitkUnstructuredGridClusteringFilter.cpp.

References mitk::UnstructuredGrid::New(), and mitk::New().

virtual double mitk::UnstructuredGridClusteringFilter::Geteps ( )
virtual
virtual int mitk::UnstructuredGridClusteringFilter::GetMinPts ( )
virtual
int mitk::UnstructuredGridClusteringFilter::GetNumberOfFoundClusters ( )
virtual

Returns the number of the clusters which were found

Definition at line 277 of file mitkUnstructuredGridClusteringFilter.cpp.

mitk::UnstructuredGridClusteringFilter::mitkClassMacro ( UnstructuredGridClusteringFilter  ,
UnstructuredGridToUnstructuredGridFilter   
)
virtual void mitk::UnstructuredGridClusteringFilter::Seteps ( double  _arg)
virtual

Sets the distance for the neighbour search

virtual void mitk::UnstructuredGridClusteringFilter::SetMeshing ( bool  _arg)
virtual

If activated the clusteres UnstructuredGrid is meshed

virtual void mitk::UnstructuredGridClusteringFilter::SetMinPts ( int  _arg)
virtual

Sets the number of required neighbours


The documentation for this class was generated from the following files: