00001 /*========================================================================= 00002 00003 Program: wxMaracas 00004 Module: $RCSfile: wxMaracas_ViewerWidget.h,v $ 00005 Language: C++ 00006 Date: $Date: 2010/01/21 13:54:15 $ 00007 Version: $Revision: 1.9 $ 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 00028 #ifdef __BORLANDC__ 00029 #pragma hdrstop 00030 #endif 00031 #ifndef WX_PRECOMP 00032 #include <wx/wx.h> 00033 #endif 00034 00035 //------------------------------------------------------------------------------------------------------------ 00036 // Includes 00037 //------------------------------------------------------------------------------------------------------------ 00038 00039 #include "vtkImageData.h" 00040 #include "vtkRenderer.h" 00041 00042 #include "wxVtkBaseView.h" 00043 #include "wxMPRWidget.h" 00044 00045 //------------------------------------------------------------------------------------------------------------ 00046 // Class definition 00047 //------------------------------------------------------------------------------------------------------------ 00048 00049 00050 class wxMaracas_ViewerWidget : public wxPanel 00051 { 00052 public: 00053 00054 //------------------------------------------------------------------------------------------------------------ 00055 // Constructors & Destructors 00056 //------------------------------------------------------------------------------------------------------------ 00057 00058 wxMaracas_ViewerWidget(wxWindow *parent, vtkImageData* imagedata, int type, vtkMPRBaseData *vtkmprbasedata=NULL); 00059 ~wxMaracas_ViewerWidget(); 00060 00061 //------------------------------------------------------------------------------------------------------------ 00062 // Methods 00063 //------------------------------------------------------------------------------------------------------------ 00064 00065 // vtkRenderer *GetRenderer(); 00066 void ConfigureVTK(); 00067 void RefreshView(); 00068 virtual void Refresh(bool eraseBackground = true,const wxRect* rect = NULL ); 00069 00070 wxVtkBaseView *GetwxVtkBaseView(); 00071 void SetImage( vtkImageData *image ); 00072 double GetX(); 00073 double GetY(); 00074 double GetZ(); 00075 00076 //------------------------------------------------------------------------------------------------------------ 00077 // Attributes 00078 //------------------------------------------------------------------------------------------------------------ 00079 00080 void setColorTransferFunction(vtkColorTransferFunction* colortable); 00081 00082 void setWindowLevel(double level); 00083 00084 void setColorLevel(double level); 00085 private: 00086 int mType; 00087 00088 bool minternalVtkmprbasedata; 00089 vtkMPRBaseData *mvtkmprbasedata; 00090 00091 wxVtk2DBaseView *mvtk2Dbaseview; 00092 wxVtkMPR2DView *mvtkmpr2Dview_X; 00093 wxVtkMPR2DView *mvtkmpr2Dview_Y; 00094 wxVtkMPR2DView *mvtkmpr2Dview_Z; 00095 wxWidgetMesure2D_Plane_in_MPR *mwidgetMesure; 00096 vtkPlane2DView *mvtkplane2Dview; 00097 wxSphereView *mwxsphereview; 00098 00099 wxVtkClipping3DView *mwxvtkclipping3Dview; 00100 wxVtk3DBaseView *mwxvtk3Dbaseview_Clipping3D; 00101 wxVtkMPR3DView *mwxvtkmpr3Dview; 00102 00103 00104 vtkMPR3DDataViewer *vtkmpr3Ddataviewer; 00105 00106 }; 00107 00108 #endif // __WX__MARACAS__VIEWERWIDGET__H__