]> Creatis software - creaMaracasVisu.git/blob - bbtk/src/bbcreaMaracasVisuManualPaint.cxx
*** empty log message ***
[creaMaracasVisu.git] / bbtk / src / bbcreaMaracasVisuManualPaint.cxx
1 //=====
2 // Don't edit this file. This file is generated from xml description..
3 //=====
4 #include "bbcreaMaracasVisuManualPaint.h"
5 #include "bbcreaMaracasVisuPackage.h"
6
7 #include "ManualPaintPanel.h"
8 #include "ManualPaintModel.h"
9 #include "ManualPaintControler.h"
10 #include "wxManualPaintPanel.h"
11
12 #include <wx/msgdlg.h>
13
14 namespace bbcreaMaracasVisu
15 {
16
17
18 //---------------------------------------------------------------------------------
19 //---------------------------------------------------------------------------------
20 //---------------------------------------------------------------------------------
21
22
23 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,ManualPaint)
24 BBTK_BLACK_BOX_IMPLEMENTATION(ManualPaint,bbtk::WxBlackBox);
25 //=====
26 // Don't edit this file. This file is generated from xml description..
27 //=====
28 void ManualPaint::Process()
29 {
30
31 /*
32    std::string msg;
33     if (bbGetInputTitle()!="")
34       {
35         msg = bbGetInputTitle()+": " + bbGetInputIn();
36       }
37     else
38       {
39         msg = bbGetInputIn();
40       }
41    ((wxStaticText*)bbGetOutputWidget())->SetLabel( bbtk::std2wx( msg ) );
42   */
43
44     if (bbGetInputWxVtkBaseView1()==NULL)
45     {
46       wxMessageDialog(NULL,  bbtk::std2wx("(ManualPaint) Input 'WxVtkBaseView' is not set"),  bbtk::std2wx(bbGetFullName()) ).ShowModal();
47     }
48
49     if (bbGetInputIn()==NULL)
50     {
51       wxMessageDialog(NULL,  bbtk::std2wx("(ManualPaint) Input 'vtkImageData' is not set"),  bbtk::std2wx(bbGetFullName()) ).ShowModal();
52     }
53
54
55     if (firsttime==true)
56     {
57         firsttime=false;
58
59         ManualPaintModel        *mpModel        = new ManualPaintModel();
60         mpModel->SetImage( bbGetInputIn() );
61
62         wxManualPaintPanel        *mpPanel        = (wxManualPaintPanel*)bbGetOutputWidget();
63         mpPanel->SetManualPaintModel(mpModel);
64
65         if (bbGetInputWxVtkBaseView1()!=NULL)
66         {
67             ManualPaintControler    *mpControler    = new ManualPaintControler();
68             mpControler->SetManualPaintModel(mpModel);
69             mpControler->SetManualPaintPanel(mpPanel);
70             mpControler->SetWxVtkBaseView( bbGetInputWxVtkBaseView1() );
71             mpControler->Config();
72         }
73
74         if (bbGetInputWxVtkBaseView2()!=NULL)
75         {
76             ManualPaintControler    *mpControler    = new ManualPaintControler();
77             mpControler->SetManualPaintModel(mpModel);
78             mpControler->SetManualPaintPanel(mpPanel);
79             mpControler->SetWxVtkBaseView( bbGetInputWxVtkBaseView2() );
80             mpControler->Config();
81         }
82
83         if (bbGetInputWxVtkBaseView3()!=NULL)
84         {
85             ManualPaintControler    *mpControler    = new ManualPaintControler();
86             mpControler->SetManualPaintModel(mpModel);
87             mpControler->SetManualPaintPanel(mpPanel);
88             mpControler->SetWxVtkBaseView( bbGetInputWxVtkBaseView3() );
89             mpControler->Config();
90         }
91
92         if (bbGetInputWxVtkBaseView4()!=NULL)
93         {
94             ManualPaintControler    *mpControler    = new ManualPaintControler();
95             mpControler->SetManualPaintModel(mpModel);
96             mpControler->SetManualPaintPanel(mpPanel);
97             mpControler->SetWxVtkBaseView( bbGetInputWxVtkBaseView4() );
98             mpControler->Config();
99         }
100
101
102
103     }
104
105 }
106 //=====
107 // Don't edit this file. This file is generated from xml description..
108 //=====
109 void ManualPaint::CreateWidget(wxWindow* parent)
110 {
111    bbSetOutputWidget( new wxManualPaintPanel(parent) );
112 }
113
114 //=====
115 // Don't edit this file. This file is generated from xml description..
116 //=====
117 void ManualPaint::bbUserSetDefaultValues()
118 {
119     firsttime=true;
120     bbSetInputIn(NULL);
121 }
122 //=====
123 // Don't edit this file. This file is generated from xml description..
124 //=====
125 void ManualPaint::bbUserInitializeProcessing()
126 {
127
128 }
129 //=====
130 // Don't edit this file. This file is generated from xml description..
131 //=====
132 void ManualPaint::bbUserFinalizeProcessing()
133 {
134
135 }
136
137 } // EO namespace bbcreaMaracasVisu
138
139