]> Creatis software - creaMaracasVisu.git/blob - bbtk/src/bbcreaMaracasVisuSetwxVtkBaseViewLookupTable.cxx
#3371 creaMaracasVisu Feature New Normal - Compare Images with RGB
[creaMaracasVisu.git] / bbtk / src / bbcreaMaracasVisuSetwxVtkBaseViewLookupTable.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 "bbcreaMaracasVisuSetwxVtkBaseViewLookupTable.h"
5 #include "bbcreaMaracasVisuPackage.h"
6
7 #include "wxVtk2DBaseView.h"
8
9
10 namespace bbcreaMaracasVisu
11 {
12
13 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,SetwxVtkBaseViewLookupTable)
14 BBTK_BLACK_BOX_IMPLEMENTATION(SetwxVtkBaseViewLookupTable,bbtk::AtomicBlackBox);
15 //===== 
16 // 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 //===== 
18 void SetwxVtkBaseViewLookupTable::Process()
19 {
20
21 // THE MAIN PROCESSING METHOD BODY
22 //   Here we simply set the input 'In' value to the output 'Out'
23 //   And print out the output value
24 // INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
25 //    void bbSet{Input|Output}NAME(const TYPE&)
26 //    const TYPE& bbGet{Input|Output}NAME() const 
27 //    Where :
28 //    * NAME is the name of the input/output
29 //      (the one provided in the attribute 'name' of the tag 'input')
30 //    * TYPE is the C++ type of the input/output
31 //      (the one provided in the attribute 'type' of the tag 'input')
32 //    bbSetOutputOut( bbGetInputIn() );
33 //    std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
34
35         SetLookupTable( bbGetInputBaseView1() , bbGetInputScalarToColors(), bbGetInputOutputFormat() );
36         SetLookupTable( bbGetInputBaseView2() , bbGetInputScalarToColors(), bbGetInputOutputFormat() );
37         SetLookupTable( bbGetInputBaseView3() , bbGetInputScalarToColors(), bbGetInputOutputFormat() );
38         SetLookupTable( bbGetInputBaseView4() , bbGetInputScalarToColors(), bbGetInputOutputFormat() );
39 }
40
41
42 void SetwxVtkBaseViewLookupTable::SetLookupTable(wxVtkBaseView* baseview , vtkScalarsToColors* scalartocolors, int outputformat )
43 {
44         if (baseview!=NULL) 
45         {
46                 if ( baseview->GetDirection()>=0 && baseview->GetDirection()<=2) 
47                 {
48                         wxVtk2DBaseView* baseview2D = (wxVtk2DBaseView*)baseview;
49                         baseview2D->_imageViewer2XYZ -> setScalarsToColors( scalartocolors, outputformat );
50                 } // if Direction
51         } // if baseview
52 }
53
54
55
56 //===== 
57 // 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)
58 //===== 
59 void SetwxVtkBaseViewLookupTable::bbUserSetDefaultValues()
60 {
61
62 //  SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX 
63 //    Here we initialize the input 'In' to 0
64    bbSetInputBaseView1( NULL );
65    bbSetInputBaseView2( NULL );
66    bbSetInputBaseView3( NULL );
67    bbSetInputBaseView4( NULL );
68   
69 }
70 //===== 
71 // 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)
72 //===== 
73 void SetwxVtkBaseViewLookupTable::bbUserInitializeProcessing()
74 {
75
76 //  THE INITIALIZATION METHOD BODY :
77 //    Here does nothing 
78 //    but this is where you should allocate the internal/output pointers 
79 //    if any 
80
81   
82 }
83 //===== 
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)
85 //===== 
86 void SetwxVtkBaseViewLookupTable::bbUserFinalizeProcessing()
87 {
88
89 //  THE FINALIZATION METHOD BODY :
90 //    Here does nothing 
91 //    but this is where you should desallocate the internal/output pointers 
92 //    if any
93   
94 }
95 }
96 // EO namespace bbcreaMaracasVisu
97
98