From: davila Date: Thu, 13 Mar 2014 13:03:34 +0000 (+0100) Subject: 2338 BBTK Bug New Normal UnaryOperation error divide / multiply X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=afce2a3d72f559d0d8c58f54bc9425f2aebf457f;p=bbtk.git 2338 BBTK Bug New Normal UnaryOperation error divide / multiply --- diff --git a/packages/vtk/src/bbvtkUnaryOperations.cxx b/packages/vtk/src/bbvtkUnaryOperations.cxx index dd9b65a..d6e9601 100644 --- a/packages/vtk/src/bbvtkUnaryOperations.cxx +++ b/packages/vtk/src/bbvtkUnaryOperations.cxx @@ -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