00001 /*========================================================================= 00002 00003 Program: wxMaracas 00004 Module: $RCSfile: wxMaracas_N_ViewersWidget.h,v $ 00005 Language: C++ 00006 Date: $Date: 2009/07/27 07:58:20 $ 00007 Version: $Revision: 1.7 $ 00008 00009 Copyright: (c) 2002, 2003 00010 License: 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notice for more information. 00015 00016 =========================================================================*/ 00017 00018 #ifndef __WX__MARACAS__N_VIEWERSWIDGET__H__ 00019 #define __WX__MARACAS__N_VIEWERSWIDGET__H__ 00020 00021 00022 // ----------------------------------------------------------------------------------------------------------- 00023 // WX headers inclusion. 00024 // For compilers that support precompilation, includes <wx/wx.h>. 00025 // ----------------------------------------------------------------------------------------------------------- 00026 #include <wx/wxprec.h> 00027 #ifdef __BORLANDC__ 00028 #pragma hdrstop 00029 #endif 00030 #ifndef WX_PRECOMP 00031 #include <wx/wx.h> 00032 #endif 00033 00034 //------------------------------------------------------------------------------------------------------------ 00035 // Includes 00036 //------------------------------------------------------------------------------------------------------------ 00037 00038 #include "vtkImageData.h" 00039 #include "wxMaracas_ViewerWidget.h" 00040 #include <iostream> 00041 #include <vector> 00042 00043 //------------------------------------------------------------------------------------------------------------ 00044 // Class definition 00045 //------------------------------------------------------------------------------------------------------------ 00046 00047 class creaMaracasVisu_EXPORT wxMaracas_N_ViewersWidget : public wxPanel 00048 { 00049 public: 00050 00051 00052 //------------------------------------------------------------------------------------------------------------ 00053 // Constructors & Destructors 00054 //------------------------------------------------------------------------------------------------------------ 00055 00056 wxMaracas_N_ViewersWidget(wxWindow *parent, vtkImageData* imagedata = NULL, std::vector<int> *nTypeView = NULL); 00057 ~wxMaracas_N_ViewersWidget(); 00058 00059 00060 //------------------------------------------------------------------------------------------------------------ 00061 // Methods 00062 //------------------------------------------------------------------------------------------------------------ 00063 00064 void Update(); 00065 vtkRenderer *GetRenderer(); 00066 void RefreshView(); 00067 00068 virtual void OnRefreshView(wxCommandEvent & event); 00069 void OnDClickLeft(wxCommandEvent & event); 00070 wxMaracas_ViewerWidget *GetWindow(int iWin); 00071 wxVtkBaseView *GetwxVtkBaseView(int iWin); 00072 virtual void Refresh(bool eraseBackground = true,const wxRect* rect = NULL ); 00073 void SetImage( vtkImageData *image ); 00074 void SetType(std::vector<int>* type); 00075 void UpdateLayout(vtkImageData* imagedata); 00076 // double GetZ(int iWin); 00077 double GetX(); 00078 double GetY(); 00079 double GetZ(); 00080 00081 void setColorTransferFunction(vtkColorTransferFunction* colortable); 00082 00083 //------------------------------------------------------------------------------------------------------------ 00084 // Attributes 00085 //------------------------------------------------------------------------------------------------------------ 00086 00087 private: 00088 00089 wxMaracas_ViewerWidget *wxwindow1; 00090 wxMaracas_ViewerWidget *wxwindow2; 00091 wxMaracas_ViewerWidget *wxwindow3; 00092 wxMaracas_ViewerWidget *wxwindow4; 00093 00094 wxWindow *_currentwxw; 00095 00096 00097 std::vector<int> *nTypeView; 00098 00099 vtkMPRBaseData* mvtkmprbasedata; 00100 00101 DECLARE_EVENT_TABLE( ); 00102 }; 00103 00104 00105 #endif // __WX__MARACAS__N_VIEWERWIDGET__H__