+ if (bbGetInputType()==11) // Nearest point in vector
+ {
+ int i;
+ int sizeLstX = In0.size(); // lstX
+ int sizeLstY = In1.size(); // lstY
+ int sizeLstZ = In2.size(); // lstZ
+ std::vector<double> spc = bbGetInputk1();
+ if (spc.size()>=1)
+ {
+ for (i=0;i<sizeLstX; i++)
+ {
+ Out0.push_back( In0[i]*spc[0] );
+ } // for i
+ } else {
+ printf("EED Warnning VectorFilterDouble::Process() For Type 11 the K1 vector (spacing) is not coherent.\n");
+ }// if size
+ if (spc.size()>=2)
+ {
+ for (i=0;i<sizeLstY; i++)
+ {
+ Out1.push_back( In1[i]*spc[1] );
+ } // for i
+ } else {
+ printf("EED Warnning VectorFilterDouble::Process() For Type 11 the K1 vector (spacing) is not coherent.\n");
+ }// if size
+ if (spc.size()>=3)
+ {
+ for (i=0;i<sizeLstZ; i++)
+ {
+ Out2.push_back( In2[i]*spc[2] );
+ } // for i
+ } else {
+ printf("EED Warnning VectorFilterDouble::Process() For Type 11 the K1 vector (spacing) is not coherent.\n");
+ }// if size
+ } // Type 11
+ if (bbGetInputType()==12) // Nearest point in vector
+ {
+ int i;
+ int sizeLstX = In0.size(); // lstX
+ int sizeLstY = In1.size(); // lstY
+ int sizeLstZ = In2.size(); // lstZ
+ std::vector<double> spc = bbGetInputk1();
+ if (spc.size()>=1)
+ {
+ if (spc[0]!=0)
+ {
+ for (i=0;i<sizeLstX; i++)
+ {
+ Out0.push_back( In0[i]/spc[0] );
+ } // for i
+ } // if spc !=0
+ } else {
+ printf("EED Warnning VectorFilterDouble::Process() For Type 12 the K1 vector (spacing) is not coherent.\n");
+ }// if size
+ if (spc.size()>=2)
+ {
+ if (spc[0]!=0)
+ {
+ for (i=0;i<sizeLstY; i++)
+ {
+ Out1.push_back( In1[i]/spc[1] );
+ } // for i
+ } // if spc !=0
+ } else {
+ printf("EED Warnning VectorFilterDouble::Process() For Type 12 the K1 vector (spacing) is not coherent.\n");
+ }// if size
+ if (spc.size()>=3)
+ {
+ if (spc[0]!=0)
+ {
+ for (i=0;i<sizeLstZ; i++)
+ {
+ Out2.push_back( In2[i]/spc[2] );
+ } // for i
+ } // if spc !=0
+ } else {
+ printf("EED Warnning VectorFilterDouble::Process() For Type 12 the K1 vector (spacing) is not coherent.\n");
+ }// if size
+ } // Type 12
+ if (bbGetInputType()==13) // Distance point 3D between In0 and In1
+ {
+ if ( In0.size()==3 and In1.size()==3)
+ {
+ double x = In0[0] - In1[0];
+ double y = In0[1] - In1[1];
+ double z = In0[2] - In1[2];
+ Out0.push_back( sqrt( x*x +y*y +z*z ) );
+ }
+ } // Type 13
+ if (bbGetInputType()==14) // Select segments
+ {
+ if ( (In0.size()==In1.size()) && (In0.size()==In2.size() ) )
+ {
+ if (bbGetInputk1().size()==0) // not filter , just passing all segmentes
+ {
+ Out0 = In0;
+ Out1 = In1;
+ Out2 = In2;
+ Out3 = In3;
+ } else {
+ std::vector<double> k1 =bbGetInputk1();
+ int iSeg, sizeLstIndex = In3.size();
+ int iGeneral=0;
+ int i, size;
+ for (iSeg = 0; iSeg<sizeLstIndex; iSeg++)
+ {
+ size = In3[iSeg];
+ if (std::find(k1.begin(), k1.end(),iSeg)!=k1.end() ) // checking if element exist inside
+ {
+ Out3.push_back(size);
+ for (i=0; i<size; i++)
+ {
+ Out0.push_back( In0[iGeneral] );
+ Out1.push_back( In1[iGeneral] );
+ Out2.push_back( In2[iGeneral] );
+ iGeneral++;
+ } // for i
+ } else {
+ iGeneral=iGeneral+size;
+ }
+ } // for iSeg
+ } // if k1 not empty
+ }
+ } // Type 14