]> Creatis software - creaMaracasVisu.git/blob - bbtk/src/bbcreaMaracasVisuContourControlPoints.cxx
2346 creaMaracasVisu Feature New Normal ManualContour Box
[creaMaracasVisu.git] / bbtk / src / bbcreaMaracasVisuContourControlPoints.cxx
1 //===== 
2 // 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)
3 //===== 
4 #include "bbcreaMaracasVisuContourControlPoints.h"
5 #include "bbcreaMaracasVisuPackage.h"
6
7
8
9 namespace bbcreaMaracasVisu
10 {
11
12 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,ContourControlPoints)
13 BBTK_BLACK_BOX_IMPLEMENTATION(ContourControlPoints,bbtk::AtomicBlackBox);
14 //===== 
15 // 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)
16 //===== 
17 void ContourControlPoints::Process()
18 {
19
20 // THE MAIN PROCESSING METHOD BODY
21 //   Here we simply set the input 'In' value to the output 'Out'
22 //   And print out the output value
23 // INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
24 //    void bbSet{Input|Output}NAME(const TYPE&)
25 //    const TYPE& bbGet{Input|Output}NAME() const 
26 //    Where :
27 //    * NAME is the name of the input/output
28 //      (the one provided in the attribute 'name' of the tag 'input')
29 //    * TYPE is the C++ type of the input/output
30 //      (the one provided in the attribute 'type' of the tag 'input')
31
32 //    bbSetOutputOut( bbGetInputIn() );
33 //    std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
34   
35         // Contorno 1
36         _manContourControl_1    = new manualContourControler();
37         _mContourModel_1                = new manualContourModel();
38         _mViewContour_1                 = new manualViewContour();
39         _mViewContour_1->SetModel( _mContourModel_1 );
40         _mViewContour_1->SetWxVtkBaseView( bbGetInputwxVtkBaseView() );
41         _mViewContour_1->SetRange( 2 );
42         _mViewContour_1->SetZ( 1000 );
43
44 //JSTG 18-06-07
45         _mContourModel_1->SetNumberOfPointsSpline(100);
46
47
48 //EED 3 oct 2006
49 //      _mViewContour_1->SetSpacing(spc);
50
51
52 //EED 3 oct 2006
53         _mViewContour_1->SetColorNormalContour(0, 0, 1);
54         _mViewContour_1->SetColorEditContour(0.5, 0.5, 0.5);
55
56
57         _manContourControl_1->SetModelView( _mContourModel_1 , _mViewContour_1 );
58         ((vtkInteractorStyleBaseView*)bbGetInputwxVtkBaseView()->GetInteractorStyleBaseView())->AddInteractorStyleMaracas( _manContourControl_1 );
59         _manContourControl_1->CreateNewManualContour();
60         _manContourControl_1->SetActive(true);
61         _mViewContour_1->RefreshContour();
62
63
64 }
65 //===== 
66 // 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)
67 //===== 
68 void ContourControlPoints::bbUserSetDefaultValues()
69 {
70
71 //  SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX 
72 //    Here we initialize the input 'In' to 0
73    bbSetInputwxVtkBaseView(NULL);
74   
75 }
76 //===== 
77 // 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)
78 //===== 
79 void ContourControlPoints::bbUserInitializeProcessing()
80 {
81
82 //  THE INITIALIZATION METHOD BODY :
83 //    Here does nothing 
84 //    but this is where you should allocate the internal/output pointers 
85 //    if any 
86
87   
88 }
89 //===== 
90 // 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)
91 //===== 
92 void ContourControlPoints::bbUserFinalizeProcessing()
93 {
94
95 //  THE FINALIZATION METHOD BODY :
96 //    Here does nothing 
97 //    but this is where you should desallocate the internal/output pointers 
98 //    if any
99   
100 }
101 }
102 // EO namespace bbcreaMaracasVisu
103
104