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)
4 #include "bbcreaMaracasVisuContourControlPoints.h"
5 #include "bbcreaMaracasVisuPackage.h"
9 namespace bbcreaMaracasVisu
12 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,ContourControlPoints)
13 BBTK_BLACK_BOX_IMPLEMENTATION(ContourControlPoints,bbtk::AtomicBlackBox);
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)
17 void ContourControlPoints::Process()
19 printf("EED ContourControlPoints::Process Start\n");
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
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')
32 // bbSetOutputOut( bbGetInputIn() );
33 // std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
37 if ( bbGetInputwxVtkBaseView() != NULL )
39 if (_manContourControl_1==NULL)
41 _manContourControl_1 = new manualContourControler();
42 _mContourModel_1 = new manualContourModel();
43 _mViewContour_1 = new manualViewContour();
45 _mContourModel_1 -> SetCloseContour( bbGetInputOpenClose() );
47 _mViewContour_1->SetModel( _mContourModel_1 );
48 _mViewContour_1->SetWxVtkBaseView( bbGetInputwxVtkBaseView() );
49 _mViewContour_1->SetRange( 2 );
50 _mViewContour_1->SetZ( 1000 );
53 _mContourModel_1->SetNumberOfPointsSpline(100);
58 bbGetInputwxVtkBaseView()->GetSpacing(spc);
59 _mViewContour_1->SetSpacing(spc);
63 _mViewContour_1->SetColorNormalContour(0, 0, 1);
64 _mViewContour_1->SetColorEditContour(0.5, 0.5, 0.5);
67 _manContourControl_1->SetModelView( _mContourModel_1 , _mViewContour_1 );
68 ((vtkInteractorStyleBaseView*)bbGetInputwxVtkBaseView()->GetInteractorStyleBaseView())->AddInteractorStyleMaracas( _manContourControl_1 );
69 _manContourControl_1->CreateNewManualContour();
70 _manContourControl_1->SetActive( bbGetInputActive() );
71 _mViewContour_1->RefreshContour();
72 } // _manContourControl_1
74 _mContourModel_1 -> SetCloseContour( bbGetInputOpenClose() );
75 _manContourControl_1->SetActive( bbGetInputActive() );
76 if ( bbGetInputVisible() == true)
78 _mViewContour_1->AddCompleteContourActor (true);
80 _mViewContour_1->RemoveCompleteContourActor ();
82 _mViewContour_1->RefreshContour();
86 printf("EED ContourControlPoints::Process End\n");
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)
92 void ContourControlPoints::bbUserSetDefaultValues()
95 // SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
96 // Here we initialize the input 'In' to 0
97 bbSetInputActive(false);
98 bbSetInputVisible(true);
99 bbSetInputOpenClose(true);
100 bbSetInputwxVtkBaseView(NULL);
101 _manContourControl_1 = NULL;
102 _mContourModel_1 = NULL;
103 _mViewContour_1 = NULL;
107 // 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)
109 void ContourControlPoints::bbUserInitializeProcessing()
112 // THE INITIALIZATION METHOD BODY :
114 // but this is where you should allocate the internal/output pointers
120 // 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)
122 void ContourControlPoints::bbUserFinalizeProcessing()
125 // THE FINALIZATION METHOD BODY :
127 // but this is where you should desallocate the internal/output pointers
132 // EO namespace bbcreaMaracasVisu