]> Creatis software - creaContours.git/blob - bbtk/src/bbcreaContoursSetColorLayerImage.cxx
SetColorImage update
[creaContours.git] / bbtk / src / bbcreaContoursSetColorLayerImage.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 "bbcreaContoursSetColorLayerImage.h"
5 #include "bbcreaContoursPackage.h"
6
7 #include "wxContourMainFrame.h"
8
9 namespace bbcreaContours
10 {
11
12 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaContours,SetColorLayerImage)
13 BBTK_BLACK_BOX_IMPLEMENTATION(SetColorLayerImage,bbtk::AtomicBlackBox);
14 //===== 
15 // 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 //===== 
17 void SetColorLayerImage::Process()
18 {
19
20 // THE MAIN PROCESSING METHOD BODY
21 //   Here we simply set the input 'In' value to the output 'Out'
22 //   And print out the output value
23 // INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
24 //    void bbSet{Input|Output}NAME(const TYPE&)
25 //    const TYPE& bbGet{Input|Output}NAME() const 
26 //    Where :
27 //    * NAME is the name of the input/output
28 //      (the one provided in the attribute 'name' of the tag 'input')
29 //    * TYPE is the C++ type of the input/output
30 //      (the one provided in the attribute 'type' of the tag 'input')
31
32 //    bbSetOutputOut( bbGetInputIn() );
33 //    std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
34  
35         if (wxContourMainFrame::getInstance()!=NULL)
36         { 
37                 if (bbGetInputIn()!=NULL) 
38                 {
39                         wxContourMainFrame::getInstance()->SetColorLayerImage( bbGetInputIn() );
40                 } // InputIn
41 /*      
42                 if (wxContourMainFrame::getInstance()->GetFileLocation().empty()==true)
43                 {
44                         wxContourMainFrame::getInstance()->SetFileLocation(bbGetInputFileLocation() );
45                 }else {
46                         wxContourMainFrame::getInstance()->onSave();
47                         wxContourMainFrame::getInstance()->deleteAllContours();
48                         wxContourMainFrame::getInstance()->SetFileLocation(bbGetInputFileLocation() );
49                 } // if FileLocaton
50
51                 wxContourMainFrame::getInstance()->onLoad();
52                 wxContourMainFrame::getInstance()->RefreshInterface();
53 */              
54         } // if Instance
55  
56 }
57 //===== 
58 // 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)
59 //===== 
60 void SetColorLayerImage::bbUserSetDefaultValues()
61 {
62
63 //  SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX 
64 //    Here we initialize the input 'In' to 0
65    bbSetInputIn(NULL);
66   
67 }
68 //===== 
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)
70 //===== 
71 void SetColorLayerImage::bbUserInitializeProcessing()
72 {
73
74 //  THE INITIALIZATION METHOD BODY :
75 //    Here does nothing 
76 //    but this is where you should allocate the internal/output pointers 
77 //    if any 
78
79   
80 }
81 //===== 
82 // 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)
83 //===== 
84 void SetColorLayerImage::bbUserFinalizeProcessing()
85 {
86
87 //  THE FINALIZATION METHOD BODY :
88 //    Here does nothing 
89 //    but this is where you should desallocate the internal/output pointers 
90 //    if any
91   
92 }
93 }
94 // EO namespace bbcreaContours
95
96