1 /*=========================================================================
4 Module: $RCSfile: wxMaracas_N_ViewersWidget.h,v $
6 Date: $Date: 2010/08/04 18:45:27 $
7 Version: $Revision: 1.11 $
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 #ifndef __WX__MARACAS__N_VIEWERSWIDGET__H__
19 #define __WX__MARACAS__N_VIEWERSWIDGET__H__
22 // -----------------------------------------------------------------------------------------------------------
23 // WX headers inclusion.
24 // For compilers that support precompilation, includes <wx/wx.h>.
25 // -----------------------------------------------------------------------------------------------------------
26 #include <wx/wxprec.h>
34 //------------------------------------------------------------------------------------------------------------
36 //------------------------------------------------------------------------------------------------------------
38 #include "vtkImageData.h"
39 #include "wxMaracas_ViewerWidget.h"
43 //------------------------------------------------------------------------------------------------------------
45 //------------------------------------------------------------------------------------------------------------
47 class creaMaracasVisu_EXPORT wxMaracas_N_ViewersWidget : public wxPanel
52 //------------------------------------------------------------------------------------------------------------
53 // Constructors & Destructors
54 //------------------------------------------------------------------------------------------------------------
57 * @pre A wxWindow* object must be provided as a parent for the viewer
58 * @post The layout of the viewer is initialize, if there is no image or type set,
59 only the panel of the viwer is created with no vtk objects
60 * @param wxWindow* parent of the window
61 * @param vtkImageData* imagedata of the viewer
62 * @param std::vector<int>* vector of the type for the viewer
63 * @deprecated This method will be eliminated in future versions,
64 * @deprecated the viewers will start with a default image if it is not specified,
65 * @deprecated this is in order to create the layout of the viewer,
66 * @deprecated the vtkInteractors* and the object vtkRenderer* use second constructor
68 wxMaracas_N_ViewersWidget(wxWindow *parent, vtkImageData* imagedata = NULL, std::vector<int> *nTypeView = NULL);
70 * @pre A wxWindow* object must be provided as a parent for the viewer and the type of layout for the viewer
71 * @post The layout of the viewer is initialized, if no image is provided at first, a default image is
73 * @param wxWindow* parent of the window
74 * @param std::vector<int>* vector of the type for the viewer
75 * @param vtkImageData* imagedata of the viewer
77 wxMaracas_N_ViewersWidget(wxWindow *parent, std::vector<int> *nTypeView, vtkImageData* imagedata = NULL);
80 * @post the viewer window is deleted, all of the interactors and the renderer are deleted
82 ~wxMaracas_N_ViewersWidget();
85 //------------------------------------------------------------------------------------------------------------
87 //------------------------------------------------------------------------------------------------------------
90 vtkRenderer *GetRenderer();
93 virtual void OnRefreshView(wxCommandEvent & event);
94 void OnDClickLeft(wxCommandEvent & event);
95 wxMaracas_ViewerWidget *GetWindow(int iWin);
96 wxVtkBaseView *GetwxVtkBaseView(int iWin);
97 virtual void Refresh(bool eraseBackground = true,const wxRect* rect = NULL );
98 void SetImage( vtkImageData *image );
100 void SetType(std::vector<int>* type);
101 void UpdateLayout(vtkImageData* imagedata);
102 // double GetZ(int iWin);
107 void setColorTransferFunction(vtkColorTransferFunction* colortable);
109 void setWindowLevel(double level);
110 void setColorLevel(double level);
112 //------------------------------------------------------------------------------------------------------------
114 //------------------------------------------------------------------------------------------------------------
118 wxMaracas_ViewerWidget *wxwindow1;
119 wxMaracas_ViewerWidget *wxwindow2;
120 wxMaracas_ViewerWidget *wxwindow3;
121 wxMaracas_ViewerWidget *wxwindow4;
123 wxWindow *_currentwxw;
126 std::vector<int> *nTypeView;
128 vtkMPRBaseData* mvtkmprbasedata;
131 DECLARE_EVENT_TABLE( );
135 #endif // __WX__MARACAS__N_VIEWERWIDGET__H__