]> Creatis software - bbtk.git/commitdiff
#3087 BBTK Feature New Normal - BinaryOperation Min Max option
authorEduardo DAVILA <davila@localhost.localdomain>
Mon, 10 Apr 2017 10:45:08 +0000 (12:45 +0200)
committerEduardo DAVILA <davila@localhost.localdomain>
Mon, 10 Apr 2017 10:45:08 +0000 (12:45 +0200)
kernel/appli/bbPlugPackage/bbPlugPackage.cpp
packages/vtk/src/bbvtkBinaryOperations.cxx
packages/vtk/src/bbvtkBinaryOperations.h

index bf6081451ad6b6d8844505f654b20e5884c5dc53..8ced93949321a22c41a3e11b1fbd1a412bd4ab4c 100644 (file)
@@ -41,18 +41,18 @@ int main(int argc, char **argv)
       return (int)1;
     }
 
-  std::string path(argv[1]);
+  std::string path = argv[1] ;
   #ifdef WIN32
   std::string fname = path + "\\bbtkPackage"; 
   #else
-  std::string fname = path + "/bbtkPackage"
+  std::string fname = path + "/bbtkPackage" ;
   #endif
   
-
   if ( ! Utilities::FileExists( fname ) )
     {
-      std::cout << "* ERROR : The directory '"<<path<<"' does not contain a 'bbtkPackage' file"        << std::endl;
+      std::cout << "* ERROR : The directory '"<< path <<" ' does not contain a 'bbtkPackage' file" << std::endl;
       return (int)2; 
+
     }
        
   std::ifstream f;
index 774cd19140321341105b56bc4b0751b009e563ab..f58c6ecd642af8bb16c110e4717fcb350b54d98a 100644 (file)
@@ -84,6 +84,12 @@ void BinaryOperations::Process()
                case 3:
                                ope->SetOperationToDivide();
                break;
+               case 4:
+                               ope->SetOperationToMax();
+               break;
+               case 5:
+                               ope->SetOperationToMin();
+               break;
                default:
                        std::cout << "Invalid Operation" << std::endl;
                        return;
index 9e6bd034774f0807f5a07860a6adcb814bfe350c..45602abf10c0a382b62b6bdde63a7169b4dd689b 100644 (file)
@@ -66,14 +66,14 @@ class bbvtk_EXPORT BinaryOperations
 };
 
 BBTK_BEGIN_DESCRIBE_BLACK_BOX(BinaryOperations,bbtk::AtomicBlackBox);
-BBTK_NAME("BinaryOperations");
-BBTK_AUTHOR("Info-Dev");
-BBTK_DESCRIPTION("Arithmetic operations between two images: add, substract, multiply, divide");
-BBTK_CATEGORY("filter");
-BBTK_INPUT(BinaryOperations,In1,"first image to be operated",vtkImageData*,"NULL default");
-BBTK_INPUT(BinaryOperations,In2,"second image to be operated",vtkImageData*,"NULL default");
-BBTK_INPUT(BinaryOperations,Operation,"0:Add (default) , 1:subtract, 2:multiply, 3:divide",int,"");
-BBTK_OUTPUT(BinaryOperations,Out,"",vtkImageData*,"");
+  BBTK_NAME("BinaryOperations");
+  BBTK_AUTHOR("Info-Dev");
+  BBTK_DESCRIPTION("Arithmetic operations between two images");
+  BBTK_CATEGORY("filter");
+  BBTK_INPUT(BinaryOperations,In1,"first image to be operated",vtkImageData*,"NULL default");
+  BBTK_INPUT(BinaryOperations,In2,"second image to be operated",vtkImageData*,"NULL default");
+  BBTK_INPUT(BinaryOperations,Operation,"0:Add (default) , 1:subtract, 2:multiply, 3:divide, 4=Max, 5=Min",int,"");
+  BBTK_OUTPUT(BinaryOperations,Out,"",vtkImageData*,"");
 BBTK_END_DESCRIBE_BLACK_BOX(BinaryOperations);
 }
 // EO namespace bbSimpleProcessing