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 printf(" wxVtkBaseView_Info::Process %f %f %f\n", vtkbasedata->GetX(), vtkbasedata->GetY(), vtkbasedata->GetZ() );
40 marImageData *marimagedata = vtkbasedata->GetMarImageData();
41 if (marimagedata!=NULL)
43 bbSetOutputImage( marimagedata->GetImageData() );
45 std::vector<double> LstWindowColorLevel;
46 LstWindowColorLevel.push_back( vtkbasedata->GetColorWindow() );
47 LstWindowColorLevel.push_back( vtkbasedata->GetColorLevel() );
48 bbSetOutputWindowColorLevel( LstWindowColorLevel );
50 std::vector<double> lstPoint;
51 lstPoint.push_back( vtkbasedata->GetX() );
52 lstPoint.push_back( vtkbasedata->GetY() );
53 lstPoint.push_back( vtkbasedata->GetZ() );
54 bbSetOutputPoint( lstPoint );
57 std::vector<double> lstNormal;
58 bbGetInputwxVtkBaseView()->GetNormal( normal );
59 lstNormal.push_back( normal[0] );
60 lstNormal.push_back( normal[1] );
61 lstNormal.push_back( normal[2] );
62 bbSetOutputNormal( lstNormal );
64 bbSetOutputInterpolation( vtkbasedata->GetInterpolate() );
69 // 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)
71 void wxVtkBaseView_Info::bbUserSetDefaultValues()
73 // SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
74 // Here we initialize the input 'In' to 0
75 std::vector<double> LstWindowColorLevel;
76 LstWindowColorLevel.push_back( 1000 );
77 LstWindowColorLevel.push_back( 500 );
78 bbSetOutputWindowColorLevel( LstWindowColorLevel );
79 bbSetOutputDirection(2);
80 bbSetOutputInterpolation(true);
81 bbSetOutputvtkRenderer(NULL);
84 // 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)
86 void wxVtkBaseView_Info::bbUserInitializeProcessing()
89 // THE INITIALIZATION METHOD BODY :
91 // but this is where you should allocate the internal/output pointers
97 // 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)
99 void wxVtkBaseView_Info::bbUserFinalizeProcessing()
102 // THE FINALIZATION METHOD BODY :
104 // but this is where you should desallocate the internal/output pointers
109 // EO namespace bbcreaMaracasVisu