]> Creatis software - creaMaracasVisu.git/blobdiff - bbtk/src/bbcreaMaracasVisuManualContourModel_Box.h
#3463 box ManualContourModel optimisation of SIN() distribution by contour
[creaMaracasVisu.git] / bbtk / src / bbcreaMaracasVisuManualContourModel_Box.h
index 760f2b0c89f842d61cb3a0e63891e51254a6fb56..683ee71954e16add2997a547692863c09331087c 100644 (file)
@@ -23,12 +23,11 @@ class bbcreaMaracasVisu_EXPORT ManualContourModel_Box
   BBTK_DECLARE_INPUT(OpenClose,bool);
   BBTK_DECLARE_INPUT(OpenClose2,bool);
   BBTK_DECLARE_INPUT(NbPoints,int);
-
   BBTK_DECLARE_INPUT(LstIndexsIn,std::vector<int>);
-
   BBTK_DECLARE_INPUT(LstControlPointsX,std::vector<double>);
   BBTK_DECLARE_INPUT(LstControlPointsY,std::vector<double>);
   BBTK_DECLARE_INPUT(LstControlPointsZ,std::vector<double>);
+  BBTK_DECLARE_INPUT(Param,std::vector<double>);
 
 
   BBTK_DECLARE_OUTPUT(LstContourPointsX,std::vector<double>);
@@ -58,6 +57,8 @@ void ShiftValues(     std::vector<double> *lstInX,
                        std::vector<int>        *lstIndexsOut,
                        bool open );
 
+
+// Linear Distribution
 void RedistributionPoints(     std::vector<double> *lstOutX,
                                                        std::vector<double> *lstOutY, 
                                                        std::vector<double> *lstOutZ, 
@@ -65,6 +66,66 @@ void RedistributionPoints(   std::vector<double> *lstOutX,
 
 
 
+// sin distribution
+void RedistributionPoints_SIN_iContour(int iContour,   
+                                                       std::vector<double> *lstOutX,
+                                                       std::vector<double> *lstOutY, 
+                                                       std::vector<double> *lstOutZ, 
+                                                       std::vector<int> *lstIndexsOut,double alpha,double beta );
+// find best sin distribution
+void RedistributionPointsAllContours_SIN(      std::vector<double> *lstOutX,
+                                                                                       std::vector<double> *lstOutY, 
+                                                                                       std::vector<double> *lstOutZ, 
+                                                                                       std::vector<int> *lstIndexsOut );
+
+void Redistribution_SIN(       double alpha,
+                                                       double beta,
+                                                       std::vector<double> *lstC1X,
+                                                       std::vector<double> *lstC1Y, 
+                                                       std::vector<double> *lstC1Z,
+                                                       std::vector<double> *lstC2X,
+                                                       std::vector<double> *lstC2Y, 
+                                                       std::vector<double> *lstC2Z );
+
+double SizeContour(    std::vector<double> *lstX,
+                                       std::vector<double> *lstY, 
+                                       std::vector<double> *lstZ );
+
+void ExtractContour(std::vector<double> *lstX,
+                                       std::vector<double> *lstY, 
+                                       std::vector<double> *lstZ,
+                                       std::vector<int> *lstIndexs,
+                                       int contour,
+                                       std::vector<double> *lstOutX,
+                                       std::vector<double> *lstOutY, 
+                                       std::vector<double> *lstOutZ );
+
+void PutPointsInContour(       std::vector<double> *lstTmpX,
+                                                       std::vector<double> *lstTmpY, 
+                                                       std::vector<double> *lstTmpZ,
+                                                       int iContour,
+                                                       std::vector<double> *lstOutX,
+                                                       std::vector<double> *lstOutY, 
+                                                       std::vector<double> *lstOutZ,
+                                                       std::vector<int>        *lstOutIndexs );
+
+double IntegralDistanceTwoContours( std::vector<double> *lstTmpAX,
+                                                                       std::vector<double> *lstTmpAY, 
+                                                                       std::vector<double> *lstTmpAZ,
+                                                                       std::vector<double> *lstTmpBX,
+                                                                       std::vector<double> *lstTmpBY, 
+                                                                       std::vector<double> *lstTmpBZ );
+                                                                       
+void CopyContour2InContour1(   std::vector<double> *lstInX,
+                                                               std::vector<double> *lstInY, 
+                                                               std::vector<double> *lstInZ,
+                                                               std::vector<double> *lstOutX,
+                                                               std::vector<double> *lstOutY, 
+                                                               std::vector<double> *lstOutZ );
+                                                                       
+
+
+
 //===== 
 // 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)
 //===== 
@@ -82,11 +143,10 @@ BBTK_BEGIN_DESCRIBE_BLACK_BOX(ManualContourModel_Box,bbtk::AtomicBlackBox);
   BBTK_INPUT(ManualContourModel_Box,OpenClose2,"(false default) false=open, true=close.  Used with the DoubleContour option.",bool,"");
   BBTK_INPUT(ManualContourModel_Box,NbPoints,"(100 default) Number of points int the spline",int,"");
   BBTK_INPUT(ManualContourModel_Box,LstIndexsIn,"Lst number of points by segment",std::vector<int>,"");
-
   BBTK_INPUT(ManualContourModel_Box,LstControlPointsX,"List of control points",std::vector<double>,"");
   BBTK_INPUT(ManualContourModel_Box,LstControlPointsY,"List of control points",std::vector<double>,"");
   BBTK_INPUT(ManualContourModel_Box,LstControlPointsZ,"List of control points",std::vector<double>,"");
-
+  BBTK_INPUT(ManualContourModel_Box,Param,"Param",std::vector<double>,"");
   BBTK_OUTPUT(ManualContourModel_Box,LstContourPointsX,"List of points in the contour",std::vector<double>,"");
   BBTK_OUTPUT(ManualContourModel_Box,LstContourPointsY,"List of points in the contour",std::vector<double>,"");
   BBTK_OUTPUT(ManualContourModel_Box,LstContourPointsZ,"List of points in the contour",std::vector<double>,"");