1 /*=========================================================================
4 Module: $RCSfile: wxMaracasSuperposition.cxx,v $
6 Date: $Date: 2009/06/08 12:35:29 $
7 Version: $Revision: 1.5 $
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"
20 #include "vtkMetaImageReader.h"
21 #include "wx/artprov.h"
25 wxMaracasSuperposition* wxMaracasSuperposition::instance=NULL;
27 wxMaracasSuperposition::wxMaracasSuperposition( wxWindow* parent, std::vector<vtkImageData*> imgs): wxPanel(parent, -1, wxDefaultPosition, wxDefaultSize)
29 m_mgr.SetManagedWindow(this);
31 _superposition1 = NULL;
32 _superposition2 = NULL;
33 _superposition3 = NULL;
37 // set up default notebook style
38 m_notebook_style =wxAUI_NB_TAB_SPLIT | wxAUI_NB_TAB_EXTERNAL_MOVE | wxNO_BORDER;
40 _notebook = this->createNotebook();
46 wxMaracasSuperposition::~wxMaracasSuperposition()
53 wxMaracasSuperposition* wxMaracasSuperposition :: getInstance ( wxWindow* parent, std::vector<vtkImageData*> imgs)
57 instance = new wxMaracasSuperposition(parent, imgs);
62 wxMaracasSuperposition* wxMaracasSuperposition :: getInstance()
67 //------------------------------------------------------------------------------------------------------------
68 // Creational and initialization methods using WxAui
69 //------------------------------------------------------------------------------------------------------------
71 wxAuiNotebook * wxMaracasSuperposition :: createNotebook()
73 wxSize client_size = GetClientSize();
74 wxAuiNotebook* noteBook = new wxAuiNotebook(this, -1, wxPoint(client_size.x, client_size.y), wxSize(430,200), m_notebook_style);
75 wxBitmap page_bmp = wxArtProvider::GetBitmap(wxART_NORMAL_FILE, wxART_OTHER, wxSize(16,16));
80 void wxMaracasSuperposition :: configurePanels()
82 if( _superposition1!=NULL )
84 _notebook->AddPage( _superposition1, wxT(" Superoposition 1 ") );
88 if( _superposition2!=NULL )
90 _notebook->AddPage( _superposition2, wxT(" Superoposition 2 ") );
94 if( _superposition3!=NULL )
96 _notebook->AddPage( _superposition3, wxT(" Superoposition 3 ") );
101 m_mgr.AddPane(_notebook, wxAuiPaneInfo().Name(wxT("notebook_content")).CenterPane().PaneBorder(false));
104 SetMinSize(wxSize(300,300));
108 void wxMaracasSuperposition :: createPanels()
110 if( _superposition1==NULL )
112 _superposition1 = new wxMaracasSuperpositionPanel ( _images, 1, _notebook );
115 else if( _superposition1!=NULL )
120 if( _superposition2==NULL )
122 _superposition2 = new wxMaracasSuperpositionPanel ( _images, 2, _notebook );
125 else if( _superposition2!=NULL )
130 if( _superposition3==NULL )
132 _superposition3 = new wxMaracasSuperpositionPanel ( _images, 3, _notebook );
135 else if( _superposition3!=NULL )
142 void wxMaracasSuperposition :: changeImages(std::vector<vtkImageData*> imgs)
150 std::vector<vtkImageData*> wxMaracasSuperposition :: getImages( )