2 # ---------------------------------------------------------------------
4 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
6 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
7 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
8 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
10 # This software is governed by the CeCILL-B license under French law and
11 # abiding by the rules of distribution of free software. You can use,
12 # modify and/ or redistribute the software under the terms of the CeCILL-B
13 # license as circulated by CEA, CNRS and INRIA at the following URL
14 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
15 # or in the file LICENSE.txt.
17 # As a counterpart to the access to the source code and rights to copy,
18 # modify and redistribute granted by the license, users are provided only
19 # with a limited warranty and the software's author, the holder of the
20 # economic rights, and the successive licensors have only limited
23 # The fact that you are presently reading this means that you have had
24 # knowledge of the CeCILL-B license and that you accept its terms.
25 # ------------------------------------------------------------------------ */
28 #include "wxMaracas_N_ViewersWidget.h"
29 #include "OpenImageDialog.h"
30 #include "vtkImageData.h"
32 #include <structBCPSettings.h>
33 #include <buttonContainerSettings.h>
34 #include <creaPanelButtonContainer.h>
36 class MyApp:public wxApp
39 virtual bool OnInit();
42 class MyFrame:public wxFrame
46 MyFrame(const wxString& title);
48 void OnQuit(wxCommandEvent& event);
49 void OnOpen(wxCommandEvent& event);
50 void OnAbout(wxCommandEvent& event);
51 //void SimpleSliderDialog();
55 //bbwx::Slider::Pointer mSlider;
56 // bbcreaMaracasVisu::bbmaracasVisuViewerNV::Pointer viewer;
69 MyFrame *frame = new MyFrame(wxT("CREATIS basic"));
71 const int width = 600;
73 const int height = 250;
75 frame->SetSize(width,height);
82 BEGIN_EVENT_TABLE(MyFrame,wxFrame)
83 EVT_MENU(wxID_ABOUT,MyFrame::OnAbout)
84 EVT_MENU(wxID_OPEN,MyFrame::OnOpen)
85 EVT_MENU(wxID_EXIT,MyFrame::OnQuit)
89 void MyFrame::OnOpen(wxCommandEvent& event)
91 //wxMessageBox(wxT("You clicked the open option"));
93 creaMaracasVisuKernel::OpenImageDialog *diag = new creaMaracasVisuKernel::OpenImageDialog(true);
94 wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
96 if(diag->getImageData() != NULL){
97 std::vector<int>* vectype;
98 vectype = new std::vector<int>();
99 vectype->push_back(5);
100 vectype->push_back(0);
101 viewer = new wxMaracas_N_ViewersWidget(this,diag->getImageData(), vectype);
102 sizer->Add(viewer,1,wxGROW);
107 void MyFrame::OnAbout(wxCommandEvent& event)
112 void MyFrame::OnQuit(wxCommandEvent& event)
117 MyFrame::MyFrame(const wxString& title):wxFrame(NULL,wxID_ANY,title)
121 // viewer = bbcreaMaracasVisu::bbmaracasVisuViewerNV::New("Viewer");
122 //mSlider = bbwx::Slider::New("slider");
123 //mSlider->bbUserCreateWidget(this);
126 //sizer->Add(mSlider->bbGetOutputWidget(),1,wxGROW);
130 wxMenu *fileMenu = new wxMenu;
132 wxMenu *helpMenu = new wxMenu;
134 helpMenu->Append(wxID_ABOUT,wxT("&About...\tF1"),wxT("Show about dialog"));
136 fileMenu->Append(wxID_OPEN,wxT("&O&pen\tAlt-O"),wxT("Open Files"));
137 fileMenu->Append(wxID_EXIT,wxT("&E&xit\tAlt-X"),wxT("Quit"));
140 wxMenuBar *menuBar = new wxMenuBar();
141 menuBar->Append(fileMenu,wxT("&File"));
142 menuBar->Append(helpMenu,wxT("&Help"));
146 // SetAutoLayout(true);
147 /*CreateStatusBar(2);
148 SetStatusText(wxT("CREATIS"));*/