]> Creatis software - creaMaracasVisu.git/blobdiff - bbtk/src/bbcreaMaracasVisuContourControlPoints.cxx
2346 creaMaracasVisu Feature New Normal ManualContour Box
[creaMaracasVisu.git] / bbtk / src / bbcreaMaracasVisuContourControlPoints.cxx
diff --git a/bbtk/src/bbcreaMaracasVisuContourControlPoints.cxx b/bbtk/src/bbcreaMaracasVisuContourControlPoints.cxx
new file mode 100644 (file)
index 0000000..a65b894
--- /dev/null
@@ -0,0 +1,104 @@
+//===== 
+// 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)
+//===== 
+#include "bbcreaMaracasVisuContourControlPoints.h"
+#include "bbcreaMaracasVisuPackage.h"
+
+
+
+namespace bbcreaMaracasVisu
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,ContourControlPoints)
+BBTK_BLACK_BOX_IMPLEMENTATION(ContourControlPoints,bbtk::AtomicBlackBox);
+//===== 
+// 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)
+//===== 
+void ContourControlPoints::Process()
+{
+
+// 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;
+  
+       // Contorno 1
+       _manContourControl_1    = new manualContourControler();
+       _mContourModel_1                = new manualContourModel();
+       _mViewContour_1                 = new manualViewContour();
+       _mViewContour_1->SetModel( _mContourModel_1 );
+       _mViewContour_1->SetWxVtkBaseView( bbGetInputwxVtkBaseView() );
+       _mViewContour_1->SetRange( 2 );
+       _mViewContour_1->SetZ( 1000 );
+
+//JSTG 18-06-07
+       _mContourModel_1->SetNumberOfPointsSpline(100);
+
+
+//EED 3 oct 2006
+//     _mViewContour_1->SetSpacing(spc);
+
+
+//EED 3 oct 2006
+       _mViewContour_1->SetColorNormalContour(0, 0, 1);
+       _mViewContour_1->SetColorEditContour(0.5, 0.5, 0.5);
+
+
+       _manContourControl_1->SetModelView( _mContourModel_1 , _mViewContour_1 );
+       ((vtkInteractorStyleBaseView*)bbGetInputwxVtkBaseView()->GetInteractorStyleBaseView())->AddInteractorStyleMaracas( _manContourControl_1 );
+       _manContourControl_1->CreateNewManualContour();
+       _manContourControl_1->SetActive(true);
+       _mViewContour_1->RefreshContour();
+
+
+}
+//===== 
+// 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)
+//===== 
+void ContourControlPoints::bbUserSetDefaultValues()
+{
+
+//  SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX 
+//    Here we initialize the input 'In' to 0
+   bbSetInputwxVtkBaseView(NULL);
+  
+}
+//===== 
+// 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)
+//===== 
+void ContourControlPoints::bbUserInitializeProcessing()
+{
+
+//  THE INITIALIZATION METHOD BODY :
+//    Here does nothing 
+//    but this is where you should allocate the internal/output pointers 
+//    if any 
+
+  
+}
+//===== 
+// 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)
+//===== 
+void ContourControlPoints::bbUserFinalizeProcessing()
+{
+
+//  THE FINALIZATION METHOD BODY :
+//    Here does nothing 
+//    but this is where you should desallocate the internal/output pointers 
+//    if any
+  
+}
+}
+// EO namespace bbcreaMaracasVisu
+
+