X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FInterface_ManagerContour_NDimensions%2FwxVtkBaseView_SceneManager.h;h=93a2d866cb62a8b492ecc9eee2473cac4c5fec53;hb=8ba77b9cce93770de811bdac8a8341bcb10f036a;hp=49d2ca69ec830bb0e0cd71445dc79ed3ae3247f9;hpb=192dfdf774a06066eff90e9c50916723c8592706;p=creaContours.git diff --git a/lib/Interface_ManagerContour_NDimensions/wxVtkBaseView_SceneManager.h b/lib/Interface_ManagerContour_NDimensions/wxVtkBaseView_SceneManager.h index 49d2ca6..93a2d86 100644 --- a/lib/Interface_ManagerContour_NDimensions/wxVtkBaseView_SceneManager.h +++ b/lib/Interface_ManagerContour_NDimensions/wxVtkBaseView_SceneManager.h @@ -24,7 +24,17 @@ #include "wxVtkBaseView.h" #include #include -#include +#include "manualContourModel.h" +#include "manualRoiControler.h" +#include "manualContourBaseControler.h" +#include "manualCircleControler.h" +#include "manualLineControler.h" +#include "manualViewBaseContour.h" +#include "manualViewBullEye.h" +#include "manualViewCircle.h" +#include "manualViewLine.h" +#include "manualViewPoints.h" +#include "manualViewRoi.h" #include //------------------------------------------------------------------------------------------------------------ @@ -83,7 +93,25 @@ class wxVtkBaseView_SceneManager : public InteractorStyleMaracas { void setWxVtkViewBase( wxVtkBaseView * theBaseView ); void setWxEventHandler( wxEvtHandler * theEventHandler ); wxVtkBaseView * getWxVtkViewBase(); - void configureViewControlTo( std::string theKeyName, manualContourModel * manContourControl, double * spc ,int typeContour); + + // + // Method which creates and associates view and controller to the contour model type pointed in parameter. + // The possible contour types are: + // 0-spline + // 1-spline + // 2-rectangle + // 3-circle + // 4-BullEye + // 5-BullEyeSector + // 6-Line + // 7-Points + // NOTE: The model is created in the KernelManagerContour class, factoryManualContourModel method + // @param typeContour - int + // @param theKeyName - string + // @param manContourControl - manualBaseModel + // @param spc - double* 3-pos Array + void configureViewControlTo( std::string theKeyName, manualBaseModel * manContourControl, double * spc ,int typeContour); + void configureSelectionROI( double * spc ); ContourWrap_ViewControl * insertWrap( std::string theKeyName, manualContourBaseControler * manContourControl, manualViewBaseContour * manViewerContour ); void desconfigureViewControlOf( std::string theKeyName ); @@ -107,7 +135,7 @@ class wxVtkBaseView_SceneManager : public InteractorStyleMaracas { // Other functional methods //------------------------------------------------------------------------------------------------------------ - void createCopyContourOf( std::string anExistingKName, std::string cloneName, manualContourModel * manualModel, bool append = false ); + void createCopyContourOf( std::string anExistingKName, std::string cloneName, manualBaseModel * manualModel, bool append = false ); void removeFromScene( ContourWrap_ViewControl * contourWRP, bool visualization = true, bool control = true ); void removeFromScene( std::string theKeyName, bool visualization = true, bool control = true ); void removeSceneContours( ); @@ -158,7 +186,12 @@ class wxVtkBaseView_SceneManager : public InteractorStyleMaracas { void GetImageDataRange( double *range ); void SetWidthContour(double width); - +//JCP 21 - 09 - 08 + bool isEditableCControler(std::string theKeyName); + void deleteCViewerCControler(std::string theKeyName); + bool isCtrlPressed(); + bool isShiftPressed(); + char getLastKeyCode(); private: //------------------------------------------------------------------------------------------------------------ // Private methods @@ -176,9 +209,9 @@ private: std::map * _contours_ViewControl; std::map * _sceneContours_ViewControl; - wxVtkBaseView *_wxVtk_BaseView; - wxEvtHandler *_eventHandler; - ContourWrap_ViewControl *_lastInteraction; + wxVtkBaseView *_wxVtk_BaseView; + wxEvtHandler *_eventHandler; + ContourWrap_ViewControl *_lastInteraction; std::string _lastInteractionName; std::map * _workingGroup; bool _creatingMULT_ROI; @@ -186,20 +219,23 @@ private: bool _toIncludeAtInteractionGroup; bool _waiting; bool _creatingROI; - int _enventID; - int _leftClickCount; - int _rigthClickCount; - int clickX; - int clickY; + int _enventID; + int _leftClickCount; + int _rigthClickCount; + int clickX; + int clickY; char _lastKeyCode; long int onCharCallBackTimeEnd; long int onCharNeeded; bool _drawingSelectionROI; - manualRoiControler *_controlerSelectionROI; - manualViewRoi *_viewerSelectionROI; - manualContourModel *_modelSelectionROI; + manualRoiControler *_controlerSelectionROI; + manualViewRoi *_viewerSelectionROI; + manualBaseModel *_modelSelectionROI; double _widthOfContour; - + double _widthOfControlPoint; + + bool _ctrlKey; + bool _shiftKey; }; #endif // __wxVtkBaseView_SceneManager_HEADER_FILE__