-
-// THE MAIN PROCESSING METHOD BODY
-// Here we simply set the input 'In' value to the output 'Out'
-// And print out the output value
-// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
-// void bbSet{Input|Output}NAME(const TYPE&)
-// const TYPE& bbGet{Input|Output}NAME() const
-// Where :
-// * NAME is the name of the input/output
-// (the one provided in the attribute 'name' of the tag 'input')
-// * TYPE is the C++ type of the input/output
-// (the one provided in the attribute 'type' of the tag 'input')
-// bbSetOutputOut( bbGetInputIn() );
-// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
-
-
- if ( bbGetInputRenderer()!=NULL )
- {
- if (firsttime==true)
- {
- firsttime = false;
- boxWidget = vtkBoxWidget::New();
- planes = vtkPlanes::New();
- boxWidget->SetInteractor( bbGetInputRenderer()->GetRenderWindow()->GetInteractor() );
- boxWidget->SetPlaceFactor(1.25);
- if (bbGetInputImageInitSize()!=NULL)
- {
- int ext[6];
- bbGetInputImageInitSize()->GetExtent( ext );
- double spc[3];
- bbGetInputImageInitSize()->GetSpacing( spc );
- boxWidget->PlaceWidget( ext[0]*spc[0] , ext[1]*spc[0] , ext[2]*spc[1] , ext[3]*spc[1] , ext[4]*spc[2] , ext[5]*spc[2] );
- } else {
- boxWidget->PlaceWidget(0,500,0,500,0,500);
- }// if ImageInitSize
- boxWidget->GetPlanes( planes );
- } // if firsttime
-
- // boxWidget->SetProp3D(coneActor);
- bbBoxWidgetCallback *callback = bbBoxWidgetCallback::New();
- callback->SetBox( this );
- boxWidget->AddObserver(vtkCommand::InteractionEvent, callback);
-
- if (bbGetInputActive()==true)
- {
- boxWidget->On();
- } else {
- boxWidget->Off();
- } // if Active
- bbSetOutputImplicitFunction( planes );
- } else {
- printf("EED Warnning! BoxWidget::Process vtkRenderer not set.\n");
- }// vtkRenderer != NULL
-
+
+ // THE MAIN PROCESSING METHOD BODY
+ // Here we simply set the input 'In' value to the output 'Out'
+ // And print out the output value
+ // INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+ // void bbSet{Input|Output}NAME(const TYPE&)
+ // const TYPE& bbGet{Input|Output}NAME() const
+ // Where :
+ // * NAME is the name of the input/output
+ // (the one provided in the attribute 'name' of the tag 'input')
+ // * TYPE is the C++ type of the input/output
+ // (the one provided in the attribute 'type' of the tag 'input')
+ // bbSetOutputOut( bbGetInputIn() );
+ // std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
+ if ( bbGetInputRenderer()!=NULL )
+ {
+ if (firsttime==true)
+ {
+ firsttime = false;
+ boxWidget = vtkBoxWidget::New();
+ planes = vtkPlanes::New();
+ transformOut= vtkTransform::New();
+ boxWidget->SetInteractor( bbGetInputRenderer()->GetRenderWindow()->GetInteractor() );
+ SetTransform( bbGetInputTransformIn() );
+ } // if firsttime
+
+ // boxWidget->SetProp3D(coneActor);
+ bbBoxWidgetCallback *callback = bbBoxWidgetCallback::New();
+ callback->SetBox( this );
+ boxWidget->AddObserver(vtkCommand::InteractionEvent, callback);
+
+ if (bbGetInputActive()==true)
+ {
+ boxWidget->On();
+ } else {
+ boxWidget->Off();
+ } // if Active
+ bbSetOutputImplicitFunction( planes );
+ boxWidget->GetTransform(transformOut);
+ bbSetOutputTransformOut( transformOut );
+ } else {
+ printf("EED Warnning! BoxWidget::Process vtkRenderer not set.\n");
+ }// vtkRenderer != NULL
+
+ bbSetOutputBox_BoxWidget( this );
+
+ printf("EED BoxWidget::Process A\n");
+
+