X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=bbtk_creaVtk_PKG%2Fsrc%2FbbcreaVtkPlaneWidget.cxx;h=91de0a69b588b68b6c2c4bf8d7f404a23116700a;hb=6b5dabc10fd9780f19f7ce0ee287a9f8d9a09267;hp=071fd0284450f943fb44c04e640dfdb8b2e4e0d2;hpb=755e53bc4442c6486fafda0e51395f87624ee2b2;p=creaVtk.git diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkPlaneWidget.cxx b/bbtk_creaVtk_PKG/src/bbcreaVtkPlaneWidget.cxx index 071fd02..91de0a6 100644 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkPlaneWidget.cxx +++ b/bbtk_creaVtk_PKG/src/bbcreaVtkPlaneWidget.cxx @@ -10,11 +10,13 @@ namespace bbcreaVtk void boxcreaVtkPlaneWidget::Execute() // virutal { - printf("EED bbcreaVtkPlaneWidget::Execute (virtual) start \n"); - box->bbSetOutputOut( box->_boxcreavtkplanewidget.GetPlaneSource()->GetOutput() ); - printf("EED bbcreaVtkPlaneWidget::Execute (virtual) start 1\n"); + box->bbSetOutputOut( box->_boxcreavtkplanewidget.GetPlaneSource()->GetOutput() ); box->bbSignalOutputModification(std::string("Out")); - printf("EED bbcreaVtkPlaneWidget::Execute (virtual) end \n"); + box->bbSetOutputCenter( box->_boxcreavtkplanewidget.GetCenter() ); + box->bbSignalOutputModification(std::string("Center")); + box->bbSetOutputNormal( box->_boxcreavtkplanewidget.GetNormal() ); + box->bbSignalOutputModification(std::string("Normal")); + } //---------------------------------------------------------------------------------------------- @@ -42,14 +44,23 @@ void PlaneWidget::Process() // * TYPE is the C++ type of the input/output // (the one provided in the attribute 'type' of the tag 'input') - _boxcreavtkplanewidget.SetActive( bbGetInputActive() ); - _boxcreavtkplanewidget.SetImage( bbGetInputIn() ); - _boxcreavtkplanewidget.SetResolution( bbGetInputResolution() ); - _boxcreavtkplanewidget.SetRenderer( bbGetInputRenderer() ); - _boxcreavtkplanewidget.Process(); - bbSetOutputOut( _boxcreavtkplanewidget.GetPlaneSource()->GetOutput() ); - bbSetOutputCenter( _boxcreavtkplanewidget.GetCenter() ); - bbSetOutputCenter( _boxcreavtkplanewidget.GetNormal() ); + if ((bbGetInputIn()==NULL) || (bbGetInputRenderer()==NULL)) + { + bbSetOutputOut( NULL ); + std::vector center; + std::vector normal; + bbSetOutputCenter( center ); + bbSetOutputNormal( normal ); + } else { + _boxcreavtkplanewidget.SetActive( bbGetInputActive() ); + _boxcreavtkplanewidget.SetImage( bbGetInputIn() ); + _boxcreavtkplanewidget.SetResolution( bbGetInputResolution() ); + _boxcreavtkplanewidget.SetRenderer( bbGetInputRenderer() ); + _boxcreavtkplanewidget.Process(); + bbSetOutputOut( _boxcreavtkplanewidget.GetPlaneSource()->GetOutput() ); + bbSetOutputCenter( _boxcreavtkplanewidget.GetCenter() ); + bbSetOutputNormal( _boxcreavtkplanewidget.GetNormal() ); + } } //===== // 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)