]> 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         ManualPaintPanel        *mpPanel        = (ManualPaintPanel*)bbGetOutputWidget();
60
61         ManualPaintModel        *mpModel        = new ManualPaintModel();
62         mpModel->SetImage( bbGetInputIn() );
63
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     if (_imp==NULL)
75     {
76         _imp=new vtkInteractorManualPaint();
77         _imp->SetImage( bbGetInputIn() );
78         vtkInteractorStyleBaseView *isbv = (vtkInteractorStyleBaseView*)(bbGetInputWxVtkBaseView()->GetInteractorStyleBaseView());
79         isbv->AddInteractorStyleMaracas(_imp);
80     }
81 */
82
83 }
84 //=====
85 // Don't edit this file. This file is generated from xml description..
86 //=====
87 void ManualPaint::CreateWidget(wxWindow* parent)
88 {
89    bbSetOutputWidget( new wxManualPaintPanel(parent) );
90 }
91
92 //=====
93 // Don't edit this file. This file is generated from xml description..
94 //=====
95 void ManualPaint::bbUserSetDefaultValues()
96 {
97     firsttime=true;
98     bbSetInputIn(NULL);
99 }
100 //=====
101 // Don't edit this file. This file is generated from xml description..
102 //=====
103 void ManualPaint::bbUserInitializeProcessing()
104 {
105
106 }
107 //=====
108 // Don't edit this file. This file is generated from xml description..
109 //=====
110 void ManualPaint::bbUserFinalizeProcessing()
111 {
112
113 }
114
115 } // EO namespace bbcreaMaracasVisu
116
117