]> Creatis software - creaMaracasVisu.git/blob - bbtk/src/bbcreaMaracasVisuManualPaint.cxx
db005f22c7c8f7c752b47cb8efbd8c203073e6ff
[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->SetWxVtk2DBaseView( (wxVtk2DBaseView*)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->SetWxVtk2DBaseView( (wxVtk2DBaseView*)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->SetWxVtk2DBaseView( (wxVtk2DBaseView*)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->SetWxVtk2DBaseView( (wxVtk2DBaseView*)bbGetInputWxVtkBaseView4() );
98             mpControler->Config();
99         }
100
101     }
102
103 }
104 //=====
105 // Don't edit this file. This file is generated from xml description..
106 //=====
107 void ManualPaint::CreateWidget(wxWindow* parent)
108 {
109    bbSetOutputWidget( new wxManualPaintPanel(parent) );
110 }
111
112 //=====
113 // Don't edit this file. This file is generated from xml description..
114 //=====
115 void ManualPaint::bbUserSetDefaultValues()
116 {
117     firsttime=true;
118     bbSetInputIn(NULL);
119 }
120 //=====
121 // Don't edit this file. This file is generated from xml description..
122 //=====
123 void ManualPaint::bbUserInitializeProcessing()
124 {
125
126 }
127 //=====
128 // Don't edit this file. This file is generated from xml description..
129 //=====
130 void ManualPaint::bbUserFinalizeProcessing()
131 {
132
133 }
134
135 } // EO namespace bbcreaMaracasVisu
136
137