]> Creatis software - creaContours.git/blob - bbtk/src/bbcreaContoursSetViewerWindowColorLevel.cxx
Clean code
[creaContours.git] / bbtk / src / bbcreaContoursSetViewerWindowColorLevel.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 "bbcreaContoursSetViewerWindowColorLevel.h"
5 #include "bbcreaContoursPackage.h"
6 namespace bbcreaContours
7 {
8
9 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaContours,SetViewerWindowColorLevel)
10 BBTK_BLACK_BOX_IMPLEMENTATION(SetViewerWindowColorLevel,bbtk::AtomicBlackBox);
11 //===== 
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)
13 //===== 
14 void SetViewerWindowColorLevel::Process()
15 {
16 // THE MAIN PROCESSING METHOD BODY
17 //   Here we simply set the input 'In' value to the output 'Out'
18 //   And print out the output value
19 // INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
20 //    void bbSet{Input|Output}NAME(const TYPE&)
21 //    const TYPE& bbGet{Input|Output}NAME() const 
22 //    Where :
23 //    * NAME is the name of the input/output
24 //      (the one provided in the attribute 'name' of the tag 'input')
25 //    * TYPE is the C++ type of the input/output
26 //      (the one provided in the attribute 'type' of the tag 'input')
27     if ( (bbGetInputWindowColorLevel().size()==2 ) && (bbGetInputwxContourMainFrame()!=NULL ))
28     {
29         double w = bbGetInputWindowColorLevel()[0];
30         double c = bbGetInputWindowColorLevel()[1];
31         bbGetInputwxContourMainFrame()->onBrigthnessColorWindowLevel(w,c);
32     } // if WindowColorLevel size    &&   wxContourMainFrame
33 }
34 //===== 
35 // 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)
36 //===== 
37 void SetViewerWindowColorLevel::bbUserSetDefaultValues()
38 {
39 //  SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX 
40 //    Here we initialize the input 'In' to 0
41    std::vector<double> vecWindowColorLevel;
42    vecWindowColorLevel.push_back(1000);
43    vecWindowColorLevel.push_back(500);
44    bbSetInputWindowColorLevel(vecWindowColorLevel);
45    bbSetInputwxContourMainFrame(NULL);
46 }
47
48 //===== 
49 // 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)
50 //===== 
51 void SetViewerWindowColorLevel::bbUserInitializeProcessing()
52 {
53 //  THE INITIALIZATION METHOD BODY :
54 //    Here does nothing 
55 //    but this is where you should allocate the internal/output pointers 
56 //    if any
57 }
58
59 //===== 
60 // 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)
61 //===== 
62 void SetViewerWindowColorLevel::bbUserFinalizeProcessing()
63 {
64 //  THE FINALIZATION METHOD BODY :
65 //    Here does nothing 
66 //    but this is where you should desallocate the internal/output pointers 
67 //    if any
68 }
69
70 } // EO namespace bbcreaContours
71
72