ParaView
vtkMinkowskiFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkMinkowskiFilter.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14  =========================================================================*/
23 #ifndef vtkMinkowskiFilter_h
24 #define vtkMinkowskiFilter_h
25 
26 #include "vtkPVVTKExtensionsCosmoToolsModule.h" // For export macro
27 #include "vtkUnstructuredGridAlgorithm.h"
28 
29 class vtkUnstructuredGrid;
30 class vtkCell;
31 class vtkDoubleArray;
32 class vtkPolyhedron;
33 
34 class VTKPVVTKEXTENSIONSCOSMOTOOLS_EXPORT vtkMinkowskiFilter : public vtkUnstructuredGridAlgorithm
35 {
36 public:
37  static vtkMinkowskiFilter* New();
38  vtkTypeMacro(vtkMinkowskiFilter, vtkUnstructuredGridAlgorithm);
39  void PrintSelf(ostream& os, vtkIndent indent);
40 
41 protected:
44 
45  int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
46  int FillOutputPortInformation(int, vtkInformation*);
47 
48 private:
49  vtkMinkowskiFilter(const vtkMinkowskiFilter&) VTK_DELETE_FUNCTION;
50  void operator=(const vtkMinkowskiFilter&) VTK_DELETE_FUNCTION;
51 
52  void compute_mf(vtkUnstructuredGrid* ugrid, vtkDoubleArray* S, vtkDoubleArray* V,
53  vtkDoubleArray* C, vtkDoubleArray* X, vtkDoubleArray* G, vtkDoubleArray* T, vtkDoubleArray* B,
54  vtkDoubleArray* L, vtkDoubleArray* P, vtkDoubleArray* F);
55  double compute_S(vtkPolyhedron* cell); // surface area
56  double compute_V(vtkPolyhedron* cell); // volume1
57  double compute_V(vtkUnstructuredGrid* ugrid, int cid); // volume2
58  double compute_C(vtkPolyhedron* cell); // integrated mean curvature
59  double compute_X(vtkPolyhedron* cell); // euler characteristic
60  double compute_G(double X); // genus
61  double compute_T(double V, double S); // thickness
62  double compute_B(double S, double C); // breadth
63  double compute_L(double C, double G); // length
64  double compute_P(double B, double L); // planarity
65  double compute_F(double B, double T); // filamenarity
66 
67  void compute_normal(vtkCell* face, double normal[3]);
68  int compute_epsilon(vtkCell* f1, vtkCell* f2, vtkCell* e);
69  double compute_face_area(vtkCell* face);
70  double compute_edge_length(vtkCell* edge);
71  double compute_face_angle(vtkCell* f1, vtkCell* f2);
72 };
73 
74 #endif // vtkMinkowskiFilter_h
Given as input a voronoi tesselation, stored in a vtkUnstructuredGrid, this filter computes the Minko...