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 #include "bbcreaMaracasVisuManualContourModel_Box.h"
5 #include "bbcreaMaracasVisuPackage.h"
7 #include <creaContoursFactory.h>
10 namespace bbcreaMaracasVisu
13 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,ManualContourModel_Box)
14 BBTK_BLACK_BOX_IMPLEMENTATION(ManualContourModel_Box,bbtk::AtomicBlackBox);
16 // 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 void ManualContourModel_Box::ProcessBySegment(
22 int &iGeneral, int sizeSegment,
23 std::vector<double> *lstInX,std::vector<double> *lstInY, std::vector<double> *lstInZ,
24 std::vector<double> *lstOutX,std::vector<double> *lstOutY, std::vector<double> *lstOutZ,
25 std::vector<int> *lstIndexsOut, bool open )
27 creaContoursFactory f;
28 manualContourModel *m;
29 int i,size=iGeneral+sizeSegment;
31 m = (manualContourModel*)f.getContourModel( bbGetInputType() );
32 m->SetNumberOfPointsSpline( bbGetInputNbPoints() );
33 m->SetCloseContour( open );
34 for (i=iGeneral;i<size;i++)
36 m->AddPoint( (*lstInX)[i] , (*lstInY)[i] , (*lstInZ)[i] );
39 int sizeContour = bbGetInputNbPoints();
40 for (i=0;i<sizeContour;i++)
42 m->GetSpline_i_Point(i,&x,&y,&z);
43 lstOutX->push_back(x);
44 lstOutY->push_back(y);
45 lstOutZ->push_back(z);
47 iGeneral=iGeneral+sizeSegment;
48 lstIndexsOut->push_back( sizeContour );
53 void ManualContourModel_Box::RedistributionPoints( std::vector<double> *lstOutX,
54 std::vector<double> *lstOutY,
55 std::vector<double> *lstOutZ,
56 std::vector<int> *lstIndexsOut )
58 std::vector<double> lstRstX;
59 std::vector<double> lstRstY;
60 std::vector<double> lstRstZ;
61 int iLstIndexOut,sizeLstIndexOut = lstIndexsOut->size();
64 for (iLstIndexOut=0; iLstIndexOut<sizeLstIndexOut; iLstIndexOut++)
69 size=(*lstIndexsOut)[iLstIndexOut];
72 double dist=0,dist2,distSeg,delta;
75 for ( i=iGeneral+1 ; i<iGeneral+size ; i++ )
77 dx = (*lstOutX)[i]-(*lstOutX)[i-1];
78 dy = (*lstOutY)[i]-(*lstOutY)[i-1];
79 dz = (*lstOutZ)[i]-(*lstOutZ)[i-1];
80 dist= dist+sqrt( dx*dx + dy*dy + dz*dz );
82 delta = dist/(size-1);
83 lstRstX.push_back( (*lstOutX)[iGeneral] );
84 lstRstY.push_back( (*lstOutY)[iGeneral] );
85 lstRstZ.push_back( (*lstOutZ)[iGeneral] );
86 for (i=iGeneral+1; i<iGeneral+size;i++)
89 for (k=iGeneral+1; k<iGeneral+size;k++)
91 dx = (*lstOutX)[k]-(*lstOutX)[k-1];
92 dy = (*lstOutY)[k]-(*lstOutY)[k-1];
93 dz = (*lstOutZ)[k]-(*lstOutZ)[k-1];
94 distSeg = sqrt( dx*dx + dy*dy + dz*dz );
96 if ( dist2+distSeg >= ii*delta )
98 dd=(ii*delta-dist2)/distSeg;
103 lstRstX.push_back( (*lstOutX)[k-1] + dd*dx );
104 lstRstY.push_back( (*lstOutY)[k-1] + dd*dy );
105 lstRstZ.push_back( (*lstOutZ)[k-1] + dd*dz );
108 if ( k==iGeneral+size-1 )
111 lstRstX.push_back( (*lstOutX)[k-1] + dd*dx );
112 lstRstY.push_back( (*lstOutY)[k-1] + dd*dy );
113 lstRstZ.push_back( (*lstOutZ)[k-1] + dd*dz );
116 dist2 = dist2+distSeg;
119 if (lstRstX.size()!=size)
121 printf("EED Warnning! ManualContourModel_Box::RedistributionPoints >> This list is not coherent iLstIndexOut=%d lstRstX.size()=%d size=%d\n",iLstIndexOut, lstRstX.size(), size);
123 for (i=iGeneral; i<iGeneral+size;i++)
126 (*lstOutX)[i] = lstRstX[ii];
127 (*lstOutY)[i] = lstRstY[ii];
128 (*lstOutZ)[i] = lstRstZ[ii];
131 iGeneral=iGeneral+size;
136 //-------------------------------------------------------------------------------------------------------------
139 void ManualContourModel_Box::ExtractContour( std::vector<double> *lstX,
140 std::vector<double> *lstY,
141 std::vector<double> *lstZ,
142 std::vector<int> *lstIndexs,
144 std::vector<double> *lstOutX,
145 std::vector<double> *lstOutY,
146 std::vector<double> *lstOutZ )
151 int sizeLstIndexslstIndexs;
153 int iGeneralPlusSize;
154 if ( (lstX!=NULL) && (lstY!=NULL) && (lstZ!=NULL) && (lstIndexs!=NULL) && (lstOutX!=NULL) && (lstOutY!=NULL) && (lstOutZ!=NULL) )
156 sizeLstIndexslstIndexs = (*lstIndexs).size();
157 if ( sizeLstIndexslstIndexs!=0 )
163 iGeneralPlusSize = (*lstIndexs)[0];
164 for ( iContour=1 ; iContour<=contour ; iContour++ )
166 iGeneral = iGeneral+(*lstIndexs)[iContour-1];
167 iGeneralPlusSize = iGeneral+(*lstIndexs)[iContour];
169 for ( i=iGeneral ; i<iGeneralPlusSize ; i++ )
171 (*lstOutX).push_back( (*lstX)[i] );
172 (*lstOutY).push_back( (*lstY)[i] );
173 (*lstOutZ).push_back( (*lstZ)[i] );
179 void ManualContourModel_Box::PutPointsInContour(std::vector<double> *lstTmpX,
180 std::vector<double> *lstTmpY,
181 std::vector<double> *lstTmpZ,
183 std::vector<double> *lstOutX,
184 std::vector<double> *lstOutY,
185 std::vector<double> *lstOutZ,
186 std::vector<int> *lstOutIndexs )
191 int sizeLstIndexslstIndexs;
193 int iGeneralPlusSize;
196 if ( (lstTmpX!=NULL) && (lstTmpY!=NULL) && (lstTmpZ!=NULL) && (lstOutX!=NULL) && (lstOutY!=NULL) && (lstOutZ!=NULL) && (lstOutIndexs!=NULL) )
198 sizeLstIndexslstIndexs = (*lstOutIndexs).size();
199 if ( sizeLstIndexslstIndexs!=0 )
202 SizeContour = (*lstOutIndexs)[0];
203 iGeneralPlusSize = iGeneral + SizeContour;
204 for ( iContour=1 ; iContour<=contour ; iContour++ )
206 iGeneral = iGeneral + (*lstOutIndexs)[iContour-1];
207 SizeContour = (*lstOutIndexs)[iContour];
208 iGeneralPlusSize = iGeneral + SizeContour;
211 if(SizeContour==(*lstTmpX).size() )
214 for ( i=iGeneral ; i<iGeneralPlusSize ; i++ )
216 (*lstOutX)[i] = (*lstTmpX)[iSize] ;
217 (*lstOutY)[i] = (*lstTmpY)[iSize] ;
218 (*lstOutZ)[i] = (*lstTmpZ)[iSize] ;
222 printf("EED Warnning!! ManualContourModel_Box::PutPointsInContour the lstTmp vector is not of the correct size. SizeContour=%d lstTmp.size=%d\n"
223 ,SizeContour, (*lstTmpX).size() );
224 for ( i=iGeneral ; i<iGeneralPlusSize ; i++ )
226 (*lstOutX)[i] = -9999 ;
227 (*lstOutY)[i] = -9999 ;
228 (*lstOutZ)[i] = -9999 ;
235 double ManualContourModel_Box::SizeContour( std::vector<double> *lstX,
236 std::vector<double> *lstY,
237 std::vector<double> *lstZ)
244 int iSize = (*lstX).size() - 1;
245 for ( i=0 ; i<iSize ; i++ )
247 dx = (*lstX)[i+1]-(*lstX)[i];
248 dy = (*lstY)[i+1]-(*lstY)[i];
249 dz = (*lstZ)[i+1]-(*lstZ)[i];
250 dist= dist+sqrt( dx*dx + dy*dy + dz*dz );
256 void ManualContourModel_Box::Redistribution_SIN( double alpha,
258 std::vector<double> *lstC1X,
259 std::vector<double> *lstC1Y,
260 std::vector<double> *lstC1Z,
261 double sizeOfContour,
262 std::vector<double> *lstC2X,
263 std::vector<double> *lstC2Y,
264 std::vector<double> *lstC2Z )
266 std::vector<double> lstRstX;
267 std::vector<double> lstRstY;
268 std::vector<double> lstRstZ;
270 int size,iGeneralPlusSize;
274 double dist2,distSeg;
280 dist = sizeOfContour;
284 // for (iLstIndexOut=0; iLstIndexOut<sizeLstIndexOut; iLstIndexOut++) // For each contour
289 // size = (*lstIndexsOut)[iLstIndexOut];
290 size = (*lstC1X).size();
291 iGeneralPlusSize = iGeneral+size;
295 // for ( i=iGeneral ; i<iGeneralPlusSize-1 ; i++ )
297 // dx = (*lstOutX)[i]-(*lstOutX)[i+1];
298 // dy = (*lstOutY)[i]-(*lstOutY)[i+1];
299 // dz = (*lstOutZ)[i]-(*lstOutZ)[i+1];
300 // dist= dist+sqrt( dx*dx + dy*dy + dz*dz );
304 // delta = dist/(size-1);
306 for (i=iGeneral; i<iGeneralPlusSize;i++) // For each point of one contour
310 for (k=iGeneral; k<iGeneralPlusSize;k++) // Search inside
312 //if ( 385==(*lstOutY)[k] )
314 t = ((double)ii) / ((double)(size-1));
315 // Beta = 0.20; // [0..1]
316 // Alpha = 0.0; // [0..1]
317 // Beta = bbGetInputParam()[0];
318 // Alpha = bbGetInputParam()[1];
319 tt = t + 0.70710678182*sin(t*TwoPI)*beta + alpha;
320 if (tt>1) { tt=tt-1; }
321 if (tt<0) { tt=tt+1; }
322 iiByDelta = tt * dist;
324 // iiByDelta = ii*delta;
327 // dx = (*lstOutX)[k+1]-(*lstOutX)[k];
328 // dy = (*lstOutY)[k+1]-(*lstOutY)[k];
329 // dz = (*lstOutZ)[k+1]-(*lstOutZ)[k];
330 dx = (*lstC1X)[k+1]-(*lstC1X)[k];
331 dy = (*lstC1Y)[k+1]-(*lstC1Y)[k];
332 dz = (*lstC1Z)[k+1]-(*lstC1Z)[k];
333 distSeg = sqrt( dx*dx + dy*dy + dz*dz );
334 if ( dist2+distSeg >= iiByDelta )
340 dd=(iiByDelta-dist2)/distSeg;
342 lstRstX.push_back( (*lstC1X)[k] + dd*dx );
343 lstRstY.push_back( (*lstC1Y)[k] + dd*dy );
344 lstRstZ.push_back( (*lstC1Z)[k] + dd*dz );
345 if (ii==0) { firstK=k; }
346 k = iGeneralPlusSize-1;
348 if ( k==iGeneral+size-2 )
351 lstRstX.push_back( (*lstC1X)[k] + dd*dx );
352 lstRstY.push_back( (*lstC1Y)[k] + dd*dy );
353 lstRstZ.push_back( (*lstC1Z)[k] + dd*dz );
356 dist2 = dist2 + distSeg;
359 if (lstRstX.size()!=size)
361 printf("EED Warnning! ManualContourModel_Box::Redistribution_SIN >> This list is not coherent lstRstX.size()=%d size=%d\n", lstRstX.size(), size);
366 for (i=iGeneral; i<iGeneralPlusSize;i++)
368 (*lstC2X).push_back(-1);
369 (*lstC2Y).push_back(-1);
370 (*lstC2Z).push_back(-1);
373 for (i=iGeneral; i<iGeneralPlusSize;i++)
376 iii = iGeneral+ ( (i-iGeneral) + firstK) % size ;
377 // (*lstOutX)[iii] = lstRstX[ii];
378 // (*lstOutY)[iii] = lstRstY[ii];
379 // (*lstOutZ)[iii] = lstRstZ[ii];
380 (*lstC2X)[iii] = lstRstX[ii];
381 (*lstC2Y)[iii] = lstRstY[ii];
382 (*lstC2Z)[iii] = lstRstZ[ii];
385 for (i=0; i<size ; i++)
387 (*lstC2X)[i] = (*lstC1X)[i];
388 (*lstC2Y)[i] = (*lstC1Y)[i];
389 (*lstC2Z)[i] = (*lstC1Z)[i];
392 // iGeneral=iGeneral+size;
393 // }// for iLstIndexOut
396 void ManualContourModel_Box::CopyContour2InContour1(
397 std::vector<double> *lstInX,
398 std::vector<double> *lstInY,
399 std::vector<double> *lstInZ,
400 std::vector<double> *lstOutX,
401 std::vector<double> *lstOutY,
402 std::vector<double> *lstOutZ )
404 int i,sizeLstInX=(*lstInX).size();
408 for ( i=0 ; i<sizeLstInX ; i++ )
410 (*lstOutX).push_back( (*lstInX)[i] );
411 (*lstOutY).push_back( (*lstInY)[i] );
412 (*lstOutZ).push_back( (*lstInZ)[i] );
416 double ManualContourModel_Box::IntegralDistanceTwoContours(std::vector<double> *lstTmpAX,
417 std::vector<double> *lstTmpAY,
418 std::vector<double> *lstTmpAZ,
419 std::vector<double> *lstTmpBX,
420 std::vector<double> *lstTmpBY,
421 std::vector<double> *lstTmpBZ )
428 int iSize = (*lstTmpAX).size();
429 for ( i=0 ; i<iSize ; i++ )
431 dx = (*lstTmpAX)[i]-(*lstTmpBX)[i];
432 dy = (*lstTmpAY)[i]-(*lstTmpBY)[i];
433 dz = (*lstTmpAZ)[i]-(*lstTmpBZ)[i];
434 dist = dist + sqrt( dx*dx + dy*dy + dz*dz );
440 void ManualContourModel_Box::RedistributionPointsAllContours_SIN( std::vector<double> *lstOutX,
441 std::vector<double> *lstOutY,
442 std::vector<double> *lstOutZ,
443 std::vector<int> *lstIndexsOut )
445 std::vector<double> lstTmp1X;
446 std::vector<double> lstTmp1Y;
447 std::vector<double> lstTmp1Z;
448 std::vector<double> lstTmp2X;
449 std::vector<double> lstTmp2Y;
450 std::vector<double> lstTmp2Z;
451 std::vector<double> lstTmp2aX;
452 std::vector<double> lstTmp2aY;
453 std::vector<double> lstTmp2aZ;
454 std::vector<double> lstTmp2bX;
455 std::vector<double> lstTmp2bY;
456 std::vector<double> lstTmp2bZ;
457 std::vector<double> lstTmp2cX;
458 std::vector<double> lstTmp2cY;
459 std::vector<double> lstTmp2cZ;
460 std::vector<double> lstTmp3X;
461 std::vector<double> lstTmp3Y;
462 std::vector<double> lstTmp3Z;
463 std::vector<int> lstContourExeption;
465 double nbContours = (*lstIndexsOut).size();
474 // ------------ Wave 1 -----------------
476 ExtractContour(lstOutX,lstOutY,lstOutZ,lstIndexsOut,0,&lstTmp1X,&lstTmp1Y,&lstTmp1Z);
477 sizeContour1 = SizeContour( &lstTmp1X, &lstTmp1Y, &lstTmp1Z );
480 for ( iContour=0; iContour<nbContours-1 ; iContour++ )
485 ExtractContour( lstOutX,lstOutY,lstOutZ,lstIndexsOut, iContour+1 ,&lstTmp2X,&lstTmp2Y,&lstTmp2Z );
486 sizeContour2 = SizeContour( &lstTmp2X, &lstTmp2Y, &lstTmp2Z );
488 if (iContour+2<nbContours)
490 ExtractContour( lstOutX,lstOutY,lstOutZ,lstIndexsOut, iContour+2 ,&lstTmp3X,&lstTmp3Y,&lstTmp3Z );
491 sizeContour3 = SizeContour( &lstTmp3X, &lstTmp3Y, &lstTmp3Z );
496 if ( (sizeContour1>sizeContour2) && (sizeContour2>sizeContour3) )
500 minDistAcum = 999999999;
501 for (iAlpha=0 ; iAlpha<1; iAlpha=iAlpha+0.1 )
503 Redistribution_SIN( iAlpha,beta, &lstTmp2X,&lstTmp2Y,&lstTmp2Z ,sizeContour2, &lstTmp2aX,&lstTmp2aY,&lstTmp2aZ );
504 distAcum = IntegralDistanceTwoContours( &lstTmp1X,&lstTmp1Y,&lstTmp1Z , &lstTmp2aX,&lstTmp2aY,&lstTmp2aZ );
505 if (distAcum<minDistAcum)
508 minDistAcum = distAcum;
512 minDistAcum = 999999999;
513 for (iBeta=0.0 ; iBeta<0.2; iBeta=iBeta+0.01)
515 Redistribution_SIN( alpha,iBeta, &lstTmp2X,&lstTmp2Y,&lstTmp2Z ,sizeContour2, &lstTmp2aX,&lstTmp2aY,&lstTmp2aZ );
516 distAcum = IntegralDistanceTwoContours( &lstTmp1X,&lstTmp1Y,&lstTmp1Z , &lstTmp2aX,&lstTmp2aY,&lstTmp2aZ );
517 if (distAcum<minDistAcum)
520 minDistAcum = distAcum;
524 } //if sizeContour1>sizeContour2>sizeContour3
526 if ( (sizeContour1>sizeContour2) && (sizeContour2<sizeContour3) )
528 lstContourExeption.push_back( iContour+1 );
532 Redistribution_SIN( alpha,beta, &lstTmp2X,&lstTmp2Y,&lstTmp2Z ,sizeContour2, &lstTmp2aX,&lstTmp2aY,&lstTmp2aZ );
534 PutPointsInContour(&lstTmp2aX,&lstTmp2aY,&lstTmp2aZ, iContour+1 ,lstOutX,lstOutY,lstOutZ,lstIndexsOut);
535 sizeContour1 = sizeContour2;
536 CopyContour2InContour1( &lstTmp2aX,&lstTmp2aY,&lstTmp2aZ , &lstTmp1X,&lstTmp1Y,&lstTmp1Z );
544 // ------------ Wave 2 -----------------
546 ExtractContour(lstOutX,lstOutY,lstOutZ,lstIndexsOut,nbContours-1,&lstTmp1X,&lstTmp1Y,&lstTmp1Z);
547 sizeContour1 = SizeContour( &lstTmp1X, &lstTmp1Y, &lstTmp1Z );
550 for ( iContour=nbContours-1; iContour>=0 ; iContour-- )
555 ExtractContour( lstOutX,lstOutY,lstOutZ,lstIndexsOut, iContour-1 ,&lstTmp2X,&lstTmp2Y,&lstTmp2Z );
556 sizeContour2 = SizeContour( &lstTmp2X, &lstTmp2Y, &lstTmp2Z );
561 ExtractContour( lstOutX,lstOutY,lstOutZ,lstIndexsOut, iContour-2 ,&lstTmp3X,&lstTmp3Y,&lstTmp3Z );
562 sizeContour3 = SizeContour( &lstTmp3X, &lstTmp3Y, &lstTmp3Z );
567 if ( (sizeContour1>sizeContour2) && (sizeContour2>sizeContour3) ){
570 minDistAcum = 999999999;
571 for (iAlpha=0 ; iAlpha<1; iAlpha=iAlpha+0.1 )
573 Redistribution_SIN( iAlpha,beta, &lstTmp2X,&lstTmp2Y,&lstTmp2Z ,sizeContour2, &lstTmp2aX,&lstTmp2aY,&lstTmp2aZ );
574 distAcum = IntegralDistanceTwoContours( &lstTmp1X,&lstTmp1Y,&lstTmp1Z , &lstTmp2aX,&lstTmp2aY,&lstTmp2aZ );
575 if (distAcum<minDistAcum)
578 minDistAcum = distAcum;
582 minDistAcum = 999999999;
583 for (iBeta=0.0 ; iBeta<0.2; iBeta=iBeta+0.01)
585 Redistribution_SIN( alpha,iBeta, &lstTmp2X,&lstTmp2Y,&lstTmp2Z ,sizeContour2, &lstTmp2aX,&lstTmp2aY,&lstTmp2aZ );
586 distAcum = IntegralDistanceTwoContours( &lstTmp1X,&lstTmp1Y,&lstTmp1Z , &lstTmp2aX,&lstTmp2aY,&lstTmp2aZ );
587 if (distAcum<minDistAcum)
590 minDistAcum = distAcum;
594 } //if sizeContour1>sizeContour2>sizeContour3
598 Redistribution_SIN( alpha,beta, &lstTmp2X,&lstTmp2Y,&lstTmp2Z ,sizeContour2, &lstTmp2aX,&lstTmp2aY,&lstTmp2aZ );
600 PutPointsInContour(&lstTmp2aX,&lstTmp2aY,&lstTmp2aZ, iContour-1 ,lstOutX,lstOutY,lstOutZ,lstIndexsOut);
601 sizeContour1 = sizeContour2;
602 CopyContour2InContour1( &lstTmp2aX,&lstTmp2aY,&lstTmp2aZ , &lstTmp1X,&lstTmp1Y,&lstTmp1Z );
608 // ------------ Wave 3 -----------------
610 double alpha1,alpha2;
612 double iExtra,sizeExtra=lstContourExeption.size();
613 for ( iExtra=0 ; iExtra<sizeExtra ; iExtra++ )
616 ExtractContour(lstOutX,lstOutY,lstOutZ,lstIndexsOut, lstContourExeption[iExtra]-1 , &lstTmp1X,&lstTmp1Y,&lstTmp1Z);
617 sizeContour1 = SizeContour( &lstTmp1X, &lstTmp1Y, &lstTmp1Z );
618 ExtractContour(lstOutX,lstOutY,lstOutZ,lstIndexsOut, lstContourExeption[iExtra] , &lstTmp2X,&lstTmp2Y,&lstTmp2Z);
619 sizeContour2 = SizeContour( &lstTmp2X, &lstTmp2Y, &lstTmp2Z );
620 ExtractContour(lstOutX,lstOutY,lstOutZ,lstIndexsOut, lstContourExeption[iExtra]+1 , &lstTmp3X,&lstTmp3Y,&lstTmp3Z);
621 sizeContour3 = SizeContour( &lstTmp3X, &lstTmp3Y, &lstTmp3Z );
623 printf("EED Warnning! ManualContourModel_Box::RedistributionPointsAllContours_SIN wave3 posible inconsistent contour y=%f\n", lstTmp2Y[0] );
628 minDistAcum = 999999999;
629 for (iAlpha=0 ; iAlpha<1; iAlpha=iAlpha+0.1 )
631 Redistribution_SIN( iAlpha,beta1, &lstTmp2X,&lstTmp2Y,&lstTmp2Z ,sizeContour2, &lstTmp2aX,&lstTmp2aY,&lstTmp2aZ );
632 distAcum = IntegralDistanceTwoContours( &lstTmp1X,&lstTmp1Y,&lstTmp1Z , &lstTmp2aX,&lstTmp2aY,&lstTmp2aZ );
633 if (distAcum<minDistAcum)
636 minDistAcum = distAcum;
640 minDistAcum = 999999999;
641 for (iBeta=0.0 ; iBeta<0.2; iBeta=iBeta+0.01)
643 Redistribution_SIN( alpha1,iBeta, &lstTmp2X,&lstTmp2Y,&lstTmp2Z ,sizeContour2, &lstTmp2aX,&lstTmp2aY,&lstTmp2aZ );
644 distAcum = IntegralDistanceTwoContours( &lstTmp1X,&lstTmp1Y,&lstTmp1Z , &lstTmp2aX,&lstTmp2aY,&lstTmp2aZ );
645 if (distAcum<minDistAcum)
648 minDistAcum = distAcum;
656 minDistAcum = 999999999;
657 for (iAlpha=0 ; iAlpha<1; iAlpha=iAlpha+0.1 )
659 Redistribution_SIN( iAlpha,beta2, &lstTmp2X,&lstTmp2Y,&lstTmp2Z ,sizeContour2, &lstTmp2bX,&lstTmp2bY,&lstTmp2bZ );
660 distAcum = IntegralDistanceTwoContours( &lstTmp3X,&lstTmp3Y,&lstTmp3Z , &lstTmp2bX,&lstTmp2bY,&lstTmp2bZ );
661 if (distAcum<minDistAcum)
664 minDistAcum = distAcum;
668 minDistAcum = 999999999;
669 for (iBeta=0.0 ; iBeta<0.2; iBeta=iBeta+0.01)
671 Redistribution_SIN( alpha2,iBeta, &lstTmp2X,&lstTmp2Y,&lstTmp2Z ,sizeContour2, &lstTmp2bX,&lstTmp2bY,&lstTmp2bZ );
672 distAcum = IntegralDistanceTwoContours( &lstTmp3X,&lstTmp3Y,&lstTmp3Z , &lstTmp2bX,&lstTmp2bY,&lstTmp2bZ );
673 if (distAcum<minDistAcum)
676 minDistAcum = distAcum;
686 beta = ( beta1 + beta2 ) / 2;
687 Redistribution_SIN( alpha,beta, &lstTmp2X,&lstTmp2Y,&lstTmp2Z ,sizeContour2, &lstTmp2bX,&lstTmp2bY,&lstTmp2bZ );
688 PutPointsInContour(&lstTmp2bX,&lstTmp2bY,&lstTmp2bZ, lstContourExeption[iExtra] ,lstOutX,lstOutY,lstOutZ,lstIndexsOut);
690 // Redistribution_SIN( alpha1,beta1, &lstTmp2X,&lstTmp2Y,&lstTmp2Z ,sizeContour2, &lstTmp2aX,&lstTmp2aY,&lstTmp2aZ );
691 // Redistribution_SIN( alpha2,beta2, &lstTmp2X,&lstTmp2Y,&lstTmp2Z ,sizeContour2, &lstTmp2bX,&lstTmp2bY,&lstTmp2bZ );
692 // Mixing2DistributionVectors(&lstTmp2aX,&lstTmp2aY,&lstTmp2aZ,&lstTmp2bX,&lstTmp2bY,&lstTmp2bZ, &lstTmp2cX,&lstTmp2cY,&lstTmp2cZ );
693 // PutPointsInContour(&lstTmp2cX,&lstTmp2cY,&lstTmp2cZ, lstContourExeption[iExtra] ,lstOutX,lstOutY,lstOutZ,lstIndexsOut);
702 void ManualContourModel_Box::Mixing2DistributionVectors( std::vector<double> *lstAX,
703 std::vector<double> *lstAY,
704 std::vector<double> *lstAZ,
705 std::vector<double> *lstBX,
706 std::vector<double> *lstBY,
707 std::vector<double> *lstBZ,
708 std::vector<double> *lstOutX,
709 std::vector<double> *lstOutY,
710 std::vector<double> *lstOutZ)
716 std::vector<double> lstTmpX;
717 std::vector<double> lstTmpY;
718 std::vector<double> lstTmpZ;
730 size = (*lstAX).size();
732 lstTmpX.push_back( (*lstAX)[0] );
733 lstTmpY.push_back( (*lstAY)[0] );
734 lstTmpZ.push_back( (*lstAZ)[0] );
735 lstTmpX.push_back( (*lstBX)[0] );
736 lstTmpY.push_back( (*lstBY)[0] );
737 lstTmpZ.push_back( (*lstBZ)[0] );
739 while ((i<size )&& (j<size))
741 dx = (*lstAX)[i]-(*lstAX)[i-1];
742 dy = (*lstAY)[i]-(*lstAY)[i-1];
743 dz = (*lstAZ)[i]-(*lstAZ)[i-1];
744 distA = sqrt( dx*dx + dy*dy +dz*dz );
745 dx = (*lstBX)[j]-(*lstBX)[j-1];
746 dy = (*lstBY)[j]-(*lstBY)[j-1];
747 dz = (*lstBZ)[j]-(*lstBZ)[j-1];
748 distB = sqrt( dx*dx + dy*dy +dz*dz );
751 if ((distAT+distA)<(distBT+distB))
754 } else if ((distAT+distA)>(distBT+distB))
760 } // if distAT+distA distBT+distB
764 lstTmpX.push_back( (*lstAX)[i] );
765 lstTmpY.push_back( (*lstAY)[i] );
766 lstTmpZ.push_back( (*lstAZ)[i] );
767 distAT = distAT+distA;
773 lstTmpX.push_back( (*lstBX)[j] );
774 lstTmpY.push_back( (*lstBY)[j] );
775 lstTmpZ.push_back( (*lstBZ)[j] );
776 distBT = distBT+distB;
782 sizeTmpX = lstTmpX.size();
783 for (ii=0; ii<sizeTmpX; ii=ii+2)
785 (*lstOutX).push_back( lstTmpX[ii] );
786 (*lstOutY).push_back( lstTmpY[ii] );
787 (*lstOutZ).push_back( lstTmpZ[ii] );
789 printf("EED ManualContourModel_Box::Mixing2DistributionVectors Y=%f size=%d sizeTmpX=%d sizeOut=%d \n",lstTmpY[0], size,sizeTmpX, (*lstOutX).size() );
797 void ManualContourModel_Box::RedistributionPoints_SIN_iContour(int iContour, std::vector<double> *lstOutX,
798 std::vector<double> *lstOutY,
799 std::vector<double> *lstOutZ,
800 std::vector<int> *lstIndexsOut,double alpha, double beta )
802 printf("EED ManualContourModel_Box::RedistributionPoints_SIN_iContour Start \n");
803 std::vector<double> lstRstX;
804 std::vector<double> lstRstY;
805 std::vector<double> lstRstZ;
806 int iLstIndexOut,sizeLstIndexOut = lstIndexsOut->size();
809 int size,iGeneralPlusSize;
810 double Alpha,Beta,t,tt, PI=3.14159265;
812 double dist=0,dist2,distSeg,delta;
816 double tmpX,tmpY,tmpZ;
818 for (iLstIndexOut=0; iLstIndexOut<sizeLstIndexOut; iLstIndexOut++) // For each contour
823 size = (*lstIndexsOut)[iLstIndexOut];
824 iGeneralPlusSize = iGeneral+size;
828 for ( i=iGeneral ; i<iGeneralPlusSize-1 ; i++ )
830 dx = (*lstOutX)[i]-(*lstOutX)[i+1];
831 dy = (*lstOutY)[i]-(*lstOutY)[i+1];
832 dz = (*lstOutZ)[i]-(*lstOutZ)[i+1];
833 dist= dist+sqrt( dx*dx + dy*dy + dz*dz );
835 delta = dist/(size-1);
838 for (i=iGeneral; i<iGeneralPlusSize;i++) // For each point of one contour
842 for (k=iGeneral; k<iGeneralPlusSize-1;k++) // Search inside
844 if ( 385==(*lstOutY)[k] )
846 t = ((double)ii) / ((double)(size-1));
847 Beta = 0.20; // [0..1]
848 Alpha = 0.0; // [0..1]
849 Beta = bbGetInputParam()[0];
850 Alpha = bbGetInputParam()[1];
851 tt = t + 0.70710678182*sin(t*TwoPI)*Beta + Alpha;
852 if (tt>1) { tt=tt-1; }
853 if (tt<0) { tt=tt+1; }
854 iiByDelta = tt * dist;
856 iiByDelta = ii*delta;
858 dx = (*lstOutX)[k+1]-(*lstOutX)[k];
859 dy = (*lstOutY)[k+1]-(*lstOutY)[k];
860 dz = (*lstOutZ)[k+1]-(*lstOutZ)[k];
861 distSeg = sqrt( dx*dx + dy*dy + dz*dz );
862 if ( dist2+distSeg >= iiByDelta )
868 dd=(iiByDelta-dist2)/distSeg;
870 lstRstX.push_back( (*lstOutX)[k] + dd*dx );
871 lstRstY.push_back( (*lstOutY)[k] + dd*dy );
872 lstRstZ.push_back( (*lstOutZ)[k] + dd*dz );
873 if (ii==0) { firstK=k; }
874 k = iGeneralPlusSize-1;
876 if ( k==iGeneral+size-2 )
879 lstRstX.push_back( (*lstOutX)[k] + dd*dx );
880 lstRstY.push_back( (*lstOutY)[k] + dd*dy );
881 lstRstZ.push_back( (*lstOutZ)[k] + dd*dz );
884 dist2 = dist2+distSeg;
889 if (lstRstX.size()!=size)
891 printf("EED Warnning! ManualContourModel_Box::RedistributionPoints >> This list is not coherent iLstIndexOut=%d lstRstX.size()=%d size=%d\n",iLstIndexOut, lstRstX.size(), size);
892 tmpX = lstRstX[iGeneral];
893 tmpY = lstRstY[iGeneral];
894 tmpZ = lstRstZ[iGeneral];
895 lstRstX.push_back( tmpX );
896 lstRstY.push_back( tmpY );
897 lstRstZ.push_back( tmpZ );
900 for (i=iGeneral; i<iGeneralPlusSize;i++)
902 // ii=( (i-iGeneral) + firstK) % size ;
904 iii=iGeneral+ ( (i-iGeneral) + firstK) % size ;
905 (*lstOutX)[iii] = lstRstX[ii];
906 (*lstOutY)[iii] = lstRstY[ii];
907 (*lstOutZ)[iii] = lstRstZ[ii];
910 iGeneral=iGeneral+size;
913 printf("EED ManualContourModel_Box::RedistributionPoints_SIN_iContour End \n");
919 void ManualContourModel_Box::ClockwisePoints( std::vector<double> *lstInX,
920 std::vector<double> *lstInY,
921 std::vector<double> *lstInZ,
922 std::vector<int> *lstIndexsIn )
924 int iLstIndexIn,sizeLstIndexIn=lstIndexsIn->size();
929 double backpx,backpy,backpz;
938 for (iLstIndexIn=0; iLstIndexIn<sizeLstIndexIn; iLstIndexIn++)
940 // Step 1. Find gravity center and direction
941 size = (*lstIndexsIn)[iLstIndexIn];
942 if (size>2) // for contour with more than 2 points
950 for ( i=0 ; i<size ; i++ )
952 px=(*lstInX)[iGeneral+i];
953 py=(*lstInY)[iGeneral+i];
954 pz=(*lstInZ)[iGeneral+i];
960 if (backpx!=px) { dirx=false; }
961 if (backpy!=py) { diry=false; }
962 if (backpz!=pz) { dirz=false; }
974 if (dirx==true) { dir=1; } // YZ
975 if (diry==true) { dir=2; } // XZ
976 if (dirz==true) { dir=0; } // XZ
977 // Step 2. Find angle diference find
979 for ( i=0 ; i<size ; i++ )
981 px = (*lstInX)[iGeneral+i]-cx;
982 py = (*lstInY)[iGeneral+i]-cy;
983 pz = (*lstInZ)[iGeneral+i]-cz;
984 if (dir==0) { ang=atan2( py , px ); } // XY
985 if (dir==1) { ang=atan2( pz , py ); } // YZ
986 if (dir==2) { ang=atan2( pz , px ); } // XZ
1000 // Step 3. Invert order of points
1004 for ( i=0 ; i<size2 ; i++ )
1006 tmp = (*lstInX)[iGeneral+i];
1007 (*lstInX)[iGeneral+i] = (*lstInX)[iGeneral+size-1-i];
1008 (*lstInX)[iGeneral+size-1-i] = tmp;
1009 tmp = (*lstInY)[iGeneral+i];
1010 (*lstInY)[iGeneral+i] = (*lstInY)[iGeneral+size-1-i];
1011 (*lstInY)[iGeneral+size-1-i] = tmp;
1012 tmp = (*lstInZ)[iGeneral+i];
1013 (*lstInZ)[iGeneral+i] = (*lstInZ)[iGeneral+size-1-i];
1014 (*lstInZ)[iGeneral+size-1-i] = tmp;
1018 iGeneral = iGeneral+size;
1019 } // for iLstIndexIn
1024 void ManualContourModel_Box::ShiftValues( std::vector<double> *lstInX,
1025 std::vector<double> *lstInY,
1026 std::vector<double> *lstInZ,
1027 std::vector<int> *lstIndexsIn )
1029 int iLstIndexIn,sizeLstIndexIn=lstIndexsIn->size();
1032 double dist,distMin;
1036 std::vector<double> LstTmpX;
1037 std::vector<double> LstTmpY;
1038 std::vector<double> LstTmpZ;
1039 if (sizeLstIndexIn>=2)
1042 for (iLstIndexIn=0; iLstIndexIn<sizeLstIndexIn-1; iLstIndexIn++)
1044 size = (*lstIndexsIn)[iLstIndexIn];
1045 size2 = (*lstIndexsIn)[iLstIndexIn+1];
1046 //find min distance and iBack
1051 for (ig=0; ig<size; ig++)
1053 for ( i=0 ; i<size2 ; i++ )
1055 dx = (*lstInX)[iGeneral+ig]-(*lstInX)[iGeneral+size+i];
1056 dy = (*lstInY)[iGeneral+ig]-(*lstInY)[iGeneral+size+i];
1057 dz = (*lstInZ)[iGeneral+ig]-(*lstInZ)[iGeneral+size+i];
1058 dist= sqrt( dx*dx + dy*dy + dz*dz );
1070 iBack = iBack + size2;
1073 printf("EED ManualContourModel_Box::ShiftValues px=%f py=%f pz=%f iBack=%d/%d size=%d distMin=%f \n", (*lstInX)[iGeneral] , (*lstInY)[iGeneral] , (*lstInZ)[iGeneral], iBack, size2,size, distMin);
1080 for (i=0 ; i<size2 ; i++)
1082 ii= (i+iBack)%size2;
1083 LstTmpX.push_back( (*lstInX)[iGeneral+size+ii] );
1084 LstTmpY.push_back( (*lstInY)[iGeneral+size+ii] );
1085 LstTmpZ.push_back( (*lstInZ)[iGeneral+size+ii] );
1087 for (i=0 ; i<size2 ; i++)
1089 (*lstInX)[iGeneral+size+i] = LstTmpX[i];
1090 (*lstInY)[iGeneral+size+i] = LstTmpY[i];
1091 (*lstInZ)[iGeneral+size+i] = LstTmpZ[i];
1094 iGeneral=iGeneral+size;
1095 } // for iLstIndexIn
1101 for (iLstIndexIn=0; iLstIndexIn<sizeLstIndexIn-1; iLstIndexIn++)
1103 size = (*lstIndexsIn)[iLstIndexIn];
1104 size2 = (*lstIndexsIn)[iLstIndexIn+1];
1105 //find min distance and iBack
1110 // for (ig=0; ig<size; ig++)
1112 for ( i=0 ; i<size2 ; i++ )
1114 dx = (*lstInX)[iGeneral]-(*lstInX)[iGeneral+size+i];
1115 dy = (*lstInY)[iGeneral]-(*lstInY)[iGeneral+size+i];
1116 dz = (*lstInZ)[iGeneral]-(*lstInZ)[iGeneral+size+i];
1117 dist= sqrt( dx*dx + dy*dy + dz*dz );
1127 printf("EED ManualContourModel_Box::ShiftValues px=%f py=%f pz=%f iBack=%d/%d size=%d distMin=%f \n", (*lstInX)[iGeneral] , (*lstInY)[iGeneral] , (*lstInZ)[iGeneral], iBack, size2,size, distMin);
1134 for (i=0 ; i<size2 ; i++)
1136 ii= (i+iBack)%size2;
1137 LstTmpX.push_back( (*lstInX)[iGeneral+size+ii] );
1138 LstTmpY.push_back( (*lstInY)[iGeneral+size+ii] );
1139 LstTmpZ.push_back( (*lstInZ)[iGeneral+size+ii] );
1141 for (i=0 ; i<size2 ; i++)
1143 (*lstInX)[iGeneral+size+i] = LstTmpX[i];
1144 (*lstInY)[iGeneral+size+i] = LstTmpY[i];
1145 (*lstInZ)[iGeneral+size+i] = LstTmpZ[i];
1148 iGeneral=iGeneral+size;
1149 } // for iLstIndexIn
1151 } // if sizeLstIndexIn
1158 void ManualContourModel_Box::ShiftValues( std::vector<double> *lstInX,
1159 std::vector<double> *lstInY,
1160 std::vector<double> *lstInZ,
1161 std::vector<int> *lstIndexsIn )
1163 int iLstIndexIn,sizeLstIndexIn=lstIndexsIn->size();
1166 double dist,distMin;
1170 std::vector<double> LstTmpX;
1171 std::vector<double> LstTmpY;
1172 std::vector<double> LstTmpZ;
1173 if (sizeLstIndexIn>=2)
1178 for (iLstIndexIn=0; iLstIndexIn<sizeLstIndexIn-1; iLstIndexIn++)
1180 size = (*lstIndexsIn)[iLstIndexIn];
1181 size2 = (*lstIndexsIn)[iLstIndexIn+1];
1182 //find min distance and iBack
1186 // Comparing distance between two contours
1187 // Both contours need the same size
1188 for (ig=0; ig<size; ig++)
1191 for ( i=0 ; i<size2 ; i++ )
1193 dx = (*lstInX)[iGeneral+i]-(*lstInX)[iGeneral+size+(i+ig)%size];
1194 dy = (*lstInY)[iGeneral+i]-(*lstInY)[iGeneral+size+(i+ig)%size];
1195 dz = (*lstInZ)[iGeneral+i]-(*lstInZ)[iGeneral+size+(i+ig)%size];
1196 dist= dist + sqrt( dx*dx + dy*dy + dz*dz );
1208 //printf("EED ManualContourModel_Box::ShiftValues px=%f py=%f pz=%f iBack=%d/%d size=%d distMin=%f \n", (*lstInX)[iGeneral] , (*lstInY)[iGeneral] , (*lstInZ)[iGeneral], iBack, size2,size, distMin);
1215 for (i=0 ; i<size2 ; i++)
1217 ii = (i+iBack)%size2;
1218 if (ii<(size2-1)) // Skip the last item
1220 LstTmpX.push_back( (*lstInX)[iGeneral+size+ii] );
1221 LstTmpY.push_back( (*lstInY)[iGeneral+size+ii] );
1222 LstTmpZ.push_back( (*lstInZ)[iGeneral+size+ii] );
1226 //Repeat the first item at the end to close the contour
1227 LstTmpX.push_back( LstTmpX[0] );
1228 LstTmpY.push_back( LstTmpY[0] );
1229 LstTmpZ.push_back( LstTmpZ[0] );
1231 for (i=0 ; i<size2 ; i++)
1233 (*lstInX)[iGeneral+size+i] = LstTmpX[i];
1234 (*lstInY)[iGeneral+size+i] = LstTmpY[i];
1235 (*lstInZ)[iGeneral+size+i] = LstTmpZ[i];
1238 iGeneral=iGeneral+size;
1239 } // for iLstIndexIn
1242 } // if sizeLstIndexIn
1251 void ManualContourModel_Box::Process()
1253 // THE MAIN PROCESSING METHOD BODY
1254 // Here we simply set the input 'In' value to the output 'Out'
1255 // And print out the output value
1256 // INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
1257 // void bbSet{Input|Output}NAME(const TYPE&)
1258 // const TYPE& bbGet{Input|Output}NAME() const
1260 // * NAME is the name of the input/output
1261 // (the one provided in the attribute 'name' of the tag 'input')
1262 // * TYPE is the C++ type of the input/output
1263 // (the one provided in the attribute 'type' of the tag 'input')
1265 // bbSetOutputOut( bbGetInputIn() );
1266 // std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
1268 // First Step Spline Interpolation
1269 std::vector<double> lstInX=bbGetInputLstControlPointsX();
1270 std::vector<double> lstInY=bbGetInputLstControlPointsY();
1271 std::vector<double> lstInZ=bbGetInputLstControlPointsZ();
1272 if ( (lstInX.size()!=lstInY.size()) || (lstInY.size()!=lstInZ.size()) )
1274 printf("Warnning !! .. ManualContourModel_Box: The list X Y Z, no have the same number of elements \n");
1277 std::vector<int> lstIndexsIn=bbGetInputLstIndexsIn();
1278 std::vector<int> lstIndexsOut;
1279 std::vector<double> lstOutX;
1280 std::vector<double> lstOutY;
1281 std::vector<double> lstOutZ;
1282 if (bbGetInputLstIndexsIn().size()==0)
1284 lstIndexsIn.push_back( lstInX.size() );
1287 // Step 1. All contours the same clockwise direction (Control Points)
1288 if (bbGetInputDoubleContour()==1)
1290 ClockwisePoints( &lstInX , &lstInY , &lstInZ , &lstIndexsIn );
1291 // ShiftValues( &lstInX , &lstInY , &lstInZ , &lstIndexsIn );
1293 int i,size=lstIndexsIn.size();
1296 // Step 2. Spline interpolation of control points
1297 for (i=0;i<size;i++)
1299 ProcessBySegment( bbGetInputType() ,
1300 iGeneral, lstIndexsIn[i] ,
1301 &lstInX , &lstInY , &lstInZ,
1302 &lstOutX , &lstOutY , &lstOutZ,
1303 &lstIndexsOut,bbGetInputOpenClose() );
1306 if (bbGetInputDoubleContour()==0)
1308 // Finish if Simple contours
1309 //////////////////// Set Out DoubleContour = 0
1310 bbSetOutputLstContourPointsX(lstOutX);
1311 bbSetOutputLstContourPointsY(lstOutY);
1312 bbSetOutputLstContourPointsZ(lstOutZ);
1313 bbSetOutputLstIndexsOut(lstIndexsOut);
1315 // Step 3. Interpolation in the other direction
1316 // Step 3.1 Linear Normalice points around contours
1317 RedistributionPoints(&lstOutX,&lstOutY,&lstOutZ,&lstIndexsOut);
1319 // Step 3.2 Shift points to find minimun acumulate distance
1320 ShiftValues( &lstOutX, &lstOutY, &lstOutZ, &lstIndexsOut );
1321 // Step 3.3. SIN Normalice points around contours
1322 // RedistributionPoints_SIN_iContour(-1, &lstOutX,&lstOutY,&lstOutZ,&lstIndexsOut,-1,-1);
1324 if (bbGetInputParam()[0]==1)
1326 RedistributionPointsAllContours_SIN( &lstOutX,&lstOutY,&lstOutZ,&lstIndexsOut);
1327 ShiftValues( &lstOutX, &lstOutY, &lstOutZ, &lstIndexsOut );
1329 // Step 3.4 Transpose the vectors
1333 lstIndexsIn.clear();
1334 size = bbGetInputNbPoints();
1335 int j,size2 = lstIndexsOut.size();
1336 for (i=0;i<size;i++)
1338 for (j=0;j<size2;j++)
1340 lstInX.push_back( lstOutX[ j*lstIndexsOut[j] + i ] );
1341 lstInY.push_back( lstOutY[ j*lstIndexsOut[j] + i ] );
1342 lstInZ.push_back( lstOutZ[ j*lstIndexsOut[j] + i ] );
1344 lstIndexsIn.push_back( size2 );
1349 lstIndexsOut.clear();
1350 // Step 3.5 Interponation 2
1351 size=lstIndexsIn.size();
1353 for (i=0;i<size;i++)
1355 ProcessBySegment( bbGetInputType() ,
1356 iGeneral, lstIndexsIn[i] ,
1357 &lstInX,&lstInY,&lstInZ,
1358 &lstOutX,&lstOutY,&lstOutZ,
1359 &lstIndexsOut,bbGetInputOpenClose2());
1361 RedistributionPoints(&lstOutX,&lstOutY,&lstOutZ,&lstIndexsOut);
1362 // Step 3.6 Transpose the vectors
1366 lstIndexsIn.clear();
1367 size = bbGetInputNbPoints();
1368 size2 = lstIndexsOut.size();
1369 for (i=0;i<size;i++)
1371 for (j=0;j<size2;j++)
1373 lstInX.push_back( lstOutX[ j*lstIndexsOut[j] + i ] );
1374 lstInY.push_back( lstOutY[ j*lstIndexsOut[j] + i ] );
1375 lstInZ.push_back( lstOutZ[ j*lstIndexsOut[j] + i ] );
1377 lstIndexsIn.push_back( size2 );
1382 lstIndexsOut.clear();
1383 //////////////////// Set Out DoubleContour = 1
1384 bbSetOutputLstContourPointsX(lstInX);
1385 bbSetOutputLstContourPointsY(lstInY);
1386 bbSetOutputLstContourPointsZ(lstInZ);
1387 bbSetOutputLstIndexsOut(lstIndexsIn);
1389 } // if DoubleContour
1393 // 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)
1395 void ManualContourModel_Box::bbUserSetDefaultValues()
1398 // SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
1399 // Here we initialize the input 'In' to 0
1401 bbSetInputDoubleContour(0);
1402 bbSetInputOpenClose(false);
1403 bbSetInputOpenClose2(false);
1404 bbSetInputNbPoints(100);
1408 // 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)
1410 void ManualContourModel_Box::bbUserInitializeProcessing()
1413 // THE INITIALIZATION METHOD BODY :
1414 // Here does nothing
1415 // but this is where you should allocate the internal/output pointers
1421 // 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)
1423 void ManualContourModel_Box::bbUserFinalizeProcessing()
1426 // THE FINALIZATION METHOD BODY :
1427 // Here does nothing
1428 // but this is where you should desallocate the internal/output pointers
1433 // EO namespace bbcreaMaracasVisu