VMTK
vtkvmtkBoundaryReferenceSystems.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3 Program: VMTK
4 Module: $RCSfile: vtkvmtkBoundaryReferenceSystems.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 __vtkvmtkBoundaryReferenceSystems_h
29 #define __vtkvmtkBoundaryReferenceSystems_h
30 
31 #include "vtkPolyDataAlgorithm.h"
32 //#include "vtkvmtkComputationalGeometryWin32Header.h"
33 #include "vtkvmtkWin32Header.h"
34 
35 class vtkPolyData;
36 class vtkPoints;
37 class vtkPolyLine;
38 
39 class VTK_VMTK_COMPUTATIONAL_GEOMETRY_EXPORT vtkvmtkBoundaryReferenceSystems : public vtkPolyDataAlgorithm
40 {
41  public:
42  vtkTypeMacro(vtkvmtkBoundaryReferenceSystems,vtkPolyDataAlgorithm);
43  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
44 
45  static vtkvmtkBoundaryReferenceSystems *New();
46 
48 
50  vtkSetStringMacro(BoundaryRadiusArrayName);
51  vtkGetStringMacro(BoundaryRadiusArrayName);
53 
55 
57  vtkSetStringMacro(BoundaryNormalsArrayName);
58  vtkGetStringMacro(BoundaryNormalsArrayName);
60 
62 
64  vtkSetStringMacro(Point1ArrayName);
65  vtkGetStringMacro(Point1ArrayName);
67 
69 
71  vtkSetStringMacro(Point2ArrayName);
72  vtkGetStringMacro(Point2ArrayName);
74 
75  static void ComputeBoundaryBarycenter(vtkPoints* points, double barycenter[3]);
76  static double ComputeBoundaryMeanRadius(vtkPoints* points, double barycenter[3]);
77  static void ComputeBoundaryNormal(vtkPoints* points, double barycenter[3], double normal[3]);
78  static void OrientBoundaryNormalOutwards(vtkPolyData* surface, vtkPolyData* boundaries, vtkIdType boundaryCellId, double normal[3], double outwardNormal[3]);
79  static void ComputeReferenceSystemPoints(double origin[3], double normal[3], double radius, double point1[3], double point2[3]);
80 
81  protected:
84 
85  virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
86 
91 
92  private:
94  void operator=(const vtkvmtkBoundaryReferenceSystems&); // Not implemented.
95 };
96 
97 #endif
Creates a reference system consisting of a radius and normals on top of boundaries.