1 /*=========================================================================
4 Module: $RCSfile: wxMaracasSuperposition.cxx,v $
6 Date: $Date: 2009/05/28 16:39:51 $
7 Version: $Revision: 1.1 $
9 Copyright: (c) 2002, 2003
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notice for more information.
16 =========================================================================*/
18 #include "wxMaracasSuperposition.h"
21 wxMaracasSuperposition* wxMaracasSuperposition::instance=NULL;
23 wxMaracasSuperposition::wxMaracasSuperposition( wxWindow* parent, std::vector<vtkImageData*> imgs);
24 : wxPanel(parent, -1, wxDefaultPosition, wxDefaultSize)
26 m_mgr.SetManagedWindow(this);
28 _superposition1 = NULL;
29 _superposition2 = NULL;
30 _superposition3 = NULL;
34 // set up default notebook style
35 m_notebook_style =wxAUI_NB_TAB_SPLIT | wxAUI_NB_TAB_EXTERNAL_MOVE | wxNO_BORDER | wxAUI_NB_CLOSE_ON_ACTIVE_TAB;
37 _notebook = this->createNotebook();
43 wxMaracasSuperposition::~wxMaracasSuperposition()
48 wxMaracasSuperposition* wxMaracasSuperposition :: getInstance ( wxWindow* parent, std::vector<vtkImageData*> imgs)
52 instance = new wxMaracasSuperposition(parent, imgs);
57 wxMaracasSuperposition* wxMaracasSuperposition :: getInstance()
62 //------------------------------------------------------------------------------------------------------------
63 // Creational and initialization methods using WxAui
64 //------------------------------------------------------------------------------------------------------------
66 wxAuiNotebook * IRMMainFrame :: createNotebook()
69 wxSize client_size = GetClientSize();
70 wxAuiNotebook* noteBook = new wxAuiNotebook(this, -1, wxPoint(client_size.x, client_size.y), wxSize(430,200), m_notebook_style);
71 wxBitmap page_bmp = wxArtProvider::GetBitmap(wxART_NORMAL_FILE, wxART_OTHER, wxSize(16,16));
76 void wxMaracasSuperposition :: configurePanels()
78 if( _superposition1!=NULL )
80 notebook->AddPage( _superposition1, wxT(" Superoposition 1 ") );
84 if( _superposition2!=NULL )
86 notebook->AddPage( _superposition2, wxT(" Superoposition 2 ") );
90 if( _superposition3!=NULL )
92 notebook->AddPage( _superposition3, wxT((" Superoposition 3 ") );
97 m_mgr.AddPane(_notebook, wxAuiPaneInfo().Name(wxT("notebook_content")).CenterPane().PaneBorder(false));
100 SetMinSize(wxSize(300,300));
104 void wxMaracasSuperposition :: createPanels()
106 if( _superposition1==NULL )
108 createSuperpositionPanel(1)
111 else if( _superposition1!=NULL )
116 if( _superposition2==NULL )
118 createSuperpositionPanel(2)
121 else if( _superposition2!=NULL )
126 if( _superposition3==NULL )
128 createSuperpositionPanel(3)
131 else if( _superposition3!=NULL )
137 void wxMaracasSuperposition :: createSuperpositionPanel(int type)
142 void wxMaracasSuperposition :: changeImages(std::vector<vtkImageData*> imgs)
150 std::vector<vtkImageData*> wxMaracasSuperposition :: getImages( )