From 056c44ebcefce5a0c1d0b5cd162a63d5805df456 Mon Sep 17 00:00:00 2001 From: trillos Date: Tue, 20 Oct 2009 08:20:00 +0000 Subject: [PATCH] *** empty log message *** --- PackRecalage/bbs/appli/Recalage2D.bbs | 2 ++ PackRecalage/src/bbPackRecalageImageSwitcherBox.cxx | 9 ++++++--- PackRecalage/src/bbPackRecalageImageSwitcherBox.h | 3 +++ PackRecalage/src/bbPackRecalageReSlicerBox.h | 6 +++--- PackRecalage/src/bbPackRecalageTransform2DBox.h | 2 +- 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/PackRecalage/bbs/appli/Recalage2D.bbs b/PackRecalage/bbs/appli/Recalage2D.bbs index 45ba02a..e9ffb0e 100644 --- a/PackRecalage/bbs/appli/Recalage2D.bbs +++ b/PackRecalage/bbs/appli/Recalage2D.bbs @@ -267,11 +267,13 @@ new LayoutSplit transparency new ImageSwitcherBox switch connect convol1.Out switch.In1 connect convol2.Out switch.In2 + set switch.On "True" new Slider sdrT set sdrT.Max "1000" set sdrT.Min "0" set sdrT.In "500" + set sdrT.ReactiveOnTrack "True" connect sdrT.Out switch.Time diff --git a/PackRecalage/src/bbPackRecalageImageSwitcherBox.cxx b/PackRecalage/src/bbPackRecalageImageSwitcherBox.cxx index 760207d..1c603f6 100644 --- a/PackRecalage/src/bbPackRecalageImageSwitcherBox.cxx +++ b/PackRecalage/src/bbPackRecalageImageSwitcherBox.cxx @@ -25,6 +25,7 @@ BBTK_BLACK_BOX_IMPLEMENTATION(ImageSwitcherBox,bbtk::WxBlackBox); void ImageSwitcherBox::Process() { time = bbGetInputTime(); + _on = bbGetInputOn(); if(myTimer == NULL) { @@ -32,13 +33,14 @@ void ImageSwitcherBox::Process() myTimer->Start(time); oldTime = time; } - else if(oldTime != time && myTimer != NULL) + + if(oldTime != time && myTimer !=NULL) { myTimer->Stop(); myTimer->Start(time); oldTime = time; } - + if(change == false) { bbSetOutputOut(bbGetInputIn1()); @@ -48,7 +50,7 @@ void ImageSwitcherBox::Process() { bbSetOutputOut(bbGetInputIn2()); change = false; - } + } } void ImageSwitcherBox::CreateWidget(wxWindow* parent) { @@ -60,6 +62,7 @@ void ImageSwitcherBox::bbUserSetDefaultValues() change = false; time = 500; oldTime = 500; + _on = false; } void ImageSwitcherBox::bbUserInitializeProcessing() { diff --git a/PackRecalage/src/bbPackRecalageImageSwitcherBox.h b/PackRecalage/src/bbPackRecalageImageSwitcherBox.h index 364775c..7bb5cdf 100644 --- a/PackRecalage/src/bbPackRecalageImageSwitcherBox.h +++ b/PackRecalage/src/bbPackRecalageImageSwitcherBox.h @@ -31,6 +31,7 @@ class bbPackRecalage_EXPORT ImageSwitcherBox BBTK_DECLARE_INPUT(In1,vtkImageData*); BBTK_DECLARE_INPUT(In2,vtkImageData*); BBTK_DECLARE_INPUT(Time,int); + BBTK_DECLARE_INPUT(On,bool); BBTK_PROCESS(Process); BBTK_DECLARE_OUTPUT(Out,vtkImageData*); void Process(); @@ -42,6 +43,7 @@ class bbPackRecalage_EXPORT ImageSwitcherBox MyTimer *myTimer; int time; int oldTime; + bool _on; }; BBTK_BEGIN_DESCRIBE_BLACK_BOX(ImageSwitcherBox,bbtk::WxBlackBox); @@ -53,6 +55,7 @@ BBTK_INPUT(ImageSwitcherBox,Title,"Title prepended to the Widget",std::string,"" BBTK_INPUT(ImageSwitcherBox,In1,"First Image",vtkImageData*,""); BBTK_INPUT(ImageSwitcherBox,In2,"Second Image",vtkImageData*,""); BBTK_INPUT(ImageSwitcherBox,Time,"Time between image change",int,""); +BBTK_INPUT(ImageSwitcherBox,On,"Timer status. True = On.",bool,""); BBTK_OUTPUT(ImageSwitcherBox,Out,"Image to be placed",vtkImageData*,""); BBTK_END_DESCRIBE_BLACK_BOX(ImageSwitcherBox); } diff --git a/PackRecalage/src/bbPackRecalageReSlicerBox.h b/PackRecalage/src/bbPackRecalageReSlicerBox.h index e0f7f8e..b41d3bb 100644 --- a/PackRecalage/src/bbPackRecalageReSlicerBox.h +++ b/PackRecalage/src/bbPackRecalageReSlicerBox.h @@ -35,9 +35,9 @@ class bbPackRecalage_EXPORT ReSlicerBox BBTK_BEGIN_DESCRIBE_BLACK_BOX(ReSlicerBox,bbtk::AtomicBlackBox); BBTK_NAME("ReSlicerBox"); -BBTK_AUTHOR("_authors_"); -BBTK_DESCRIPTION("_description_"); -BBTK_CATEGORY("__CATEGORY__"); +BBTK_AUTHOR("davila@creatis.insa-lyon.com"); +BBTK_DESCRIPTION("Uses the vtk ReSlicer tool to modify an input image given a transformation filter."); +BBTK_CATEGORY("filter"); BBTK_INPUT(ReSlicerBox,In,"Image input",vtkImageData *,""); BBTK_INPUT(ReSlicerBox,Origin,"Image Origin(x,y,z)",std::vector,""); BBTK_INPUT(ReSlicerBox,Transform,"Transform input",vtkLinearTransform *,""); diff --git a/PackRecalage/src/bbPackRecalageTransform2DBox.h b/PackRecalage/src/bbPackRecalageTransform2DBox.h index 997ea76..6a4ea9d 100644 --- a/PackRecalage/src/bbPackRecalageTransform2DBox.h +++ b/PackRecalage/src/bbPackRecalageTransform2DBox.h @@ -53,7 +53,7 @@ BBTK_INPUT(Transform2DBox,Angle,"Rotation Angle",double,""); BBTK_INPUT(Transform2DBox,ScaleX,"Scale in X",double,""); BBTK_INPUT(Transform2DBox,ScaleY,"Scale in Y",double,""); BBTK_INPUT(Transform2DBox,ScaleZ,"Scale in Z",double,""); -BBTK_OUTPUT(Transform2DBox,Out,"First output",vtkLinearTransform*,""); +BBTK_OUTPUT(Transform2DBox,Out,"vtk Transform filter ",vtkLinearTransform*,""); BBTK_END_DESCRIBE_BLACK_BOX(Transform2DBox); } // EO namespace bbPackRecalage -- 2.47.1