26 #ifndef __wxVtkBaseView_SceneManager_h_INCLUDED_H__
27 #define __wxVtkBaseView_SceneManager_h_INCLUDED_H__
35 #include <wx/wxprec.h>
49 #include "wxVtkBaseView.h"
52 #include "manualContourModel.h"
53 #include "manualRoiControler.h"
54 #include "manualContourBaseControler.h"
55 #include "manualCircleControler.h"
56 #include "manualLineControler.h"
57 #include "manualViewBaseContour.h"
58 #include "manualViewBullEye.h"
59 #include "manualViewCircle.h"
60 #include "manualViewLine.h"
61 #include "manualViewPoints.h"
62 #include "manualViewRoi.h"
68 BEGIN_DECLARE_EVENT_TYPES()
69 DECLARE_EVENT_TYPE( wxEVT_START_CREATE_MULT_ROI, -1 )
70 DECLARE_EVENT_TYPE( wxEVT_STOP_CREATE_MULT_ROI, -1 )
71 DECLARE_EVENT_TYPE( wxEVT_SELECTED_MULT_ROI, -1 )
72 DECLARE_EVENT_TYPE( wxEVT_START_CREATE_ROI, -1 )
73 DECLARE_EVENT_TYPE( wxEVT_STOP_CREATE_ROI, -1)
74 DECLARE_EVENT_TYPE( wxEVT_DELETE_ROI, -1 )
75 DECLARE_EVENT_TYPE( wxEVT_SELECTED_ROI, -1 )
76 DECLARE_EVENT_TYPE( wxEVT_UNSLECTED_ROI, -1 )
77 DECLARE_EVENT_TYPE( wxEVT_MANUAL_HIDED_ROI, -1 )
78 DECLARE_EVENT_TYPE( wxEVT_MANUAL_SHOWED_ROI, -1 )
79 DECLARE_EVENT_TYPE( wxEVT_EDITING_ROI, -1 )
80 DECLARE_EVENT_TYPE( wxEVT_MOVING_ROI, -1 )
81 DECLARE_EVENT_TYPE( wxEVT_MOVING_ROI_POINT, -1 )
82 DECLARE_EVENT_TYPE( wxEVT_SELECTED_ROI_POINT, -1 )
83 DECLARE_EVENT_TYPE( wxEVT_UNSELECTED_ROI_POINT, -1 )
84 DECLARE_EVENT_TYPE( wxEVT_CHANGED_DEEP, -1 )
85 END_DECLARE_EVENT_TYPES()
112 void sendEnvent( WXTYPE theEventType, std::string text );
118 void setWxVtkViewBase( wxVtkBaseView * theBaseView );
119 void setWxEventHandler( wxEvtHandler * theEventHandler );
120 wxVtkBaseView * getWxVtkViewBase();
138 void configureViewControlTo( std::string theKeyName, manualBaseModel * manContourControl,
double * spc ,
int typeContour);
140 void configureSelectionROI(
double * spc );
141 ContourWrap_ViewControl * insertWrap( std::string theKeyName, manualContourBaseControler * manContourControl, manualViewBaseContour * manViewerContour );
142 void desconfigureViewControlOf( std::string theKeyName );
143 void removeWrap( std::string theKeyName );
145 ContourWrap_ViewControl * getContourWrap_ViewControlOf ( std::string theName, std::map<std::string, ContourWrap_ViewControl *> * theMap );
146 manualContourBaseControler * getControlerOf( std::string theName );
147 manualViewBaseContour * getViewerOf( std::string theName );
148 void set_creatingMULT_ROI(
bool condition );
149 void set_editingROI(
bool condition );
150 void set_toIncludeAtInteractionGroup(
bool condition );
151 void set_waiting(
bool condition );
152 bool get_creatingMULT_ROI( );
153 bool get_editingROI( );
154 bool get_toIncludeAtInteractionGroup( );
156 bool get_creatingROI();
157 void set_creatingROI(
bool theCondition );
163 void createCopyContourOf( std::string anExistingKName, std::string cloneName, manualBaseModel * manualModel,
bool append =
false );
165 void removeFromScene( std::string theKeyName,
bool visualization =
true,
bool control =
true );
166 void removeSceneContours( );
167 void removeAllOutlines();
168 void addToScene( std::string theKeyName,
bool append =
true,
bool visualization =
true,
bool control =
true,
bool ifActive =
true,
bool ifShowCtrlPoints =
true );
169 void addToScene( std::string theKeyName,
ContourWrap_ViewControl * contourWRP,
bool append =
true,
bool visualization =
true,
bool control =
true,
bool ifActive =
true,
bool ifShowCtrlPoints =
true );
170 void removeFromScene( std::vector< std::string> theKeyNameVector,
bool visualization =
true,
bool control =
true );
171 void addToScene( std::vector< std::string> theKeyNameVector,
bool append =
true,
bool visualization =
true,
bool control =
true,
bool ifActive =
true,
bool ifShowCtrlPoints =
true );
172 void setControlActiveStateOfALL(
bool stateCondition );
173 void setControlActiveStateOf( std::string theKeyName,
bool stateCondition );
175 void setVisibleStateOf( std::string theKeyName,
bool stateCondition );
177 std::vector< std::string > getSelectedObjects();
178 void selectObjects( std::vector< std::string > theExistingObjectsToSelect );
179 void selectObjects( std::map<std::string, ContourWrap_ViewControl *> * theMap );
180 void setControlActiveStateOf( std::vector< std::string> &theKeyNameVector,
bool controlCondition =
false );
181 void setControlActiveStateOf( std::map<std::string, ContourWrap_ViewControl *> * theMap,
bool controlCondition =
false );
182 void drawSelectionROI();
183 void setSelection2DROIInternalOutlines( );
184 void writeCoords( std::string method );
187 void SaveThingName(FILE *ff, std::string nameThing);
188 void GetPointsOfActualContour( std::vector<double> *vecX, std::vector<double> *vecY, std::vector<double> *vecZ );
189 vtkImageData *GetImageData();
190 std::vector<std::string> GetlstContoursNameActualSlice();
196 virtual bool OnChar();
197 virtual bool OnMouseMove();
198 virtual bool OnLeftButtonDown();
199 virtual bool OnLeftButtonUp();
200 virtual bool OnMiddleButtonDown();
201 virtual bool OnMiddleButtonUp();
202 virtual bool OnRightButtonDown();
203 virtual bool OnRightButtonUp();
205 virtual bool OnLeftDClick();
206 virtual bool OnRightDClick();
207 virtual bool OnMiddleDClick();
208 virtual bool OnMouseWheel();
210 int GetImageDataSizeZ();
211 void GetImageDataRange(
double *range );
212 void SetWidthContour(
double width);
215 bool isEditableCControler(std::string theKeyName);
216 void deleteCViewerCControler(std::string theKeyName);
217 bool isCtrlPressed();
218 bool isShiftPressed();
219 char getLastKeyCode();
265 #endif // __wxVtkBaseView_SceneManager_HEADER_FILE__