]> Creatis software - bbtk.git/commitdiff
#3534 VectorFilterDouble type 8 , k element to be order
authoreduardo.davila@creatis.insa-lyon.fr <eduardo.davila@creatis.insa-lyon.fr>
Mon, 14 Apr 2025 08:21:19 +0000 (10:21 +0200)
committereduardo.davila@creatis.insa-lyon.fr <eduardo.davila@creatis.insa-lyon.fr>
Mon, 14 Apr 2025 08:21:19 +0000 (10:21 +0200)
kernel/src/bbtkAny.h
packages/std/src/bbstdVectorFilterDouble.cxx
packages/std/src/bbstdVectorFilterDouble.h

index 9f161c97f08842ef35765a38323c2988d455fc06..4999fb8413b71214e6c7715abe951c96bdc410c5 100644 (file)
 
 namespace bbtk 
 {
-
-
-
-
-
   //=========================================================
   /// Abstract class used by the any class to store values
   class anyplaceholder
index ff85b0b8550231993d0d791317d0f571ce96e4e0..3d467ca3641ec31f3e5860dded5fdeb6a5ac42f5 100644 (file)
@@ -250,8 +250,10 @@ void VectorFilterDouble::Process()
                        Out2[j]=In2[iBack]; 
                } // for i
        }       // Type 7
-       if (bbGetInputType()==8)   // order all vectors using as base the vector In0
+       if (bbGetInputType()==8)   // order all vectors using as base the vector InK
        {
+        int k=0;
+        if (bbGetInputk1().size()==1) k=bbGetInputk1()[0];
                double tmp;
                int i,j,ii,sizeII;
                sizeII=pLstVec.size();
@@ -267,7 +269,7 @@ void VectorFilterDouble::Process()
                {
                        for (j=i;j<size;j++)
                        {
-                               if ((*pLstVecOut[0])[j] <= (*pLstVecOut[0])[i] ) 
+                               if ((*pLstVecOut[k])[j] <= (*pLstVecOut[k])[i] )    ///  <<<  k element to be order
                                {
                                        for (ii=0;ii<sizeII;ii++)
                                        {
index a5a3747815e07991ac192ce407c7d31226300cc4..9595be2df346050be5b318134386d422ea5a1dd8 100644 (file)
@@ -53,7 +53,7 @@ BBTK_BEGIN_DESCRIBE_BLACK_BOX(VectorFilterDouble,bbtk::AtomicBlackBox);
   BBTK_DESCRIPTION("No Description.");
   BBTK_CATEGORY("empty");
   BBTK_INPUT(VectorFilterDouble,Type,"default (0)  0=Erase duplicated lines, 1=Redimention Vectors, 2=Insert intermediat points,3=Adition k1, 4=Substraction k1, 5=Multilication k1, 6=Division k1, 7=Connect mesh X1,Y1,Z1,idxs1,X2,X2,X2,idx2, 8=Order All vectors with the logic of In0 , 9=Invert Vectors, 10=Nearest Point in the vector. In3PointXYZ In0LstX In1LstY In2LstZ  (Out0-index Out1-PointXYZ), 11=Mul Spacing (K1[spcX,spcY,spcZ]=Spacing), 12=Div Spacing (K1[spcX,spcY,spcZ]=Spacing), 13=Distance pointIn0 and pontIn1,  14=Select specific segments [k1] in In0=lstPx In1=lstPy In2=lstPz In3=lstIndex (if k1 empty all segments are selected) , 15 swhitch element in a point k1=0 yz, k1=1 nothing k1=2 xz , 16 switch In0 and In1 (k1=1 nothing k0 swhich)",int,"");
-  BBTK_INPUT(VectorFilterDouble,k1,"(default [0])  nothing (Type0), k1[0]=new size vectors (Type 1) , nothing (Type2), k1[0] = Addition const. (Type 3), k1[0] = Substraction const. (Type 4), k1[0] = Multiplication const. (Type 5) , k1[0] = Division const. (Type 6)  , k1[spcX,spcY,spcZ] MulSpc In0_X,In1_Y,In2_Z (type 11),  k1[spcX,spcY,spcZ] DivSpc In0_X,In1_Y,In2_Z (type 12) , k1[segment1, segment2,..] (type 14) , direction (type 15), direction (type 16) ",std::vector<double>,"");
+  BBTK_INPUT(VectorFilterDouble,k1,"(default [0])  nothing (Type0), k1[0]=new size vectors (Type 1) , nothing (Type2), k1[0] = Addition const. (Type 3), k1[0] = Substraction const. (Type 4), k1[0] = Multiplication const. (Type 5) , k1[0] = Division const. (Type 6),  k1[0] In0..9 element base to be order (Type 8)  , k1[spcX,spcY,spcZ] MulSpc In0_X,In1_Y,In2_Z (type 11),  k1[spcX,spcY,spcZ] DivSpc In0_X,In1_Y,In2_Z (type 12) , k1[segment1, segment2,..] (type 14) , direction (type 15), direction (type 16) ",std::vector<double>,"");
   BBTK_INPUT(VectorFilterDouble,In0,"Input vector",std::vector<double>,"");
   BBTK_INPUT(VectorFilterDouble,In1,"Input vector",std::vector<double>,"");
   BBTK_INPUT(VectorFilterDouble,In2,"Input vector",std::vector<double>,"");