]> Creatis software - bbtk.git/commitdiff
2338 BBTK Bug New Normal UnaryOperation error divide / multiply
authordavila <eduardo.davila@creatis.insa-lyon.fr>
Thu, 13 Mar 2014 13:03:34 +0000 (14:03 +0100)
committerdavila <eduardo.davila@creatis.insa-lyon.fr>
Thu, 13 Mar 2014 13:03:34 +0000 (14:03 +0100)
packages/vtk/src/bbvtkUnaryOperations.cxx

index dd9b65a8c6a6d2210179a918b4721c65b75ecfa7..d6e9601c05da59b1e3be59d05038b014489bb002 100644 (file)
@@ -57,8 +57,8 @@ void UnaryOperations::Process()
        ope->SetInput1((vtkDataObject*)bbGetInputIn1());
 
 
-       ope->SetConstantK(bbGetInputInConstant());
-       ope->SetConstantC(bbGetInputInConstant());
+       ope->SetConstantK( bbGetInputInConstant() );
+//     ope->SetConstantC(bbGetInputInConstant());
 
        switch (bbGetInputOperation())
        {
@@ -67,25 +67,22 @@ void UnaryOperations::Process()
 
                break;
                case 1:
-//EED Borrame                          crearPredeterminado();
-                               ope->SetInput2((vtkDataSet*) constante);
-                               ope->SetOperationToSubtract();
+                               ope->SetConstantK( -1.0 * bbGetInputInConstant() );
+                               ope->SetOperationToAddConstant();
                break;
                case 2:
-                ope->SetInput2((vtkDataSet*) constante);
-                               ope->SetOperationToMultiply();
+                               ope->SetOperationToMultiplyByK();
+printf("EED UnaryOperations::Process()  2 \n");
 
                break;
                case 3:
-
-                               ope->SetOperationToDivide();
+                               ope->SetConstantK( 1.0/bbGetInputInConstant() );
+                               ope->SetOperationToMultiplyByK();
+printf("EED UnaryOperations::Process()  3 \n");
                break;
                case 4:
                         ope->SetOperationToInvert();
                break;
-               case 9:
-                        ope->SetOperationToAbsoluteValue();
-               break;
                case 5:
 
                                ope->SetOperationToSin();
@@ -103,6 +100,9 @@ void UnaryOperations::Process()
 
                                ope->SetOperationToLog();
                break;
+               case 9:
+                        ope->SetOperationToAbsoluteValue();
+               break;
 
                        
 /* EED 21Juin 2011 Borrame