2 #ifndef EMPTY_PANEL_WIDGET_2_H
3 #define EMPTY_PANEL_WIDGET_2_H
7 #include <vtkImageData.h>
9 #include <vtkMarchingCubes.h>
10 #include <vtkPolyDataMapper.h>
12 #include "wxVTKRenderWindowInteractor.h"
13 #include "wxSurfaceWidget.h"
14 #include "wxVtkBaseView.h"
15 #include <kernel/marInterface.h>
16 #include <kernel/axisExtractor.h>
17 #include <kernel/axisExtractor02.h>
18 #include <kernel/carotidaBifurcacion.h>
20 //------------------------------------------------------------------
21 //------------------------------------------------------------------
22 //------------------------------------------------------------------
24 class TreeExtraction_MH_JFC : public vtkObject
27 static TreeExtraction_MH_JFC *New();
28 virtual void SetInput(marExperiment *input);
29 void SetBranchLevel(int branchLevel);
30 marExperiment *GetInput();
31 vtkImageData *GetVolume();
33 void SetCleanTreeLevel( int cleanLevel );
36 TreeExtraction_MH_JFC();
37 ~TreeExtraction_MH_JFC();
38 void Execute( int count , int sens=1 , double *vit=NULL , int cleanLevel=0);
43 carotidaBifurcacion *_prgov;
44 vtkImageData *_imagedataResult;
45 marExperiment *_marExperiment;
47 void InitImagaDataResult();
48 void BruleVolume( vtkImageData *imagedata, int x,int y,int z,int r,int value );
49 void BruleVolume( vtkImageData *imagedata, vtkPolyData *inputAxisRadio,int value );
50 void FindVit( marExperiment *newExperiment , int actualAxis , double *pointBif , double *vit );
53 //------------------------------------------------------------------
54 //------------------------------------------------------------------
55 //------------------------------------------------------------------
57 class wxEmptyPanelWidget_2: public wxPanel{
59 wxEmptyPanelWidget_2(wxWindow *parentmar,marInterface *mar);
60 ~wxEmptyPanelWidget_2();
63 void OnOpacity_OrigVol(wxScrollEvent& event); // Original Volume
64 void OnOpacity_Res1VolJF(wxScrollEvent& event); // Result 1 Volume JF
65 void OnOpacity_Res2VolJF(wxScrollEvent& event); // Result 2 Volume JF
66 void OnIsoValue(wxScrollEvent& event);
67 void OnBtnExtractTree1_JF(wxCommandEvent& event);
68 void OnBtnExtractTree2_JF(wxCommandEvent& event);
69 void OnBtnEraseTree1_JF(wxCommandEvent& event);
70 void OnBtnEraseTree2_JF(wxCommandEvent& event);
71 void OnBtnExtractTree_MH_JFC(wxCommandEvent& event);
72 void OnBtnEraseTree_MH_JFC(wxCommandEvent& event);
73 void OnOpacity_ResVolMHJF(wxScrollEvent& event); // Result Volume MH+JFC
74 void OnBranchLevel(wxScrollEvent& event); // MH+JFC
75 void OnIsoValue_MH_JFC(wxScrollEvent& event);
76 void OnCleanTree_MH_JFC(wxScrollEvent& event);
77 void OnSensibility(wxScrollEvent& event);
81 TreeExtraction_MH_JFC *_treeExtraction;
84 vtkMarchingCubes *_mCubes;
85 vtkPolyDataMapper *_surfMapper;
88 // Result 1 volume + Axis
89 axisExtractor *_1_prgov;
90 vtkPolyDataMapper *_1_mapfinal;
91 vtkActor *_1_stripfinal;
92 vtkPolyDataMapper *_1_isoMapperMC6;
93 vtkActor *_1_isoActorMC6;
94 vtkMarchingCubes *_1_isoMC6;
96 // Result 2 volume + Axis
97 axisExtractor02 *_2_prgov;
98 vtkPolyDataMapper *_2_mapfinal;
99 vtkActor *_2_stripfinal;
100 vtkPolyDataMapper *_2_isoMapperMC6;
101 vtkActor *_2_isoActorMC6;
102 vtkMarchingCubes *_2_isoMC6;
103 double _sensibility_JF;
106 // Result tree MH_JFC
107 vtkPolyDataMapper *_isoMapperMC1;
108 vtkActor *_isoActorMC1;
109 vtkMarchingCubes *_isoMC1;
110 vtkImageThreshold *_imageThresholdMC1;
112 std::vector< vtkActor* > _lstBranchActor;
113 std::vector< vtkPolyData* > _lstAxisVtk;
114 std::vector< vtkPolyDataMapper* > _lstBranchMapper;
116 wxSlider *_opacity_OrigVol;
117 wxSlider *_opacity_Res1VolJF;
118 wxSlider *_opacity_Res2VolJF;
119 wxSlider *_sl_sensibility_JF;
121 wxSlider *_branchLevel;
122 wxSlider *_opacity_ResVolMHJF;
123 wxSlider *_isoValue_MH_JFC;
124 wxSlider *_cleanTree_MH_JFC;
126 wxVtk3DBaseView *_imageviewer3D;
127 wxPanel *CreateControlPanel(wxWindow *parent);
128 wxPanel *CreateViewPanel(wxWindow *parent);
132 wxSurfaceWidget *_maracasSurfaceWidget;
134 void ResetTree1_JF();
135 void ResetTree2_JF();
136 void ExtractTree1_JF(int x, int y, int z);
137 void ExtractTree2_JF(int x, int y, int z);
139 void ResetTree_MH_JFC();
140 void PaintVascularTree_MH_JFC(marExperiment * newExperiment);
141 void PaintVascularVolume_MH_JFC(vtkImageData * image);
142 void WriteSignals(marExperiment *newExperiment);
145 #endif // EMPTY_PANEL_WIDGET_2_H