]> Creatis software - creaVtk.git/blob - bbtk_creaVtk_PKG/src/bbcreaVtkCreateMeshFromPoints.h
b103d3e3a1c8b79b478f8d4206a606fca524b1e0
[creaVtk.git] / bbtk_creaVtk_PKG / src / bbcreaVtkCreateMeshFromPoints.h
1 //===== 
2 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
3 //===== 
4 #ifndef __bbcreaVtkCreateMeshFromPoints_h_INCLUDED__
5 #define __bbcreaVtkCreateMeshFromPoints_h_INCLUDED__
6
7 #include "bbcreaVtk_EXPORT.h"
8 #include "bbtkAtomicBlackBox.h"
9 #include "iostream"
10
11 #include "vtkPoints.h"
12 #include "vtkCellArray.h"
13 #include "vtkPolyData.h"
14 #include "vtkCleanPolyData.h"
15 #include "vtkTriangleFilter.h"
16
17
18 namespace bbcreaVtk
19 {
20
21 class bbcreaVtk_EXPORT CreateMeshFromPoints
22  : 
23    public bbtk::AtomicBlackBox
24 {
25   BBTK_BLACK_BOX_INTERFACE(CreateMeshFromPoints,bbtk::AtomicBlackBox);
26 //===== 
27 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
28 //===== 
29   BBTK_DECLARE_INPUT(LstX,std::vector<double>);
30   BBTK_DECLARE_INPUT(LstY,std::vector<double>);
31   BBTK_DECLARE_INPUT(LstZ,std::vector<double>);
32   BBTK_DECLARE_INPUT(LstIndexs,std::vector<int>);
33   BBTK_DECLARE_INPUT(OpenClose, bool);
34   BBTK_DECLARE_OUTPUT(Out,vtkPolyData*);
35   BBTK_PROCESS(Process);
36   void Process();
37
38         vtkPoints                       *points;
39         vtkCellArray            *cells;
40         vtkPolyData             *polydata;
41         vtkCleanPolyData        *clean;
42         vtkTriangleFilter       *triangle;
43         
44         void CalcCentroid(double(&centroid)[3], int start, int end, int increment, int numPoints);
45         void CloseContourBottom(bool uPointOrder);
46         void CloseContourSides(std::vector<int> lstIndexs, bool uPointOrder);
47         void CloseOpenContourSurface(std::vector<int> lstIndexs);
48
49 //===== 
50 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
51 //===== 
52 };
53
54 BBTK_BEGIN_DESCRIBE_BLACK_BOX(CreateMeshFromPoints,bbtk::AtomicBlackBox);
55   BBTK_NAME("CreateMeshFromPoints");
56   BBTK_AUTHOR("InfoDev");
57   BBTK_DESCRIPTION("No Description.");
58   BBTK_CATEGORY("empty");
59
60   BBTK_INPUT(CreateMeshFromPoints,LstX,"List X point",std::vector<double>,"");
61   BBTK_INPUT(CreateMeshFromPoints,LstY,"List Y point",std::vector<double>,"");
62   BBTK_INPUT(CreateMeshFromPoints,LstZ,"List Z point",std::vector<double>,"");
63   BBTK_INPUT(CreateMeshFromPoints,LstIndexs,"Number of points by segment",std::vector<int>,"");
64   BBTK_INPUT(CreateMeshFromPoints,OpenClose,"(default false) Type of Contour: false=Open, true=Close",bool,"");
65
66   BBTK_OUTPUT(CreateMeshFromPoints,Out,"vtkPolyData",vtkPolyData*,"");
67
68 BBTK_END_DESCRIBE_BLACK_BOX(CreateMeshFromPoints);
69 //===== 
70 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
71 //===== 
72 }
73 // EO namespace bbcreaVtk
74
75 #endif // __bbcreaVtkCreateMeshFromPoints_h_INCLUDED__
76