-
-
-
- switch (bbGetInputOperation())
- {
- case 0:
- ope->SetOperationToAdd();
- break;
- case 1:
- ope->SetOperationToSubtract();
-
- break;
- case 2:
- ope->SetOperationToMultiply();
- break;
- case 3:
- ope->SetOperationToDivide();
- break;
- default:
- std::cout << "Invalid Operation" << std::endl;
- return;
- break;
- }
-
- ope->Modified();
- ope->Update();
- vtkImageData* salida = ope->GetOutput();
-
- bbSetOutputOut(salida);
- bbSignalOutputModification();
-
+
+ if ( (bbGetInputOperation()>=0) && (bbGetInputOperation()<=5) )
+ {
+ switch (bbGetInputOperation())
+ {
+ case 0:
+ ope->SetOperationToAdd();
+ break;
+ case 1:
+ ope->SetOperationToSubtract();
+ break;
+ case 2:
+ ope->SetOperationToMultiply();
+ break;
+ case 3:
+ ope->SetOperationToDivide();
+ break;
+ case 4:
+ ope->SetOperationToMax();
+ break;
+ case 5:
+ ope->SetOperationToMin();
+ break;
+ default:
+ std::cout << "Invalid Operation" << std::endl;
+ return;
+ break;
+ }
+ ope->Modified();
+ ope->Update();
+ bbSetOutputOut( ope->GetOutput() );
+ } // if operation 0..5
+
+ if ( bbGetInputOperation()==6 )
+ {
+ bbSetOutputOut( bbGetInputIn1() );
+ }
+ if ( bbGetInputOperation()==7 )
+ {
+ bbSetOutputOut( bbGetInputIn2() );
+ }
+
+// bbSignalOutputModification();