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"
8 namespace bbcreaMaracasVisu
11 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,ContourControlPoints)
12 BBTK_BLACK_BOX_IMPLEMENTATION(ContourControlPoints,bbtk::AtomicBlackBox);
14 // 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 void ContourControlPoints::Process()
18 // THE MAIN PROCESSING METHOD BODY
19 // Here we simply set the input 'In' value to the output 'Out'
20 // And print out the output value
21 // INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
22 // void bbSet{Input|Output}NAME(const TYPE&)
23 // const TYPE& bbGet{Input|Output}NAME() const
25 // * NAME is the name of the input/output
26 // (the one provided in the attribute 'name' of the tag 'input')
27 // * TYPE is the C++ type of the input/output
28 // (the one provided in the attribute 'type' of the tag 'input')
30 // bbSetOutputOut( bbGetInputIn() );
31 // std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
36 if ( bbGetInputwxVtkBaseView() != NULL )
38 if (_manContourControl_1==NULL)
40 _manContourControl_1 = new manualContourControler();
41 _mContourModel_1 = new manualContourModel();
42 _mViewContour_1 = new manualViewContour();
44 _mContourModel_1 -> SetCloseContour( bbGetInputOpenClose() );
46 _mViewContour_1->SetModel( _mContourModel_1 );
47 _mViewContour_1->SetWxVtkBaseView( bbGetInputwxVtkBaseView() );
48 _mViewContour_1->SetRange( 2 );
49 _mViewContour_1->SetZ( 1000 );
52 _mContourModel_1->SetNumberOfPointsSpline(100);
57 bbGetInputwxVtkBaseView()->GetSpacing(spc);
58 _mViewContour_1->SetSpacing(spc);
62 _mViewContour_1->SetColorNormalContour(0, 0, 1);
63 _mViewContour_1->SetColorEditContour(0.5, 0.5, 0.5);
66 _manContourControl_1->SetModelView( _mContourModel_1 , _mViewContour_1 );
67 ((vtkInteractorStyleBaseView*)bbGetInputwxVtkBaseView()->GetInteractorStyleBaseView())->AddInteractorStyleMaracas( _manContourControl_1 );
68 _manContourControl_1->CreateNewManualContour();
69 _manContourControl_1->SetActive( bbGetInputActive() );
70 _mViewContour_1->RefreshContour();
71 } // _manContourControl_1
73 _mContourModel_1 -> SetCloseContour( bbGetInputOpenClose() );
74 _manContourControl_1->SetActive( bbGetInputActive() );
75 if ( bbGetInputVisible() == true)
77 _mViewContour_1->AddCompleteContourActor (true);
79 _mViewContour_1->RemoveCompleteContourActor ();
81 _mViewContour_1->RefreshContour();
88 // 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)
90 void ContourControlPoints::bbUserSetDefaultValues()
93 // SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
94 // Here we initialize the input 'In' to 0
95 bbSetInputActive(false);
96 bbSetInputVisible(true);
97 bbSetInputOpenClose(true);
98 bbSetInputwxVtkBaseView(NULL);
99 _manContourControl_1 = NULL;
100 _mContourModel_1 = NULL;
101 _mViewContour_1 = NULL;
105 // 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)
107 void ContourControlPoints::bbUserInitializeProcessing()
110 // THE INITIALIZATION METHOD BODY :
112 // but this is where you should allocate the internal/output pointers
118 // 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)
120 void ContourControlPoints::bbUserFinalizeProcessing()
123 // THE FINALIZATION METHOD BODY :
125 // but this is where you should desallocate the internal/output pointers
130 // EO namespace bbcreaMaracasVisu