--- /dev/null
+#----------------------------------------------------------------------------
+# USER! : SET THE NAME OF YOUR EXECUTABLE
+# Replace 'MyExe' by the name you want to give your executable.
+# (a good policy is to give the executable the same name that the directory)
+
+#########################
+SET ( EXE_NAME TestAppli )
+#########################
+
+#----------------------------------------------------------------------------
+
+#----------------------------------------------------------------------------
+# EXECUTABLE SOURCES (TO BE COMPILED)
+# EITHER LIST ALL .cxx, *.cpp, *.cc IN CURRENT DIR USING NEXT LINE:
+
+FILE(GLOB ${EXE_NAME}_SOURCES *.cxx *.cpp *.cc)
+
+# OR MANUALLY LIST YOUR FILES WITH NEXT COMMAND (WITHOUT EXTENSION)
+# SET ( ${EXE_NAME}_SOURCES
+#
+# )
+#----------------------------------------------------------------------------
+
+FIND_PACKAGE(crea REQUIRED)
+IF (crea_FOUND)
+ INCLUDE(${crea_USE_FILE})
+ENDIF(crea_FOUND)
+
+FIND_PACKAGE(creaMaracasVisu REQUIRED)
+IF (creaMaracasVisu_FOUND)
+ INCLUDE(${creaMaracasVisu_USE_FILE})
+ENDIF(creaMaracasVisu_FOUND)
+
+FIND_PACKAGE(BBTK REQUIRED)
+IF (BBTK_FOUND)
+ INCLUDE(${BBTK_USE_FILE})
+ENDIF(BBTK_FOUND)
+
+#INCLUDE_DIRECTORIES(${CREAMARACASVISU_INCLUDE_DIR})
+
+
+
+#----------------------------------------------------------------------------
+# DEPENDENCIES (LIBRARIES TO LINK WITH)
+
+MESSAGE ("::::::::::::::::::::THIS IS THE PATH OF VTK = ${VTK_LIBRARIES}")
+MESSAGE ("::::::::::::::::::::THIS IS THE PATH OF CREA = ${crea_LIBRARIES}")
+MESSAGE ("::::::::::::::::::::THIS IS THE PATH OF CREA = ${creaMaracasVisu_LIBRARIES}")
+SET ( ${EXE_NAME}_LINK_LIBRARIES
+ ${crea_LIBRARIES}
+ ${WXWIDGETS_LIBRARIES}
+ # ${KWWidgets_LIBRARIES}
+ ${VTK_LIBRARIES}
+ # ${ITK_LIBRARIES}
+ ${GDCM_LIBRARIES}
+ ${BOOST_LIBRARIES}
+# BBTK
+ # creaMaracasVisu
+
+ # USER! : Add here those agmonst the various (?) PROJECT LIBRARIES
+ # you need for the current executable
+ # (If you created only one Library, don't forget it !...)
+
+ )
+#----------------------------------------------------------------------------
+
+#----------------------------------------------------------------------------
+# USER! : UNCOMMENT NEXT LINE IF YOU WANT A CONSOLE ON WINDOWS
+# NB : YOUR MAIN MUST BE ADAPTED ALSO
+# SEE THE MACRO CREA_WXMAIN_WITH_CONSOLE IN creaWx.h
+#SET(${EXE_NAME}_CONSOLE TRUE)
+#----------------------------------------------------------------------------
+
+#----------------------------------------------------------------------------
+# CREATES AND INSTALLS THE EXE
+CREA_ADD_EXECUTABLE( ${EXE_NAME} )
+#----------------------------------------------------------------------------
+
+
--- /dev/null
+#include "wx/wx.h"
+#include "wxMaracas_N_ViewersWidget.h"
+#include "OpenImageDialog.h"
+#include "vtkImageData.h"
+
+
+class MyApp:public wxApp
+{
+public:
+ virtual bool OnInit();
+};
+
+class MyFrame:public wxFrame
+{
+public:
+
+ MyFrame(const wxString& title);
+
+ void OnQuit(wxCommandEvent& event);
+ void OnOpen(wxCommandEvent& event);
+ void OnAbout(wxCommandEvent& event);
+ //void SimpleSliderDialog();
+
+private:
+
+ //bbwx::Slider::Pointer mSlider;
+// bbcreaMaracasVisu::bbmaracasVisuViewerNV::Pointer viewer;
+ vtkImageData* image;
+ wxWindow* viewer;
+ DECLARE_EVENT_TABLE()
+
+};
+
+DECLARE_APP(MyApp)
+
+IMPLEMENT_APP(MyApp)
+
+bool MyApp::OnInit()
+{
+ MyFrame *frame = new MyFrame(wxT("CREATIS basic"));
+
+ const int width = 600;
+ const int height = 250;
+
+ frame->SetSize(width,height);
+
+ frame->Show(true);
+
+ return true;
+}
+
+BEGIN_EVENT_TABLE(MyFrame,wxFrame)
+ EVT_MENU(wxID_ABOUT,MyFrame::OnAbout)
+ EVT_MENU(wxID_OPEN,MyFrame::OnOpen)
+ EVT_MENU(wxID_EXIT,MyFrame::OnQuit)
+END_EVENT_TABLE()
+
+
+void MyFrame::OnOpen(wxCommandEvent& event)
+{
+ //wxMessageBox(wxT("You clicked the open option"));
+
+#ifdef WIN32
+ creaMaracasVisuKernel::OpenImageDialog *diag = new creaMaracasVisuKernel::OpenImageDialog(true);
+ wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
+
+ if(diag->getImageData() != NULL){
+ std::vector<int>* vectype;
+ vectype = new std::vector<int>();
+ vectype->push_back(5);
+ vectype->push_back(0);
+ viewer = new wxMaracas_N_ViewersWidget(this,diag->getImageData(), vectype);
+ sizer->Add(viewer,1,wxGROW);
+ SetSizer(sizer);
+ }
+
+#else
+ creaMaracasVisuKernel::OpenImageDialog *diag = new creaMaracasVisuKernel::OpenImageDialog(false);
+ if(diag->getImageData() != NULL){
+ image = diag->getImageData();
+ strfilename = diag->getFilename();
+ }
+#endif
+}
+
+void MyFrame::OnAbout(wxCommandEvent& event)
+{
+
+}
+
+void MyFrame::OnQuit(wxCommandEvent& event)
+{
+ Close();
+}
+
+MyFrame::MyFrame(const wxString& title):wxFrame(NULL,wxID_ANY,title)
+{
+
+
+ // viewer = bbcreaMaracasVisu::bbmaracasVisuViewerNV::New("Viewer");
+ //mSlider = bbwx::Slider::New("slider");
+ //mSlider->bbUserCreateWidget(this);
+
+
+ //sizer->Add(mSlider->bbGetOutputWidget(),1,wxGROW);
+
+
+
+ wxMenu *fileMenu = new wxMenu;
+
+ wxMenu *helpMenu = new wxMenu;
+
+ helpMenu->Append(wxID_ABOUT,wxT("&About...\tF1"),wxT("Show about dialog"));
+
+ fileMenu->Append(wxID_OPEN,wxT("&O&pen\tAlt-O"),wxT("Open Files"));
+ fileMenu->Append(wxID_EXIT,wxT("&E&xit\tAlt-X"),wxT("Quit"));
+
+
+ wxMenuBar *menuBar = new wxMenuBar();
+ menuBar->Append(fileMenu,wxT("&File"));
+ menuBar->Append(helpMenu,wxT("&Help"));
+
+ SetMenuBar(menuBar);
+
+ // SetAutoLayout(true);
+ /*CreateStatusBar(2);
+ SetStatusText(wxT("CREATIS"));*/
+}
+