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 
00020         wxSplitterWindow *splitpanel = new wxSplitterWindow(this, -1);
00021         splitpanel->SetMinimumPaneSize(5);
00022 
00023         viewer = new wxMaracas_N_ViewersWidget(splitpanel, img, type);
00024 
00025         std::string path = crea::System::GetDllAppPath("bbcreaMaracasVisu.dll");
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 }
00034 
00038 wxMaracasDialog_NViewers::~wxMaracasDialog_NViewers(){  
00039 }
00040 
00041 
00045 void wxMaracasDialog_NViewers::OnRefreshView(wxCommandEvent & event)
00046 {
00047         point.clear();
00048         point.push_back((int)viewer->GetX());
00049         point.push_back((int)viewer->GetY());
00050         point.push_back((int)viewer->GetZ());
00051 
00052         viewer->OnRefreshView(event);
00053 }
00054 
00058 void wxMaracasDialog_NViewers::OnDClickLeft(wxCommandEvent & event)
00059 {
00060         viewer->OnDClickLeft(event);
00061 }
00062 
00066 wxMaracas_N_ViewersWidget* wxMaracasDialog_NViewers::getViewer()
00067 {
00068         return viewer;
00069 }

Generated on 18 Mar 2010 for creaMaracasVisu_lib by  doxygen 1.6.1