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)
4 #ifndef __bbcreaMaracasVisuManualContourModel_Box_h_INCLUDED__
5 #define __bbcreaMaracasVisuManualContourModel_Box_h_INCLUDED__
6 #include "bbcreaMaracasVisu_EXPORT.h"
7 #include "bbtkAtomicBlackBox.h"
10 namespace bbcreaMaracasVisu
13 class bbcreaMaracasVisu_EXPORT ManualContourModel_Box
15 public bbtk::AtomicBlackBox
17 BBTK_BLACK_BOX_INTERFACE(ManualContourModel_Box,bbtk::AtomicBlackBox);
19 // 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)
21 BBTK_DECLARE_INPUT(Type,int);
22 BBTK_DECLARE_INPUT(DoubleContour,int);
23 BBTK_DECLARE_INPUT(OpenClose,bool);
24 BBTK_DECLARE_INPUT(OpenClose2,bool);
25 BBTK_DECLARE_INPUT(NbPoints,int);
26 BBTK_DECLARE_INPUT(LstIndexsIn,std::vector<int>);
27 BBTK_DECLARE_INPUT(LstControlPointsX,std::vector<double>);
28 BBTK_DECLARE_INPUT(LstControlPointsY,std::vector<double>);
29 BBTK_DECLARE_INPUT(LstControlPointsZ,std::vector<double>);
30 BBTK_DECLARE_INPUT(Param,std::vector<double>);
33 BBTK_DECLARE_OUTPUT(LstContourPointsX,std::vector<double>);
34 BBTK_DECLARE_OUTPUT(LstContourPointsY,std::vector<double>);
35 BBTK_DECLARE_OUTPUT(LstContourPointsZ,std::vector<double>);
36 BBTK_DECLARE_OUTPUT(LstIndexsOut,std::vector<int>);
37 BBTK_PROCESS(Process);
41 void ClockwisePoints( std::vector<double> *lstInX,
42 std::vector<double> *lstInY,
43 std::vector<double> *lstOuZ,
44 std::vector<int> *lstIndexsIn );
46 void ShiftValues( std::vector<double> *lstInX,
47 std::vector<double> *lstInY,
48 std::vector<double> *lstOuZ,
49 std::vector<int> *lstIndexsIn );
52 void ProcessBySegment(
54 int &iGeneral, int sizeSegment,
55 std::vector<double> *lstInX,std::vector<double> *lstInY, std::vector<double> *lstInZ,
56 std::vector<double> *lstOutX,std::vector<double> *lstOutY, std::vector<double> *lstOutZ,
57 std::vector<int> *lstIndexsOut,
61 // Linear Distribution
62 void RedistributionPoints( std::vector<double> *lstOutX,
63 std::vector<double> *lstOutY,
64 std::vector<double> *lstOutZ,
65 std::vector<int> *lstIndexsOut );
70 void RedistributionPoints_SIN_iContour(int iContour,
71 std::vector<double> *lstOutX,
72 std::vector<double> *lstOutY,
73 std::vector<double> *lstOutZ,
74 std::vector<int> *lstIndexsOut,double alpha,double beta );
75 // find best sin distribution
76 void RedistributionPointsAllContours_SIN( std::vector<double> *lstOutX,
77 std::vector<double> *lstOutY,
78 std::vector<double> *lstOutZ,
79 std::vector<int> *lstIndexsOut );
81 void Redistribution_SIN( double alpha,
83 std::vector<double> *lstC1X,
84 std::vector<double> *lstC1Y,
85 std::vector<double> *lstC1Z,
86 std::vector<double> *lstC2X,
87 std::vector<double> *lstC2Y,
88 std::vector<double> *lstC2Z );
90 double SizeContour( std::vector<double> *lstX,
91 std::vector<double> *lstY,
92 std::vector<double> *lstZ );
94 void ExtractContour(std::vector<double> *lstX,
95 std::vector<double> *lstY,
96 std::vector<double> *lstZ,
97 std::vector<int> *lstIndexs,
99 std::vector<double> *lstOutX,
100 std::vector<double> *lstOutY,
101 std::vector<double> *lstOutZ );
103 void PutPointsInContour( std::vector<double> *lstTmpX,
104 std::vector<double> *lstTmpY,
105 std::vector<double> *lstTmpZ,
107 std::vector<double> *lstOutX,
108 std::vector<double> *lstOutY,
109 std::vector<double> *lstOutZ,
110 std::vector<int> *lstOutIndexs );
112 double IntegralDistanceTwoContours( std::vector<double> *lstTmpAX,
113 std::vector<double> *lstTmpAY,
114 std::vector<double> *lstTmpAZ,
115 std::vector<double> *lstTmpBX,
116 std::vector<double> *lstTmpBY,
117 std::vector<double> *lstTmpBZ );
119 void CopyContour2InContour1( std::vector<double> *lstInX,
120 std::vector<double> *lstInY,
121 std::vector<double> *lstInZ,
122 std::vector<double> *lstOutX,
123 std::vector<double> *lstOutY,
124 std::vector<double> *lstOutZ );
130 // 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)
134 BBTK_BEGIN_DESCRIBE_BLACK_BOX(ManualContourModel_Box,bbtk::AtomicBlackBox);
135 BBTK_NAME("ManualContourModel_Box");
136 BBTK_AUTHOR("InfoDev");
137 BBTK_DESCRIPTION("No Description.");
138 BBTK_CATEGORY("empty");
140 BBTK_INPUT(ManualContourModel_Box,Type,"(1 default) 1=spline, 2=rectangle, 3=circle, 4=bullEye, 6=Line, 7=points, 8=rotationTool, 10=polygon, 12=Spline3D",int,"");
141 BBTK_INPUT(ManualContourModel_Box,DoubleContour,"(0 default) 0=Simple, 1=Double (This is used to construct surface, use LstIndexesIn)",int,"");
142 BBTK_INPUT(ManualContourModel_Box,OpenClose,"(false default) false=open, true=close",bool,"");
143 BBTK_INPUT(ManualContourModel_Box,OpenClose2,"(false default) false=open, true=close. Used with the DoubleContour option.",bool,"");
144 BBTK_INPUT(ManualContourModel_Box,NbPoints,"(100 default) Number of points int the spline",int,"");
145 BBTK_INPUT(ManualContourModel_Box,LstIndexsIn,"Lst number of points by segment",std::vector<int>,"");
146 BBTK_INPUT(ManualContourModel_Box,LstControlPointsX,"List of control points",std::vector<double>,"");
147 BBTK_INPUT(ManualContourModel_Box,LstControlPointsY,"List of control points",std::vector<double>,"");
148 BBTK_INPUT(ManualContourModel_Box,LstControlPointsZ,"List of control points",std::vector<double>,"");
149 BBTK_INPUT(ManualContourModel_Box,Param,"Param",std::vector<double>,"");
150 BBTK_OUTPUT(ManualContourModel_Box,LstContourPointsX,"List of points in the contour",std::vector<double>,"");
151 BBTK_OUTPUT(ManualContourModel_Box,LstContourPointsY,"List of points in the contour",std::vector<double>,"");
152 BBTK_OUTPUT(ManualContourModel_Box,LstContourPointsZ,"List of points in the contour",std::vector<double>,"");
153 BBTK_OUTPUT(ManualContourModel_Box,LstIndexsOut,"Lst number of points by segment",std::vector<int>,"");
155 BBTK_END_DESCRIBE_BLACK_BOX(ManualContourModel_Box);
157 // 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)
160 // EO namespace bbcreaMaracasVisu
162 #endif // __bbcreaMaracasVisuManualContourModel_Box_h_INCLUDED__