1 #include "wxMaracasDialog_NViewers.h"
2 //#include <wx/frame.h>
4 #include <wx/splitter.h>
5 #include "creaSystem.h"
7 BEGIN_EVENT_TABLE( wxMaracasDialog_NViewers, wxFrame )
8 EVT_MENU( 12121, wxMaracasDialog_NViewers::OnRefreshView )
9 EVT_MENU( 12122, wxMaracasDialog_NViewers::OnDClickLeft )
15 wxMaracasDialog_NViewers::wxMaracasDialog_NViewers(wxWindow* parent, vtkImageData* img, std::vector<int>* type, wxString title)
16 //: wxFrame(parent, -1, title)
17 : wxFrame(NULL, -1, title, wxDefaultPosition,wxSize(700,700))
20 wxSplitterWindow *splitpanel = new wxSplitterWindow(this, -1);
21 splitpanel->SetMinimumPaneSize(5);
23 viewer = new wxMaracas_N_ViewersWidget(splitpanel, img, type);
25 std::string path = crea::System::GetDllAppPath("bbcreaMaracasVisu.dll");
26 cutter = CutModelMainPanel::getInstance(splitpanel, path);
27 cutter->setRenderer( viewer->GetwxVtkBaseView(1)->GetRenderer() );
28 cutter->setInteractor( viewer->GetwxVtkBaseView(1)->GetWxVTKRenderWindowInteractor() );
29 cutter->setImageData(img);
31 splitpanel->SplitVertically( cutter, viewer, 50);
38 wxMaracasDialog_NViewers::~wxMaracasDialog_NViewers(){
45 void wxMaracasDialog_NViewers::OnRefreshView(wxCommandEvent & event)
48 point.push_back((int)viewer->GetX());
49 point.push_back((int)viewer->GetY());
50 point.push_back((int)viewer->GetZ());
52 viewer->OnRefreshView(event);
58 void wxMaracasDialog_NViewers::OnDClickLeft(wxCommandEvent & event)
60 viewer->OnDClickLeft(event);
66 wxMaracas_N_ViewersWidget* wxMaracasDialog_NViewers::getViewer()