From: Eduardo Davila Date: Thu, 26 Jul 2012 08:28:29 +0000 (+0000) Subject: BUG 1546 Temporary Picker Sync X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=e7388f3073fa5eb9e35dafa8fbdf9e72ef6afd57;p=bbtk.git BUG 1546 Temporary Picker Sync FEAUTURE 1544 BoxProcessMode new mode Manual FEAUTURE new version v0_9_7 --- diff --git a/kernel/cmake/BBTKVersion.cmake b/kernel/cmake/BBTKVersion.cmake index da59a82..29a5a93 100644 --- a/kernel/cmake/BBTKVersion.cmake +++ b/kernel/cmake/BBTKVersion.cmake @@ -3,7 +3,7 @@ SET(BBTK_VERSION_DATE "19/03/2010") SET(BBTK_MAJOR_VERSION 0) SET(BBTK_MINOR_VERSION 9) -SET(BBTK_BUILD_VERSION 6) +SET(BBTK_BUILD_VERSION 7) SET(BBTK_VERSION "${BBTK_MAJOR_VERSION}.${BBTK_MINOR_VERSION}.${BBTK_BUILD_VERSION}") # Now in bbtkConfigure.h file (cf. core/src) diff --git a/kernel/src/bbtkAtomicBlackBoxDescriptor.cxx b/kernel/src/bbtkAtomicBlackBoxDescriptor.cxx index d1bb205..e31cca4 100644 --- a/kernel/src/bbtkAtomicBlackBoxDescriptor.cxx +++ b/kernel/src/bbtkAtomicBlackBoxDescriptor.cxx @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbtkAtomicBlackBoxDescriptor.cxx,v $ Language: C++ - Date: $Date: 2009/05/28 08:12:05 $ - Version: $Revision: 1.4 $ + Date: $Date: 2012/07/26 08:28:31 $ + Version: $Revision: 1.5 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -47,7 +47,7 @@ namespace bbtk bbtk::AtomicBlackBoxInputDescriptor (typeid(AtomicBlackBoxDescriptor), "BoxProcessMode", - "Sets the processing mode of the box (Pipeline | Always | Reactive)", + "Sets the processing mode of the box (Pipeline | Always | Reactive | Manual)", "", new bbtk::AtomicBlackBoxTGetFunctor(&BlackBox::bbGetInputBoxProcessMode), new bbtk::AtomicBlackBoxTSetFunctor(&BlackBox::bbSetInputBoxProcessMode) ) ); diff --git a/kernel/src/bbtkBlackBox.cxx b/kernel/src/bbtkBlackBox.cxx index dfdf6e5..a249bfc 100644 --- a/kernel/src/bbtkBlackBox.cxx +++ b/kernel/src/bbtkBlackBox.cxx @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbtkBlackBox.cxx,v $ Language: C++ - Date: $Date: 2011/07/22 17:42:50 $ - Version: $Revision: 1.54 $ + Date: $Date: 2012/07/26 08:28:31 $ + Version: $Revision: 1.55 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -109,6 +109,7 @@ namespace bbtk bbmExecuting(false), bbmName(name), bbmBoxProcessMode("Pipeline"), + bbLetRecursiveExecuteManualMode(false), bbmParent() { @@ -135,6 +136,7 @@ namespace bbtk bbmExecuting(false), bbmName(name), bbmBoxProcessMode(from.bbmBoxProcessMode), + bbLetRecursiveExecuteManualMode(false), bbmParent() { @@ -378,13 +380,19 @@ namespace bbtk (p == "F") || (p == "f") || (p == "Flash") || (p == "flash") ) return Flash; */ - bbtkError(bbGetFullName()<<" : BoxProcessMode value '"<

