]> Creatis software - creaRigidRegistration.git/commitdiff
*** empty log message ***
authortrillos <trillos>
Tue, 20 Oct 2009 08:20:00 +0000 (08:20 +0000)
committertrillos <trillos>
Tue, 20 Oct 2009 08:20:00 +0000 (08:20 +0000)
PackRecalage/bbs/appli/Recalage2D.bbs
PackRecalage/src/bbPackRecalageImageSwitcherBox.cxx
PackRecalage/src/bbPackRecalageImageSwitcherBox.h
PackRecalage/src/bbPackRecalageReSlicerBox.h
PackRecalage/src/bbPackRecalageTransform2DBox.h

index 45ba02ac7f195e8fecb257bee0e4b597494948f4..e9ffb0ecb8aed1b0ef5cda6165b4eb5c6d89a7c7 100644 (file)
@@ -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
 
index 760207d26150f7b678715bd927014edbac8c9a70..1c603f6c17b3b5cc2da47a47cd2490c4e7d5d43a 100644 (file)
@@ -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()
 {
index 364775cf2dd7c4bf4fbafe14b5934d0cc474f1c3..7bb5cdfcfc6323e9c30d8980913e56c141e1646d 100644 (file)
@@ -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);
 }
index e0f7f8e1673fbe9206057d1e577598c96c204d03..b41d3bbc5d98d2594baa3974d64e5dd1019164d2 100644 (file)
@@ -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<int>,"");
 BBTK_INPUT(ReSlicerBox,Transform,"Transform input",vtkLinearTransform *,"");
index 997ea76e11b3cd246f9421761b32b0934363c62e..6a4ea9d2014b33c53c8c559ab5604131b8f7950b 100644 (file)
@@ -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