VMTK
vtkvmtkUnstructuredGridCenterlineSections.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3 Program: VMTK
4 Module: $RCSfile: vtkvmtkUnstructuredGridCenterlineSections.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 __vtkvmtkUnstructuredGridCenterlineSections_h
29 #define __vtkvmtkUnstructuredGridCenterlineSections_h
30 
31 #include "vtkPolyDataAlgorithm.h"
32 #include "vtkvmtkWin32Header.h"
33 #include "vtkPolyData.h"
34 
35 class vtkUnstructuredGrid;
36 class vtkTransform;
37 
38 class VTK_VMTK_COMPUTATIONAL_GEOMETRY_EXPORT vtkvmtkUnstructuredGridCenterlineSections : public vtkPolyDataAlgorithm
39 {
40  public:
41  vtkTypeMacro(vtkvmtkUnstructuredGridCenterlineSections,vtkPolyDataAlgorithm);
42  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
43 
45 
46  vtkSetObjectMacro(Centerlines,vtkPolyData);
47  vtkGetObjectMacro(Centerlines,vtkPolyData);
48 
49  vtkSetObjectMacro(SectionSource,vtkPolyData);
50  vtkGetObjectMacro(SectionSource,vtkPolyData);
51 
52  vtkSetStringMacro(SectionUpNormalsArrayName);
53  vtkGetStringMacro(SectionUpNormalsArrayName);
54 
55  vtkSetStringMacro(SectionNormalsArrayName);
56  vtkGetStringMacro(SectionNormalsArrayName);
57 
58  vtkSetStringMacro(AdditionalNormalsArrayName);
59  vtkGetStringMacro(AdditionalNormalsArrayName);
60 
61  vtkSetStringMacro(AdditionalScalarsArrayName);
62  vtkGetStringMacro(AdditionalScalarsArrayName);
63 
64  vtkSetMacro(TransformSections,int);
65  vtkGetMacro(TransformSections,int);
66  vtkBooleanMacro(TransformSections,int);
67 
68  vtkSetMacro(UseSectionSource,int);
69  vtkGetMacro(UseSectionSource,int);
70  vtkBooleanMacro(UseSectionSource,int);
71 
72  vtkSetMacro(SourceScaling,int);
73  vtkGetMacro(SourceScaling,int);
74  vtkBooleanMacro(SourceScaling,int);
75 
76  vtkSetVectorMacro(OriginOffset,double,3);
77  vtkGetVectorMacro(OriginOffset,double,3);
78 
79  vtkSetStringMacro(VectorsArrayName);
80  vtkGetStringMacro(VectorsArrayName);
81 
82  vtkSetStringMacro(SectionIdsArrayName);
83  vtkGetStringMacro(SectionIdsArrayName);
84 
85  vtkGetObjectMacro(SectionPointsPolyData,vtkPolyData);
86 
87  protected:
90 
91  int FillInputPortInformation(int, vtkInformation *info) VTK_OVERRIDE;
92 
93  virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
94 
95  double ComputeAngle(double vector0[3], double vector1[3]);
96  void CreateTransform(vtkTransform* transform, double currentOrigin[3], double currentNormal[3], double currentUpNormal[3], double targetOrigin[3], double targetNormal[3], double targetUpNormal[3]);
97 
98  vtkPolyData* Centerlines;
99  vtkPolyData* SectionSource;
100  vtkPolyData* SectionPointsPolyData;
101 
107 
109 
111 
114 
115  double OriginOffset[3];
116 
117  private:
119  void operator=(const vtkvmtkUnstructuredGridCenterlineSections&); // Not implemented.
120 };
121 
122 #endif
obtain sections of an unstructured grid mesh with lie along a centerline path.