X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=bbtk_creaVtk_PKG%2Fsrc%2FbbcreaVtkImageThresholdConnectivity.cxx;h=25b85a633fb7aafeb8f6aa8c2dc494428a2b8492;hb=f45c0d3794c0df6b6757bd560f1d3281712187f1;hp=a7ddb49608e71098de98f90c15ea79e3b94cbb09;hpb=f42abb6e844c616090c52099c000ff4ed8062b25;p=creaVtk.git diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkImageThresholdConnectivity.cxx b/bbtk_creaVtk_PKG/src/bbcreaVtkImageThresholdConnectivity.cxx index a7ddb49..25b85a6 100644 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkImageThresholdConnectivity.cxx +++ b/bbtk_creaVtk_PKG/src/bbcreaVtkImageThresholdConnectivity.cxx @@ -74,7 +74,13 @@ void ImageThresholdConnectivity::Process() } // for i filter->SetSeedPoints( points ); filter->SetInputData( bbGetInputIn() ); - filter->ThresholdBetween(10, 100); + if (bbGetInputThreshold().size()==2) + { + filter->ThresholdBetween( bbGetInputThreshold()[0] , bbGetInputThreshold()[1] ); + } else { + filter->ThresholdBetween( 0, 100 ); + }// if Thershold size + // filter->SetNeighborhoodRadius (4, 4, 4 ); filter->SetInValue(255); filter->SetOutValue(0); @@ -85,7 +91,9 @@ void ImageThresholdConnectivity::Process() filter->SetSliceRangeZ(minZ-border,maxZ+border); filter->Update(); bbSetOutputOut( filter->GetOutput() ); - } // if lst + } else { + bbSetOutputOut( NULL ); + }// if lst } //===== // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) @@ -125,6 +133,69 @@ void ImageThresholdConnectivity::bbUserFinalizeProcessing() // if any } + +//========================================================================= +void ImageThresholdConnectivity::bbSetStatusAndPropagate(BlackBoxInputConnector* c, IOStatus s) +{ + bbtkBlackBoxDebugMessage("change",5, + "=> BlackBox::bbSetStatusAndPropagate(input," + <SetStatus(s); + + // Flash reaction + /* + if (bbGetBoxProcessModeValue() == Flash) + { + this->bbExecute(); + } + */ + + + OutputConnectorMapType::const_iterator o; + for ( o = bbGetOutputConnectorMap().begin(); + o != bbGetOutputConnectorMap().end(); ++o ) + { + + + if (o->first=="BoxChange") + { + o->second->SetStatus(UPTODATE); + } + + + +//EED 24/08/2015 +// EED CASPITAS 2 + if (o->second->GetStatus()==UPTODATE) +// if ((o->second->GetStatus()==UPTODATE) || (o->second->GetStatus()==OUTOFDATE)) +// if ((o->second->GetStatus()==UPTODATE) || (o->second->GetStatus()==MODIFIED)) + { + o->second->SetStatus(OUTOFDATE); + o->second->SignalChange(GetThisPointer(),o->first); + } // if + } // for + + + if ( ( bbBoxProcessModeIsReactive() + || (c==bbGetInputConnectorMap().find("BoxExecute")->second)) + && (bbCanReact() ) ) + { + bbtkBlackBoxDebugMessage("change",2, + "-> Execution triggered by Reactive mode or BoxExecute input change"<() ); + } // if + bbtkBlackBoxDebugMessage("change",5, + "<= BlackBox::bbSetStatusAndPropagate(input)" + <