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
void ImageSwitcherBox::Process()
{
time = bbGetInputTime();
+ _on = bbGetInputOn();
if(myTimer == NULL)
{
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());
{
bbSetOutputOut(bbGetInputIn2());
change = false;
- }
+ }
}
void ImageSwitcherBox::CreateWidget(wxWindow* parent)
{
change = false;
time = 500;
oldTime = 500;
+ _on = false;
}
void ImageSwitcherBox::bbUserInitializeProcessing()
{
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();
MyTimer *myTimer;
int time;
int oldTime;
+ bool _on;
};
BBTK_BEGIN_DESCRIBE_BLACK_BOX(ImageSwitcherBox,bbtk::WxBlackBox);
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);
}
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 *,"");
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