00001 /*========================================================================= 00002 00003 Program: wxMaracas 00004 Module: $RCSfile: wxMaracas_ViewerWidget.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__VIEWERWIDGET__H__ 00019 #define __WX__MARACAS__VIEWERWIDGET__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 "vtkRenderer.h" 00040 00041 #include "wxVtkBaseView.h" 00042 #include "wxMPRWidget.h" 00043 00044 //------------------------------------------------------------------------------------------------------------ 00045 // Class definition 00046 //------------------------------------------------------------------------------------------------------------ 00047 00048 00049 class wxMaracas_ViewerWidget : public wxPanel 00050 { 00051 public: 00052 00053 //------------------------------------------------------------------------------------------------------------ 00054 // Constructors & Destructors 00055 //------------------------------------------------------------------------------------------------------------ 00056 00057 wxMaracas_ViewerWidget(wxWindow *parent, vtkImageData* imagedata, int type, vtkMPRBaseData *vtkmprbasedata=NULL); 00058 ~wxMaracas_ViewerWidget(); 00059 00060 //------------------------------------------------------------------------------------------------------------ 00061 // Methods 00062 //------------------------------------------------------------------------------------------------------------ 00063 00064 // vtkRenderer *GetRenderer(); 00065 void ConfigureVTK(); 00066 void RefreshView(); 00067 virtual void Refresh(bool eraseBackground = true,const wxRect* rect = NULL ); 00068 00069 wxVtkBaseView *GetwxVtkBaseView(); 00070 void SetImage( vtkImageData *image ); 00071 double GetX(); 00072 double GetY(); 00073 double GetZ(); 00074 00075 //------------------------------------------------------------------------------------------------------------ 00076 // Attributes 00077 //------------------------------------------------------------------------------------------------------------ 00078 00079 void setColorTransferFunction(vtkColorTransferFunction* colortable); 00080 private: 00081 int mType; 00082 00083 bool minternalVtkmprbasedata; 00084 vtkMPRBaseData *mvtkmprbasedata; 00085 00086 wxVtk2DBaseView *mvtk2Dbaseview; 00087 wxVtkMPR2DView *mvtkmpr2Dview_X; 00088 wxVtkMPR2DView *mvtkmpr2Dview_Y; 00089 wxVtkMPR2DView *mvtkmpr2Dview_Z; 00090 wxWidgetMesure2D_Plane_in_MPR *mwidgetMesure; 00091 vtkPlane2DView *mvtkplane2Dview; 00092 wxSphereView *mwxsphereview; 00093 00094 wxVtkClipping3DView *mwxvtkclipping3Dview; 00095 wxVtk3DBaseView *mwxvtk3Dbaseview_Clipping3D; 00096 wxVtkMPR3DView *mwxvtkmpr3Dview; 00097 00098 00099 vtkMPR3DDataViewer *vtkmpr3Ddataviewer; 00100 00101 00102 }; 00103 00104 #endif // __WX__MARACAS__VIEWERWIDGET__H__