VMTK
vtkvmtkCenterlineBifurcationVectors.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3 Program: VMTK
4 Module: $RCSfile: vtkvmtkCenterlineBifurcationVectors.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 =========================================================================*/
38 #ifndef __vtkvmtkCenterlineBifurcationVectors_h
39 #define __vtkvmtkCenterlineBifurcationVectors_h
40 
41 #include "vtkPolyDataAlgorithm.h"
42 //#include "vtkvmtkComputationalGeometryWin32Header.h"
43 #include "vtkvmtkWin32Header.h"
44 #include "vtkPolyData.h"
45 
46 class vtkPoints;
47 class vtkDoubleArray;
48 class vtkIntArray;
49 
50 class VTK_VMTK_COMPUTATIONAL_GEOMETRY_EXPORT vtkvmtkCenterlineBifurcationVectors : public vtkPolyDataAlgorithm
51 {
52  public:
53  vtkTypeMacro(vtkvmtkCenterlineBifurcationVectors,vtkPolyDataAlgorithm);
54  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
55 
57 
58  vtkSetStringMacro(RadiusArrayName);
59  vtkGetStringMacro(RadiusArrayName);
60 
61  vtkSetStringMacro(GroupIdsArrayName);
62  vtkGetStringMacro(GroupIdsArrayName);
63 
64  vtkSetStringMacro(CenterlineIdsArrayName);
65  vtkGetStringMacro(CenterlineIdsArrayName);
66 
67  vtkSetStringMacro(TractIdsArrayName);
68  vtkGetStringMacro(TractIdsArrayName);
69 
70  vtkSetStringMacro(BlankingArrayName);
71  vtkGetStringMacro(BlankingArrayName);
72 
73  vtkSetObjectMacro(ReferenceSystems,vtkPolyData);
74  vtkGetObjectMacro(ReferenceSystems,vtkPolyData);
75 
76  vtkSetStringMacro(ReferenceSystemGroupIdsArrayName);
77  vtkGetStringMacro(ReferenceSystemGroupIdsArrayName);
78 
79  vtkSetStringMacro(ReferenceSystemNormalArrayName);
80  vtkGetStringMacro(ReferenceSystemNormalArrayName);
81 
82  vtkSetStringMacro(ReferenceSystemUpNormalArrayName);
83  vtkGetStringMacro(ReferenceSystemUpNormalArrayName);
84 
85  vtkSetStringMacro(BifurcationVectorsArrayName);
86  vtkGetStringMacro(BifurcationVectorsArrayName);
87 
88  vtkSetStringMacro(InPlaneBifurcationVectorsArrayName);
89  vtkGetStringMacro(InPlaneBifurcationVectorsArrayName);
90 
91  vtkSetStringMacro(OutOfPlaneBifurcationVectorsArrayName);
92  vtkGetStringMacro(OutOfPlaneBifurcationVectorsArrayName);
93 
94  vtkSetStringMacro(InPlaneBifurcationVectorAnglesArrayName);
95  vtkGetStringMacro(InPlaneBifurcationVectorAnglesArrayName);
96 
97  vtkSetStringMacro(OutOfPlaneBifurcationVectorAnglesArrayName);
98  vtkGetStringMacro(OutOfPlaneBifurcationVectorAnglesArrayName);
99 
100  vtkSetStringMacro(BifurcationVectorsOrientationArrayName);
101  vtkGetStringMacro(BifurcationVectorsOrientationArrayName);
102 
103  vtkSetStringMacro(BifurcationGroupIdsArrayName);
104  vtkGetStringMacro(BifurcationGroupIdsArrayName);
105 
106  vtkSetMacro(NormalizeBifurcationVectors,int);
107  vtkGetMacro(NormalizeBifurcationVectors,int);
108  vtkBooleanMacro(NormalizeBifurcationVectors,int);
109 //BTX
110  enum
111  {
112  VTK_VMTK_UPSTREAM_ORIENTATION = 0,
113  VTK_VMTK_DOWNSTREAM_ORIENTATION
114  };
115 //ETX
116  protected:
119 
120  virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
121 
122  void ComputeBifurcationVectors(vtkPolyData* input, int bifurcationGroupId, vtkIdList* bifurcationVectorsGroupIds, vtkIntArray* bifurcationVectorsOrientation, vtkDoubleArray* bifurcationVectors, vtkPoints* bifurcationVectorsPoints);
123 
124  void ComputeBifurcationVectorComponents(int bifurcationGroupId, vtkDoubleArray* bifurcationVectors, vtkDoubleArray* inPlaneBifurcationVectors, vtkDoubleArray* outOfPlaneBifurcationVectors);
125 
126  void ComputeBifurcationVectorAngles(int bifurcationGroupId, vtkDoubleArray* bifurcationVectors, vtkDoubleArray* inPlaneBifurcationVectors, vtkDoubleArray* outOfPlaneBifurcationVectors, vtkDoubleArray* inPlaneBifurcationVectorAngles, vtkDoubleArray* outOfPlaneBifurcationVectorAngles);
127 
133 
134  vtkPolyData* ReferenceSystems;
135 
139 
144 
147 
149 
151 
152  private:
154  void operator=(const vtkvmtkCenterlineBifurcationVectors&); // Not implemented.
155 };
156 
157 #endif
Compute vectors which represent the orientation of branches involved within a bifurcation from a spli...