]> Creatis software - bbtk.git/commitdiff
#3546 Update VectorFilterDouble vtk9itk5wx3-macos
authoreduardo.davila@creatis.insa-lyon.fr <eduardo.davila@creatis.insa-lyon.fr>
Tue, 21 Apr 2026 08:28:01 +0000 (10:28 +0200)
committereduardo.davila@creatis.insa-lyon.fr <eduardo.davila@creatis.insa-lyon.fr>
Tue, 21 Apr 2026 08:28:01 +0000 (10:28 +0200)
kernel/src/bbtkBlackBox.cxx
packages/itk/src/bbitkImageReader.h
packages/itk/src/bbitkImageWriter.cxx
packages/std/src/bbstdVectorFilterDouble.cxx
packages/std/src/bbstdVectorFilterDouble.h

index b74d65a4808f110c3bffd83076278d903d260ae5..2b82947966ecdcf4006301991cec0cb3a724a165 100644 (file)
@@ -101,7 +101,6 @@ namespace bbtk
     std::string name = p->GetObjectName();//b->bbGetNameWithParent();
     bbtkDebugMessage("object",2,"##> BlackBox::Deleter(\""<<name<<"\")"<<std::endl);
 
-
     BlackBoxDescriptor::WeakPointer desc = b->bbGetDescriptor();
     bbtkDebugMessage("object",2,"##> BlackBox::Deleter(\""<<name<<"\") : deleting black box"<<std::endl);
     
index 97030bd186a7c40c0ce9e6a0c6418111504ffcfb..b3c6aaf28ec77714b6f7895bdacdb5de8500b365 100644 (file)
@@ -80,7 +80,7 @@ namespace bbitk
   BBTK_CATEGORY("image; read/write");
   BBTK_DESCRIPTION("Generic itk image reader");
   BBTK_INPUT(ImageReader, In,
-            "filename with complete path", std::string,"file name");
+            "filename with complete path  Format:BMP,DICOM,JPEG,MHA,MHD,NIFTI,Nrrd,PNG,SLC,TIF,Ultrasonix", std::string,"file name");
   BBTK_OUTPUT(ImageReader, Out, "Output image" ,anyImagePointer,"");
   BBTK_END_DESCRIBE_BLACK_BOX(ImageReader);
   //=================================================================
index dba1bc0fe1833062db4ad94e494fdd23dd32baf3..ee473e208ca9925c2896bca7eb67bbf5a38b6431 100644 (file)
@@ -71,8 +71,6 @@ namespace bbitk
     BBTK_TEMPLATE_ITK_IMAGE_SWITCH(bbGetInputIn().type(),Write);
   }
 
-
-
   /** 
       Template Processing 
   */
@@ -103,12 +101,6 @@ namespace bbitk
     bbtkDebugDecTab("Core",9);
   }
 
-
-
-
-
-
-}
-// eo namespace bbtk
+}// eo namespace bbtk
 
 #endif
index fa8485269a22f31e7c101dbd08ec35316d545c80..1c84de1a80d47bd841678abff2aaf3d1fa69e598 100644 (file)
@@ -519,7 +519,7 @@ void VectorFilterDouble::Process()
             } // if k1 not empty
         }
      } // Type 14
-    if (bbGetInputType()==15)   // 15 swhitch element in a point k1=0 yz, k1=1 nothing k2=2 xz
+    if (bbGetInputType()==15)   // 15 swhitch element in a point k1=0 xyz->xzy, k1=1 nothing xyz->xyz, k1=2 xyz->yzx
     {
         double x,y,z;
         double xx,yy,zz;
@@ -537,8 +537,8 @@ void VectorFilterDouble::Process()
                 Out0.push_back( In0[2] );  // z
             }
             if (k1[0]==2) {
-                Out0.push_back( In0[2] );  // z
-                Out0.push_back( In0[1] );  // y
+                Out0.push_back( In0[2] );  // y
+                Out0.push_back( In0[1] );  // z
                 Out0.push_back( In0[0] );  // x
             }
         } // if In0.size   and  k1.size
@@ -561,6 +561,19 @@ void VectorFilterDouble::Process()
         } // if size k1 == 1
     } // if Type 16
     
+    if (bbGetInputType()==17)   // 17 new order verctor  use k1
+    {
+        int i,size=bbGetInputk1().size();
+        for (i=0;i<size;i++)
+        {
+            if ( bbGetInputk1()[i] < pLstVec.size() )
+            {
+                (*pLstVecOut[i]) =  (*pLstVec[  (int)(bbGetInputk1()[i])    ]);
+            } // if
+        } // for i
+    } // if Type 17
+    
+
     
        bbSetOutputOut0( Out0 );
        bbSetOutputOut1( Out1 );
index ace9b2c27b4092a3d07b0441e0d5ba5e448d35ad..25bd78518ba790894ebe570b7606b32d6baaeb7c 100644 (file)
@@ -52,8 +52,8 @@ BBTK_BEGIN_DESCRIBE_BLACK_BOX(VectorFilterDouble,bbtk::AtomicBlackBox);
   BBTK_AUTHOR("InfoDev");
   BBTK_DESCRIPTION("No Description.");
   BBTK_CATEGORY("empty");
-  BBTK_INPUT(VectorFilterDouble,Type,"default (0) -1=Erase line if In0==k1,  0=Erase consecutive 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 (or the index k1 if exist) , 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=0 nothing, k1=1 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[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,Type,"default (0) -1=Erase line if In0==k1,  0=Erase consecutive 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 (or the index k1 if exist) , 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 xyz->xzy, k1=1 nothing xyz->xyz, k1=2 xyz->yzx , 16 switch In0 and In1 (k1=0 nothing, k1=1 swhich), 17 new order of out vectors k1[newIndex, newIndex, newIndex]",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[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), new index order for the output (type 17)",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>,"");