]> Creatis software - creaMaracasVisu.git/blob - bbtk/src/bbcreaMaracasVisuShowNPoints_Tools.h
fda64b0ad4b689ed7dd585652f8be4083a3b2c42
[creaMaracasVisu.git] / bbtk / src / bbcreaMaracasVisuShowNPoints_Tools.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 __bbcreaMaracasVisuShowNPoints_Tools_h_INCLUDED__
5 #define __bbcreaMaracasVisuShowNPoints_Tools_h_INCLUDED__
6
7 #include "bbcreaMaracasVisu_EXPORT.h"
8 #include "bbtkAtomicBlackBox.h"
9 #include "iostream"
10
11 #include "WidgetShowNPoints.h"
12
13
14 #include "vtkPolyData.h"
15 #include <vtkStaticPointLocator.h>
16
17 namespace bbcreaMaracasVisu
18 {
19
20 class bbcreaMaracasVisu_EXPORT ShowNPoints_Tools
21  : 
22    public bbtk::AtomicBlackBox
23 {
24   BBTK_BLACK_BOX_INTERFACE(ShowNPoints_Tools,bbtk::AtomicBlackBox);
25 //===== 
26 // 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)
27 //===== 
28     BBTK_DECLARE_INPUT(WidgetShowNPoints,WidgetShowNPoints*);
29     BBTK_DECLARE_INPUT(Spacing,std::vector<double>);
30     BBTK_DECLARE_INPUT(Mesh,vtkPolyData*);
31     BBTK_DECLARE_INPUT(Type,int);
32     BBTK_DECLARE_INPUT(Params, std::vector<double>);
33     BBTK_DECLARE_OUTPUT(Out, std::vector<double>);
34 //  BBTK_DECLARE_OUTPUT(Out,double);
35   BBTK_PROCESS(Process);
36   void Process();
37     
38     void CreatePatch_3points();
39     void CreatePatch_4points();
40     void InitCreatePatch_Points();
41     void InitCreateVolumeSurface_Points();
42     void CreatePatch_Points(std::vector<double> lstX, std::vector<double> lstY, std::vector<double> lstZ);
43     void NearestPointToMesh( vtkPoints *points, vtkStaticPointLocator   *pointLocator, double *spc , double *p , double *pM   );
44     void MovePatchCenter();
45     void CreateExpandedSurface();
46     void CreateWideExpandedSurface();
47     void ExpandSurfaceArea();
48     void WidenSurface();
49     void ExpandPatch();
50     void MovePointInNormal();
51
52 //===== 
53 // 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)
54 //===== 
55 };
56
57 BBTK_BEGIN_DESCRIBE_BLACK_BOX(ShowNPoints_Tools,bbtk::AtomicBlackBox);
58 BBTK_NAME("ShowNPoints_Tools");
59 BBTK_AUTHOR("Info-Dev");
60 BBTK_DESCRIPTION("No Description.");
61 BBTK_CATEGORY("empty");
62   BBTK_INPUT(ShowNPoints_Tools,WidgetShowNPoints,"WidgetShowNPoints",WidgetShowNPoints*,"");
63   BBTK_INPUT(ShowNPoints_Tools,Spacing,"(default [1,1,1] )Spacing",std::vector<double>,"");
64   BBTK_INPUT(ShowNPoints_Tools,Mesh,"Mesh en format vtkPolyData ",vtkPolyData*,"");
65   BBTK_INPUT(ShowNPoints_Tools,Type,"(default 0) 0:Nothing 1:Auto add poits   5:Add Point  10:Insert Point  20:TrackPoint  30:Set nearest point  40:Erase point  50:Deleta all points  100:Insert  group after   110:Delete group  120:Reset colletion  200:Tool 3 or 4 points to patch surface - Create Mesh (based on 1 group and 3 or 4 points)   205:Tool 3 or 4 points to volume surface - Create Mesh (based on 1 group and 3 or 4 points)   210: Invert points    220: Move patch center   300: Create expanded surface   310: Create wide expanded surface      320: Expand Surface,   330: Widen surface,   340: Expand patch",int,"");
66   BBTK_INPUT(ShowNPoints_Tools, Params,"Optional params for the tools, required for 200: normal and direction, 320: centroid and direction, 330: normal and direction, 340: centroid and direction", std::vector<double>,"");
67   
68   BBTK_OUTPUT(ShowNPoints_Tools, Out, "Output", std::vector<double>, "");
69 //  BBTK_OUTPUT(ShowNPoints_Tools,Out,"First output",double,"");
70 BBTK_END_DESCRIBE_BLACK_BOX(ShowNPoints_Tools);
71 //===== 
72 // 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)
73 //===== 
74 }
75 // EO namespace bbcreaMaracasVisu
76
77 #endif // __bbcreaMaracasVisuShowNPoints_Tools_h_INCLUDED__
78