]> 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 (bbGetInputWxVtkBaseView()==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         ManualPaintControler    *mpControler    = new ManualPaintControler();
66         mpControler->SetManualPaintModel(mpModel);
67         mpControler->SetManualPaintPanel(mpPanel);
68         mpControler->SetWxVtkBaseView( bbGetInputWxVtkBaseView() );
69         mpControler->Config();
70     }
71
72 }
73 //=====
74 // Don't edit this file. This file is generated from xml description..
75 //=====
76 void ManualPaint::CreateWidget(wxWindow* parent)
77 {
78    bbSetOutputWidget( new wxManualPaintPanel(parent) );
79 }
80
81 //=====
82 // Don't edit this file. This file is generated from xml description..
83 //=====
84 void ManualPaint::bbUserSetDefaultValues()
85 {
86     firsttime=true;
87     bbSetInputIn(NULL);
88 }
89 //=====
90 // Don't edit this file. This file is generated from xml description..
91 //=====
92 void ManualPaint::bbUserInitializeProcessing()
93 {
94
95 }
96 //=====
97 // Don't edit this file. This file is generated from xml description..
98 //=====
99 void ManualPaint::bbUserFinalizeProcessing()
100 {
101
102 }
103
104 } // EO namespace bbcreaMaracasVisu
105
106