vtk3DQuantSurfaceWidget.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   wxMaracas
00004   Module:    $RCSfile: vtk3DQuantSurfaceWidget.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009/05/14 13:54:57 $
00007   Version:   $Revision: 1.1 $
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 #ifndef __VTK3DQUANTSURFACEWIDGET__
00018 #define __VTK3DQUANTSURFACEWIDGET__
00019 
00020 
00021 
00022 
00023 
00024 #include "vtk3DSurfaceWidget.h"
00025 #include "kernel/marInterface.h"
00026 #include "kernel/marInterfaceCT.h"
00027 #include <vtkDataSetMapper.h>
00028 #include <vtkActor.h>
00029 #include <vtkProbeFilter.h>
00030 #include <vtkWindowLevelLookupTable.h>
00031 #include <vtkLookupTable.h>
00032 
00033 #include <vtkPolyLine.h>
00034 
00035 //----------------------------------------------------------------------------
00036 
00037 class RectangleGuideVtk{
00038 public:
00039         RectangleGuideVtk();
00040         ~RectangleGuideVtk();
00041         bool                                    _showActor;
00042         vtkActor*                               _actor;
00043         vtkPoints*                              _points;
00044         vtkPolyLine*                    _poly_line;
00045     vtkDataSetMapper*           _mapper;
00046         vtkUnstructuredGrid*    _grid; 
00047         int                                             _iSlice;
00048 };
00049 
00050 //----------------------------------------------------------------------------
00051 
00052 class vtk3DQuantSurfaceWidget;
00053 
00054 class listContourVTK {
00055 public:
00056         listContourVTK(vtk3DQuantSurfaceWidget *quantSurfaceWidget);
00057         ~listContourVTK();
00058         void EraseListContourActor();
00059         void EraseSliceContourActor(int slice, bool refresh=true);
00060         void InitListContourActor(int nos);
00061         void Set3DContourActor( int slice, vtkPoints* contour3D, bool showActor);
00062         void Show3DContourActor();
00063         void Hide3DContourActor();
00064         void SetColour(int r,int g,int b);
00065 
00066 private:
00067         int _r,_g,_b;
00068         vtk3DQuantSurfaceWidget *_vtk3DQuantSurfaceWidget;
00069         std::vector< vtkActor* >                        _lst3DContoursVtkActor;
00070         std::vector< vtkUnstructuredGrid* >     _lst3DContoursVtkUnstructuredGrid;
00071         std::vector< vtkDataSetMapper* >        _lst3DContoursVtkDataSetMapper;
00072         std::vector< vtkPolyLine* >                     _lst3DContoursVtkPolyLine;
00073 };
00074 //----------------------------------------------------------------------------
00075 
00076 
00080 class vtk3DQuantSurfaceWidget : public vtk3DSurfaceWidget
00081 {
00082 public:
00083 
00084     vtk3DQuantSurfaceWidget(
00085         wxWindow* parent,
00086         wxWindowID id,
00087         const   wxPoint& pos    = wxDefaultPosition,
00088         const   wxSize& size    = wxDefaultSize,
00089         long    style                   = 0,
00090         const   wxString& name  = wxPanelNameStr
00091         );
00092     ~vtk3DQuantSurfaceWidget();
00093     void ShowMARACASDataAndAxe( marInterface* mar );
00094         void ShowMARACASDataAndAxeCT( marInterfaceCT* mar);
00095 
00096     void SetImage( vtkProbeFilter* pFilter );
00097 
00098 
00099         void InitListContourActor( int type, int nos);
00100     void Show3DContourActor( int type=0 );
00101     void Hide3DContourActor( int type=0 );
00102         void Set3DContourActor( int slice, vtkPoints* contour3D, bool showActor, int type=0 );
00103         void Erase3DContourActor( int slice);
00104 
00105     void Show3DSliceActor( );
00106     void Hide3DSliceActor( );
00107 
00108     void SetColorLookUp( );
00109     void SetBWLookUp( );
00110 
00111         void Show3DHealthySliceActor();
00112         void Hide3DHealthySliceActor();
00113         void Set3DHealthySliceActor( );
00114 
00115         void Set3DRegionSliceActor( int type, int k1,int k2 );
00116         void Set3DStartRegionSliceActor( int type, int k );
00117         void Set3DEndRegionSliceActor( int type, int k );
00118 
00119         void Show3DRegionSliceActor(int type );
00120         void Show3DStartRegionSliceActor(int type );
00121         void Show3DEndRegionSliceActor(int type );
00122 
00123         void Hide3DRegionSliceActor(int type );
00124         void Hide3DStartRegionSliceActor(int type );
00125         void Hide3DEndRegionSliceActor(int type );
00126    
00127         void GetSliceLimites(int type, int &sliceStart,int &sliceEnd);
00128 
00129         int  GetAnalysisTypeStenosis();
00130         void SetAnalysisTypeStenosis(int analysisTypeStenosis);
00131 
00132 
00133         vtkRenderer*            QuantSurfaceWidget_GetRenderer() {return _pRenderer; };
00134         vtkRenderWindow*        QuantSurfaceWidget_GetRenderWindow() {return _pRenderWindow; };
00135 
00136 protected:
00137 
00138     vtkDataSetMapper                                    *_3DSliceMapper;
00139     vtkActor                                                    *_3DSliceActor;
00140 
00141         RectangleGuideVtk                                       *_hs_rectGuide;
00142         RectangleGuideVtk                                       *_s1_rectGuide;
00143         RectangleGuideVtk                                       *_s2_rectGuide;
00144         RectangleGuideVtk                                       *_sA_rectGuide;
00145         RectangleGuideVtk                                       *_sB_rectGuide;
00146 
00147     vtkWindowLevelLookupTable*                  _bwlookup;
00148     vtkLookupTable*                                             _collookup;
00149 
00150 
00151 private:
00152 
00153         int                             _analysisTypeStenosis;
00154         listContourVTK  *_lstContVtk;
00155         listContourVTK  *_lstContHealtyVtk;
00156 
00157 //    DECLARE_EVENT_TABLE( );
00158         void Set3DSliceActor( RectangleGuideVtk *_rectGuide ,float scale, int k,int r,int g,int b);
00159 };
00160 
00161 #endif //__VTK3DQUANTSURFACEWIDGET__

Generated on 18 Mar 2010 for creaMaracasVisu_lib by  doxygen 1.6.1