1 /*=========================================================================
4 Module: $RCSfile: vtk3DQuantSurfaceWidget.h,v $
6 Date: $Date: 2009/05/14 13:54:57 $
7 Version: $Revision: 1.1 $
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 =========================================================================*/
17 #ifndef __VTK3DQUANTSURFACEWIDGET__
18 #define __VTK3DQUANTSURFACEWIDGET__
24 #include "vtk3DSurfaceWidget.h"
25 #include "kernel/marInterface.h"
26 #include "kernel/marInterfaceCT.h"
27 #include <vtkDataSetMapper.h>
29 #include <vtkProbeFilter.h>
30 #include <vtkWindowLevelLookupTable.h>
31 #include <vtkLookupTable.h>
33 #include <vtkPolyLine.h>
35 //----------------------------------------------------------------------------
37 class RectangleGuideVtk{
44 vtkPolyLine* _poly_line;
45 vtkDataSetMapper* _mapper;
46 vtkUnstructuredGrid* _grid;
50 //----------------------------------------------------------------------------
52 class vtk3DQuantSurfaceWidget;
54 class listContourVTK {
56 listContourVTK(vtk3DQuantSurfaceWidget *quantSurfaceWidget);
58 void EraseListContourActor();
59 void EraseSliceContourActor(int slice, bool refresh=true);
60 void InitListContourActor(int nos);
61 void Set3DContourActor( int slice, vtkPoints* contour3D, bool showActor);
62 void Show3DContourActor();
63 void Hide3DContourActor();
64 void SetColour(int r,int g,int b);
68 vtk3DQuantSurfaceWidget *_vtk3DQuantSurfaceWidget;
69 std::vector< vtkActor* > _lst3DContoursVtkActor;
70 std::vector< vtkUnstructuredGrid* > _lst3DContoursVtkUnstructuredGrid;
71 std::vector< vtkDataSetMapper* > _lst3DContoursVtkDataSetMapper;
72 std::vector< vtkPolyLine* > _lst3DContoursVtkPolyLine;
74 //----------------------------------------------------------------------------
78 * \brief Class that brigde to VTK, override double click...
80 class vtk3DQuantSurfaceWidget : public vtk3DSurfaceWidget
84 vtk3DQuantSurfaceWidget(
87 const wxPoint& pos = wxDefaultPosition,
88 const wxSize& size = wxDefaultSize,
90 const wxString& name = wxPanelNameStr
92 ~vtk3DQuantSurfaceWidget();
93 void ShowMARACASDataAndAxe( marInterface* mar );
94 void ShowMARACASDataAndAxeCT( marInterfaceCT* mar);
96 void SetImage( vtkProbeFilter* pFilter );
99 void InitListContourActor( int type, int nos);
100 void Show3DContourActor( int type=0 );
101 void Hide3DContourActor( int type=0 );
102 void Set3DContourActor( int slice, vtkPoints* contour3D, bool showActor, int type=0 );
103 void Erase3DContourActor( int slice);
105 void Show3DSliceActor( );
106 void Hide3DSliceActor( );
108 void SetColorLookUp( );
111 void Show3DHealthySliceActor();
112 void Hide3DHealthySliceActor();
113 void Set3DHealthySliceActor( );
115 void Set3DRegionSliceActor( int type, int k1,int k2 );
116 void Set3DStartRegionSliceActor( int type, int k );
117 void Set3DEndRegionSliceActor( int type, int k );
119 void Show3DRegionSliceActor(int type );
120 void Show3DStartRegionSliceActor(int type );
121 void Show3DEndRegionSliceActor(int type );
123 void Hide3DRegionSliceActor(int type );
124 void Hide3DStartRegionSliceActor(int type );
125 void Hide3DEndRegionSliceActor(int type );
127 void GetSliceLimites(int type, int &sliceStart,int &sliceEnd);
129 int GetAnalysisTypeStenosis();
130 void SetAnalysisTypeStenosis(int analysisTypeStenosis);
133 vtkRenderer* QuantSurfaceWidget_GetRenderer() {return _pRenderer; };
134 vtkRenderWindow* QuantSurfaceWidget_GetRenderWindow() {return _pRenderWindow; };
138 vtkDataSetMapper *_3DSliceMapper;
139 vtkActor *_3DSliceActor;
141 RectangleGuideVtk *_hs_rectGuide;
142 RectangleGuideVtk *_s1_rectGuide;
143 RectangleGuideVtk *_s2_rectGuide;
144 RectangleGuideVtk *_sA_rectGuide;
145 RectangleGuideVtk *_sB_rectGuide;
147 vtkWindowLevelLookupTable* _bwlookup;
148 vtkLookupTable* _collookup;
153 int _analysisTypeStenosis;
154 listContourVTK *_lstContVtk;
155 listContourVTK *_lstContHealtyVtk;
157 // DECLARE_EVENT_TABLE( );
158 void Set3DSliceActor( RectangleGuideVtk *_rectGuide ,float scale, int k,int r,int g,int b);
161 #endif //__VTK3DQUANTSURFACEWIDGET__