]> Creatis software - creaMaracasVisu.git/blob - bbtk/src/bbcreaMaracasVisuManualContourModel_Box.h
b85478e6261e6f4856c775ce1c9460b8e02ce97f
[creaMaracasVisu.git] / bbtk / src / bbcreaMaracasVisuManualContourModel_Box.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 __bbcreaMaracasVisuManualContourModel_Box_h_INCLUDED__
5 #define __bbcreaMaracasVisuManualContourModel_Box_h_INCLUDED__
6 #include "bbcreaMaracasVisu_EXPORT.h"
7 #include "bbtkAtomicBlackBox.h"
8 #include "iostream"
9
10 namespace bbcreaMaracasVisu
11 {
12
13 class bbcreaMaracasVisu_EXPORT ManualContourModel_Box
14  : 
15    public bbtk::AtomicBlackBox
16 {
17   BBTK_BLACK_BOX_INTERFACE(ManualContourModel_Box,bbtk::AtomicBlackBox);
18 //===== 
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)
20 //===== 
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>);
31
32
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);
38   void Process();
39
40
41 void ClockwisePoints(   std::vector<double> *lstInX,
42                                         std::vector<double> *lstInY, 
43                                         std::vector<double> *lstOuZ,
44                                         std::vector<int> *lstIndexsIn );
45
46 void ShiftValues(       std::vector<double> *lstInX,
47                                         std::vector<double> *lstInY, 
48                                         std::vector<double> *lstOuZ,
49                                         std::vector<int> *lstIndexsIn );
50
51
52   void ProcessBySegment(        
53                         int Type, 
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,
58                         bool open );
59
60
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 );
66
67
68
69 // sin distribution
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 );
80
81 void Redistribution_SIN(        double alpha,
82                                                         double beta,
83                                                         std::vector<double> *lstC1X,
84                                                         std::vector<double> *lstC1Y, 
85                                                         std::vector<double> *lstC1Z,
86                                                         double sizeOfContour,
87                                                         std::vector<double> *lstC2X,
88                                                         std::vector<double> *lstC2Y, 
89                                                         std::vector<double> *lstC2Z );
90
91 double SizeContour(     std::vector<double> *lstX,
92                                         std::vector<double> *lstY, 
93                                         std::vector<double> *lstZ );
94
95 void ExtractContour(std::vector<double> *lstX,
96                                         std::vector<double> *lstY, 
97                                         std::vector<double> *lstZ,
98                                         std::vector<int> *lstIndexs,
99                                         int contour,
100                                         std::vector<double> *lstOutX,
101                                         std::vector<double> *lstOutY, 
102                                         std::vector<double> *lstOutZ );
103
104 void PutPointsInContour(        std::vector<double> *lstTmpX,
105                                                         std::vector<double> *lstTmpY, 
106                                                         std::vector<double> *lstTmpZ,
107                                                         int iContour,
108                                                         std::vector<double> *lstOutX,
109                                                         std::vector<double> *lstOutY, 
110                                                         std::vector<double> *lstOutZ,
111                                                         std::vector<int>        *lstOutIndexs );
112
113 double IntegralDistanceTwoContours( std::vector<double> *lstTmpAX,
114                                                                         std::vector<double> *lstTmpAY, 
115                                                                         std::vector<double> *lstTmpAZ,
116                                                                         std::vector<double> *lstTmpBX,
117                                                                         std::vector<double> *lstTmpBY, 
118                                                                         std::vector<double> *lstTmpBZ );
119                                                                         
120 void CopyContour2InContour1(    std::vector<double> *lstInX,
121                                                                 std::vector<double> *lstInY, 
122                                                                 std::vector<double> *lstInZ,
123                                                                 std::vector<double> *lstOutX,
124                                                                 std::vector<double> *lstOutY, 
125                                                                 std::vector<double> *lstOutZ );
126                                                                         
127 void Mixing2DistributionVectors(        std::vector<double> *lstAX,
128                                                                         std::vector<double> *lstAY, 
129                                                                         std::vector<double> *lstAZ,
130                                                                         std::vector<double> *lstBX,
131                                                                         std::vector<double> *lstBY, 
132                                                                         std::vector<double> *lstBZ,
133                                                                         std::vector<double> *lstOutX,
134                                                                         std::vector<double> *lstOutY, 
135                                                                         std::vector<double> *lstOutZ);
136
137
138
139
140 //===== 
141 // 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)
142 //===== 
143 };
144
145 BBTK_BEGIN_DESCRIBE_BLACK_BOX(ManualContourModel_Box,bbtk::AtomicBlackBox);
146   BBTK_NAME("ManualContourModel_Box");
147   BBTK_AUTHOR("InfoDev");
148   BBTK_DESCRIPTION("No Description.");
149   BBTK_CATEGORY("empty");
150
151   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,"");
152   BBTK_INPUT(ManualContourModel_Box,DoubleContour,"(0 default) 0=Simple, 1=Double (This is used to construct surface, use LstIndexesIn)",int,"");
153   BBTK_INPUT(ManualContourModel_Box,OpenClose,"(false default) false=open, true=close",bool,"");
154   BBTK_INPUT(ManualContourModel_Box,OpenClose2,"(false default) false=open, true=close.  Used with the DoubleContour option.",bool,"");
155   BBTK_INPUT(ManualContourModel_Box,NbPoints,"(100 default) Number of points int the spline",int,"");
156   BBTK_INPUT(ManualContourModel_Box,LstIndexsIn,"Lst number of points by segment",std::vector<int>,"");
157   BBTK_INPUT(ManualContourModel_Box,LstControlPointsX,"List of control points",std::vector<double>,"");
158   BBTK_INPUT(ManualContourModel_Box,LstControlPointsY,"List of control points",std::vector<double>,"");
159   BBTK_INPUT(ManualContourModel_Box,LstControlPointsZ,"List of control points",std::vector<double>,"");
160   BBTK_INPUT(ManualContourModel_Box,Param,"Param",std::vector<double>,"");
161   BBTK_OUTPUT(ManualContourModel_Box,LstContourPointsX,"List of points in the contour",std::vector<double>,"");
162   BBTK_OUTPUT(ManualContourModel_Box,LstContourPointsY,"List of points in the contour",std::vector<double>,"");
163   BBTK_OUTPUT(ManualContourModel_Box,LstContourPointsZ,"List of points in the contour",std::vector<double>,"");
164   BBTK_OUTPUT(ManualContourModel_Box,LstIndexsOut,"Lst number of points by segment",std::vector<int>,"");
165
166 BBTK_END_DESCRIBE_BLACK_BOX(ManualContourModel_Box);
167 //===== 
168 // 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)
169 //===== 
170 }
171 // EO namespace bbcreaMaracasVisu
172
173 #endif // __bbcreaMaracasVisuManualContourModel_Box_h_INCLUDED__
174
175
176
177
178