]> Creatis software - creaVtk.git/blobdiff - bbtk_creaVtk_PKG/src/bbcreaVtkPlaneWidget.cxx
#3477 Set Normal in PlaneWidget
[creaVtk.git] / bbtk_creaVtk_PKG / src / bbcreaVtkPlaneWidget.cxx
index 91de0a69b588b68b6c2c4bf8d7f404a23116700a..869a8f7e58c20346ef43798a1568d4b0db629ec0 100644 (file)
@@ -16,7 +16,6 @@ void boxcreaVtkPlaneWidget::Execute()  // virutal
        box->bbSignalOutputModification(std::string("Center"));
        box->bbSetOutputNormal( box->_boxcreavtkplanewidget.GetNormal() );
        box->bbSignalOutputModification(std::string("Normal"));
-
 }
 
 //----------------------------------------------------------------------------------------------
@@ -44,6 +43,7 @@ void PlaneWidget::Process()
 //    * TYPE is the C++ type of the input/output
 //      (the one provided in the attribute 'type' of the tag 'input')
 
+
        if ((bbGetInputIn()==NULL) || (bbGetInputRenderer()==NULL))
        {
                bbSetOutputOut( NULL );
@@ -56,11 +56,16 @@ void PlaneWidget::Process()
                _boxcreavtkplanewidget.SetImage( bbGetInputIn() );
                _boxcreavtkplanewidget.SetResolution( bbGetInputResolution() );
                _boxcreavtkplanewidget.SetRenderer( bbGetInputRenderer() );
+               _boxcreavtkplanewidget.SetRepresentation( bbGetInputRepresentation() );
+               _boxcreavtkplanewidget.SetOrigin( bbGetInputOrigin() );
+        _boxcreavtkplanewidget.SetNormalIn( bbGetInputNormalIn() );
                _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)
@@ -74,6 +79,7 @@ void PlaneWidget::bbUserSetDefaultValues()
    bbSetInputActive(false);
    bbSetInputIn(NULL);
    bbSetInputResolution(60);
+   bbSetInputRepresentation(1);
    bbSetInputRenderer(NULL);
    bbSetOutputOut(NULL);
    _boxcreavtkplanewidget.box = this;
@@ -103,7 +109,7 @@ void PlaneWidget::bbUserFinalizeProcessing()
 //    if any
   
 }
-}
-// EO namespace bbcreaVtk
+
+}// EO namespace bbcreaVtk