bbCreateWindow(); // Updates its inputs - IOStatus s = bbUpdateInputs(); - - if ( (s != UPTODATE) || - bbBoxProcessModeIsAlways() ) + +// IOStatus s; + IOStatus s=UPTODATE; +// IOStatus s=OUTOFDATE; +// IOStatus s=MODIFIED; + + + if ( ( bbBoxProcessModeIsManual()==false ) || + ( (bbBoxProcessModeIsManual()==true) && (bbLetRecursiveExecuteManualMode==true) ) ) + { + s = bbUpdateInputs(); + } + + if ( (s != UPTODATE) || bbBoxProcessModeIsAlways() ) { // Displays the window (WxBlackbox) // bbShowWindow(caller); // Actual processing (virtual) - this->bbProcess(); - - - // Update the I/O statuses - bbComputePostProcessStatus(); + if ( ( bbBoxProcessModeIsManual()==false ) || + ( (bbBoxProcessModeIsManual()==true)&&(bbLetRecursiveExecuteManualMode==true) ) + ) + { + this->bbProcess(); + } // Manual analysis + +//EED ups if ((bbBoxProcessModeIsManual()==true) && (bbLetRecursiveExecuteManualMode==false)) +//EED ups { +//EED ups bbSignalOutputModification(true); +//EED ups } + + + // Update the I/O statuses + bbComputePostProcessStatus(); } else { @@ -809,7 +856,19 @@ namespace bbtk for ( o = bbGetOutputConnectorMap().begin(); o!= bbGetOutputConnectorMap().end(); ++o) { - o->second->SetStatus(new_output_status); + +//EED if ( ( bbBoxProcessModeIsManual()==false ) || +//EED ( (bbBoxProcessModeIsManual()==true) && (bbLetRecursiveExecuteManualMode==true) ) +//EED ) +//EED { + o->second->SetStatus(new_output_status); +//EED } else { +//EED if (( (bbBoxProcessModeIsManual()==true) && (bbLetRecursiveExecuteManualMode==false) ) ) +//EED { +//EED o->second->SetStatus(UPTODATE); +//EED } +//EED } // Manual analysis + } bbtkBlackBoxDebugMessage("process",4, diff --git a/kernel/src/bbtkBlackBox.h b/kernel/src/bbtkBlackBox.h index 939b5f8..8fd1c2e 100644 --- a/kernel/src/bbtkBlackBox.h +++ b/kernel/src/bbtkBlackBox.h @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbtkBlackBox.h,v $ Language: C++ - Date: $Date: 2011/03/03 14:33:13 $ - Version: $Revision: 1.32 $ + Date: $Date: 2012/07/26 08:28:31 $ + Version: $Revision: 1.33 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -298,7 +298,8 @@ namespace bbtk { bbPipeline, bbAlways, - bbReactive + bbReactive, + bbManual } BoxProcessModeValue; @@ -308,16 +309,18 @@ namespace bbtk virtual bool bbBoxProcessModeIsReactive() const; /// Returns true iff the input 'BoxProcessMode' is set to 'Always' (or a synonym) virtual bool bbBoxProcessModeIsAlways() const; + /// Returns true iff the input 'BoxProcessMode' is set to 'Manual' (or a synonym) + virtual bool bbBoxProcessModeIsManual() const; /// Returns the value of the input 'BoxExecute' Void bbGetInputBoxExecute() { return Void(); } /// Sets the value of the input 'BoxExecute' - void bbSetInputBoxExecute(Void = 0) {} + void bbSetInputBoxExecute(Void = 0) { } /// Returns the value of the output 'BoxChange' Void bbGetOutputBoxChange() { return Void(); } /// Sets the value of the output 'BoxChange' - void bbSetOutputBoxChange(Void = 0) { } + void bbSetOutputBoxChange(Void = 0) { } //@} //================================================================== @@ -642,6 +645,7 @@ namespace bbtk /// 0 : "Pipeline" mode /// 1 : "Always" mode /// 2 : "Reactive" mode + /// 3 : "Manual" mode std::string bbmBoxProcessMode; /// The parent of the black box in the ComplexBlackBox hierarchy BlackBox::WeakPointer bbmParent; @@ -655,6 +659,9 @@ namespace bbtk /// Map that contains the input connectors of the black box InputConnectorMapType mInputConnectorMap; //================================================================== + + + bool bbLetRecursiveExecuteManualMode; }; // Class BlackBox diff --git a/packages/vtk/src/bbvtkTemporalPicker.cxx b/packages/vtk/src/bbvtkTemporalPicker.cxx index a5af484..933e2b2 100644 --- a/packages/vtk/src/bbvtkTemporalPicker.cxx +++ b/packages/vtk/src/bbvtkTemporalPicker.cxx @@ -40,7 +40,9 @@ void TemporalPicker::Process() if (bbGetInputPoint().size()>=2) { int px=bbGetInputPoint()[0]; - int py=bbGetInputPoint()[1]; + int py=bbGetInputPoint()[1]; + int pz=bbGetInputPoint()[2]; + if ((px>=0) && (px=0) && (py