wxMaracasDialog_NViewers.cpp

Go to the documentation of this file.
00001 #include "wxMaracasDialog_NViewers.h"
00002 //#include <wx/frame.h> 
00003 #include <wx/sizer.h> 
00004 #include <wx/splitter.h>
00005 #include "creaSystem.h"
00006 
00007 BEGIN_EVENT_TABLE( wxMaracasDialog_NViewers, wxFrame )
00008         EVT_MENU( 12121, wxMaracasDialog_NViewers::OnRefreshView )
00009         EVT_MENU( 12122, wxMaracasDialog_NViewers::OnDClickLeft )
00010 END_EVENT_TABLE( );
00011 
00015 wxMaracasDialog_NViewers::wxMaracasDialog_NViewers(wxWindow* parent, vtkImageData* img, std::vector<int>* type, wxString title)
00016 //: wxFrame(parent, -1, title)
00017 : wxFrame(NULL, -1, title, wxDefaultPosition,wxSize(700,700))
00018 {
00019         wxSplitterWindow *splitpanel = new wxSplitterWindow(this, -1);
00020         splitpanel->SetMinimumPaneSize(5);
00021 
00022         viewer = new wxMaracas_N_ViewersWidget(splitpanel, img, type);
00023 //      std::string path = crea::System::GetDllAppPath("bbcreaMaracasVisu.dll"); // JPR
00024         std::string dllLastName("bbcreaMaracasVisu.dll");       
00025         std::string path = crea::System::GetDllAppPath(dllLastName);
00026         cutter = CutModelMainPanel::getInstance(splitpanel, path);
00027         cutter->setRenderer( viewer->GetwxVtkBaseView(1)->GetRenderer() );
00028         cutter->setInteractor( viewer->GetwxVtkBaseView(1)->GetWxVTKRenderWindowInteractor() );
00029         cutter->setImageData(img);
00030         
00031         splitpanel->SplitVertically( cutter, viewer, 50);
00032 }
00033 
00037 wxMaracasDialog_NViewers::~wxMaracasDialog_NViewers(){  
00038 }
00039 
00043 void wxMaracasDialog_NViewers::OnRefreshView(wxCommandEvent & event)
00044 {
00045         point.clear();
00046         point.push_back((int)viewer->GetX());
00047         point.push_back((int)viewer->GetY());
00048         point.push_back((int)viewer->GetZ());
00049 
00050         viewer->OnRefreshView(event);
00051 }
00052 
00056 void wxMaracasDialog_NViewers::OnDClickLeft(wxCommandEvent & event)
00057 {
00058         viewer->OnDClickLeft(event);
00059 }
00060 
00064 wxMaracas_N_ViewersWidget* wxMaracasDialog_NViewers::getViewer()
00065 {
00066         return viewer;
00067 }

Generated on 20 Oct 2010 for creaMaracasVisu_lib by  doxygen 1.6.1