VMTK
vtkvmtkCenterlineSplittingAndGroupingFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3 Program: VMTK
4 Module: $RCSfile: vtkvmtkCenterlineSplittingAndGroupingFilter.h,v $
5 Language: C++
6 
7  Copyright (c) Luca Antiga, David Steinman. All rights reserved.
8  See LICENSE file for details.
9 
10  Portions of this code are covered under the VTK copyright.
11  See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm
12  for details.
13 
14  This software is distributed WITHOUT ANY WARRANTY; without even
15  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
16  PURPOSE. See the above copyright notices for more information.
17 
18 =========================================================================*/
28 #ifndef __vtkvmtkCenterlineSplittingAndGroupingFilter_h
29 #define __vtkvmtkCenterlineSplittingAndGroupingFilter_h
30 
31 #include "vtkPolyDataAlgorithm.h"
32 //#include "vtkvmtkComputationalGeometryWin32Header.h"
33 #include "vtkvmtkWin32Header.h"
34 
35 class VTK_VMTK_COMPUTATIONAL_GEOMETRY_EXPORT vtkvmtkCenterlineSplittingAndGroupingFilter : public vtkPolyDataAlgorithm
36 {
37  public:
38  vtkTypeMacro(vtkvmtkCenterlineSplittingAndGroupingFilter,vtkPolyDataAlgorithm);
39  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
40 
41  vtkSetStringMacro(RadiusArrayName);
42  vtkGetStringMacro(RadiusArrayName);
43 
44  vtkSetStringMacro(GroupIdsArrayName);
45  vtkGetStringMacro(GroupIdsArrayName);
46 
47  vtkSetStringMacro(CenterlineIdsArrayName);
48  vtkGetStringMacro(CenterlineIdsArrayName);
49 
50  vtkSetStringMacro(BlankingArrayName);
51  vtkGetStringMacro(BlankingArrayName);
52 
53  vtkSetStringMacro(TractIdsArrayName);
54  vtkGetStringMacro(TractIdsArrayName);
55 
56  vtkSetMacro(GroupingMode,int);
57  vtkGetMacro(GroupingMode,int);
59  { this->SetGroupingMode(FIRSTPOINT); }
61  { this->SetGroupingMode(LASTPOINT); }
63  { this->SetGroupingMode(POINTINTUBE); }
64 
65 //BTX
66  enum {
69  POINTINTUBE
70  };
71 //ETX
72 
73  protected:
76 
77  virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
78 
79  virtual void ComputeCenterlineSplitting(vtkPolyData* input, vtkIdType cellId) = 0;
80 
81  virtual void GroupTracts(vtkPolyData* input, vtkPolyData* centerlineTracts);
82 
83  void CoincidentExtremePointGroupTracts(vtkPolyData* input, vtkPolyData* centerlineTracts, bool first = true);
84  void PointInTubeGroupTracts(vtkPolyData* input, vtkPolyData* centerlineTracts);
85 
86  virtual void MergeTracts(vtkPolyData* centerlineTracts);
87 
88  void SplitCenterline(vtkPolyData* input, vtkIdType cellId, int numberOfSplittingPoints, const vtkIdType* subIds, const double* pcoords, const int* tractBlanking, vtkPolyData* splitCenterline);
89 
90  void MakeGroupIdsAdjacent(vtkPolyData* centerlineTracts);
91  void MakeTractIdsAdjacent(vtkPolyData* centerlineTracts);
92 
98 
100  vtkIdType* SubIds;
101  double* PCoords;
104 
105  private:
107  void operator=(const vtkvmtkCenterlineSplittingAndGroupingFilter&); // Not implemented.
108 };
109 
110 #endif
Multipurpose filter used to bundle and blank split tracts in all "branch extractor" like methods...