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 "bbcreaMaracasVisuwxVtkBaseView_Info.h"
5 #include "bbcreaMaracasVisuPackage.h"
6 namespace bbcreaMaracasVisu
9 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,wxVtkBaseView_Info)
10 BBTK_BLACK_BOX_IMPLEMENTATION(wxVtkBaseView_Info,bbtk::AtomicBlackBox);
12 // 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)
14 void wxVtkBaseView_Info::Process()
17 // THE MAIN PROCESSING METHOD BODY
18 // Here we simply set the input 'In' value to the output 'Out'
19 // And print out the output value
20 // INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
21 // void bbSet{Input|Output}NAME(const TYPE&)
22 // const TYPE& bbGet{Input|Output}NAME() const
24 // * NAME is the name of the input/output
25 // (the one provided in the attribute 'name' of the tag 'input')
26 // * TYPE is the C++ type of the input/output
27 // (the one provided in the attribute 'type' of the tag 'input')
29 // bbSetOutputOut( bbGetInputIn() );
30 // std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
32 if (bbGetInputwxVtkBaseView()!=NULL)
34 bbSetOutputvtkRenderer( bbGetInputwxVtkBaseView()->GetRenderer() );
35 bbSetOutputDirection( bbGetInputwxVtkBaseView()->GetDirection() );
36 vtkBaseData *vtkbasedata = bbGetInputwxVtkBaseView()->GetVtkBaseData();
37 if (vtkbasedata!=NULL)
39 marImageData *marimagedata = vtkbasedata->GetMarImageData();
40 if (marimagedata!=NULL)
42 bbSetOutputImage( marimagedata->GetImageData() );
44 std::vector<double> LstWindowColorLevel;
45 LstWindowColorLevel.push_back( vtkbasedata->GetColorWindow() );
46 LstWindowColorLevel.push_back( vtkbasedata->GetColorLevel() );
47 bbSetOutputWindowColorLevel( LstWindowColorLevel );
49 std::vector<double> lstPoint;
50 lstPoint.push_back( vtkbasedata->GetX() );
51 lstPoint.push_back( vtkbasedata->GetY() );
52 lstPoint.push_back( vtkbasedata->GetZ() );
53 bbSetOutputPoint( lstPoint );
56 std::vector<double> lstNormal;
57 bbGetInputwxVtkBaseView()->GetNormal( normal );
58 lstNormal.push_back( normal[0] );
59 lstNormal.push_back( normal[1] );
60 lstNormal.push_back( normal[2] );
61 bbSetOutputNormal( lstNormal );
63 bbSetOutputInterpolation( vtkbasedata->GetInterpolate() );
68 // 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)
70 void wxVtkBaseView_Info::bbUserSetDefaultValues()
72 // SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
73 // Here we initialize the input 'In' to 0
74 std::vector<double> LstWindowColorLevel;
75 LstWindowColorLevel.push_back( 1000 );
76 LstWindowColorLevel.push_back( 500 );
77 bbSetOutputWindowColorLevel( LstWindowColorLevel );
78 bbSetOutputDirection(2);
79 bbSetOutputInterpolation(true);
80 bbSetOutputvtkRenderer(NULL);
83 // 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)
85 void wxVtkBaseView_Info::bbUserInitializeProcessing()
88 // THE INITIALIZATION METHOD BODY :
90 // but this is where you should allocate the internal/output pointers
96 // 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)
98 void wxVtkBaseView_Info::bbUserFinalizeProcessing()
101 // THE FINALIZATION METHOD BODY :
103 // but this is where you should desallocate the internal/output pointers
108 // EO namespace bbcreaMaracasVisu