]> Creatis software - creaMaracasVisu.git/blobdiff - bbtk/src/bbcreaMaracasVisuManualContourModel_Box.h
#3465 SetwxVtkBaseViewSetOpacityAxis box
[creaMaracasVisu.git] / bbtk / src / bbcreaMaracasVisuManualContourModel_Box.h
index d1176c0146aac10353daa9bb20e835053fb7bcc0..1f25bd912d57f0c5fbaf042b22030d56e64c30cd 100644 (file)
@@ -18,17 +18,136 @@ class bbcreaMaracasVisu_EXPORT ManualContourModel_Box
 //===== 
 // 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)
 //===== 
+  BBTK_DECLARE_INPUT(Active,bool);
   BBTK_DECLARE_INPUT(Type,int);
+  BBTK_DECLARE_INPUT(DoubleContour,int);
   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>);
   BBTK_DECLARE_OUTPUT(LstContourPointsY,std::vector<double>);
   BBTK_DECLARE_OUTPUT(LstContourPointsZ,std::vector<double>);
+  BBTK_DECLARE_OUTPUT(LstIndexsOut,std::vector<int>);
+  BBTK_DECLARE_OUTPUT(LstPssblIncnsnstntCntrY,std::vector<double>);
+  BBTK_DECLARE_OUTPUT(LstPssblIncnsnstntCntrID,std::vector<int>);
+
   BBTK_PROCESS(Process);
   void Process();
+
+
+void ClockwisePoints(  std::vector<double> *lstInX,
+                                       std::vector<double> *lstInY, 
+                                       std::vector<double> *lstOuZ,
+                                       std::vector<int> *lstIndexsIn );
+
+void ShiftValues(      std::vector<double> *lstInX,
+                                       std::vector<double> *lstInY, 
+                                       std::vector<double> *lstOuZ,
+                                       std::vector<int> *lstIndexsIn );
+
+
+  void ProcessBySegment(       
+                       int Type, 
+                       int &iGeneral, int sizeSegment,
+                       std::vector<double> *lstInX,std::vector<double> *lstInY, std::vector<double> *lstInZ,
+                       std::vector<double> *lstOutX,std::vector<double> *lstOutY, std::vector<double> *lstOutZ,
+                       std::vector<int>        *lstIndexsOut,
+                       bool open );
+
+
+// Linear Distribution
+void RedistributionPoints(     std::vector<double> *lstOutX,
+                                                       std::vector<double> *lstOutY, 
+                                                       std::vector<double> *lstOutZ, 
+                                                       std::vector<int> *lstIndexsOut );
+
+
+
+// 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 findAlphaBetaSinDistribution(     std::vector<double> *lstTmp2X,
+                                                                                                                       std::vector<double> *lstTmp2Y,
+                                                                                                                       std::vector<double> *lstTmp2Z ,
+                                                                                                                       int sizeContour,
+                                                                                                                       std::vector<double> *lstTmp1X,
+                                                                                                                       std::vector<double> *lstTmp1Y,
+                                                                                                                       std::vector<double> *lstTmp1Z,  
+                                                                                                                       double *alpha,
+                                                                                                                       double *beta); 
+
+void Redistribution_SIN(       double alpha,
+                                                       double beta,
+                                                       std::vector<double> *lstC1X,
+                                                       std::vector<double> *lstC1Y, 
+                                                       std::vector<double> *lstC1Z,
+                                                       double sizeOfContour,
+                                                       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 CalculeLstSizeContours(   std::vector<double> *lstOutX,
+                                                               std::vector<double> *lstOutY,
+                                                               std::vector<double> *lstOutZ,
+                                                               std::vector<int>        *lstIndexsOut,
+                                                               std::vector<double>     *lstSizeContours        );
+
+
+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 );
+
+std::vector<double> lstInconsistentContourY;
+std::vector<int>       lstInconsistentContourID;
+
 //===== 
 // 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)
 //===== 
@@ -40,16 +159,25 @@ BBTK_BEGIN_DESCRIBE_BLACK_BOX(ManualContourModel_Box,bbtk::AtomicBlackBox);
   BBTK_DESCRIPTION("No Description.");
   BBTK_CATEGORY("empty");
 
+  BBTK_INPUT(ManualContourModel_Box,Active,"(true default) Active true/false",bool,"");
   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,"");
+  BBTK_INPUT(ManualContourModel_Box,DoubleContour,"(0 default) 0=Simple, 1=Double (This is used to construct surface, use LstIndexesIn)",int,"");
   BBTK_INPUT(ManualContourModel_Box,OpenClose,"(false default) false=open, true=close",bool,"");
+  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>,"");
+  BBTK_OUTPUT(ManualContourModel_Box,LstIndexsOut,"Lst number of points by segment",std::vector<int>,"");
+  BBTK_OUTPUT(ManualContourModel_Box,LstPssblIncnsnstntCntrY,"Lst of possible Inconsinstent Contour Y, little contour between two big contour, Difficult for the SIN distribution (DoubleContour 1)",std::vector<double>,"");
+  BBTK_OUTPUT(ManualContourModel_Box,LstPssblIncnsnstntCntrID,"Lst of possible Inconsinstent Contour ID, little contour between two big contour, Difficult for the SIN distribution (DoubleContour 1)",std::vector<int>,"");
+
+
 
 BBTK_END_DESCRIBE_BLACK_BOX(ManualContourModel_Box);
 //=====