wxVtkBaseView_SceneManager :: wxVtkBaseView_SceneManager( wxVtkBaseView * theWxBaseViewToManage, wxEvtHandler * theEventHandler, double * spc )
{
- _widthOfContour = 1.0;
+ SetWidthContour(1.0);
_lastInteraction = NULL;
- _lastInteractionName = "";
+ _lastInteractionName = "";
_eventHandler = theEventHandler;
_leftClickCount = 0;
_rigthClickCount = 0;
- _contours_ViewControl = new std::map< std::string, ContourWrap_ViewControl * >();
- _sceneContours_ViewControl = new std::map< std::string, ContourWrap_ViewControl * >();
+ _contours_ViewControl = new std::map< std::string, ContourWrap_ViewControl * >();
+ _sceneContours_ViewControl = new std::map< std::string, ContourWrap_ViewControl * >();
_workingGroup = new std::map< std::string, ContourWrap_ViewControl * >();
_creatingMULT_ROI = false;
- _editingROI = false;
- _toIncludeAtInteractionGroup = false;
- _waiting = false;
+ _editingROI = false;
+ _toIncludeAtInteractionGroup = false;
+ _waiting = false;
_creatingROI = false;
- _drawingSelectionROI = false;
+ _drawingSelectionROI = false;
_wxVtk_BaseView = theWxBaseViewToManage;
//Configuring the relations between the contour members representation
manViewerContour->SetModel( manModelContour );
manViewerContour->SetWxVtkBaseView( _wxVtk_BaseView );
- manViewerContour->SetRange( 0.5 );
+ manViewerContour->SetRange( _widthOfControlPoint );
manViewerContour->SetZ( 1000 );
manViewerContour->SetSpacing(spc);
//------------------------------------------------------------------------------------------------------------
void wxVtkBaseView_SceneManager::SetWidthContour(double width)
{
- _widthOfContour = width;
+ _widthOfContour = width;
+ _widthOfControlPoint = _widthOfContour*_widthOfContour/2;
manualViewBaseContour *cViewer;
ContourWrap_ViewControl *conwraviwcont;
std::map <std::string, ContourWrap_ViewControl *>::iterator iter;
- for (iter=_contours_ViewControl->begin(); iter!=_contours_ViewControl->end(); iter++ )
+ if (_contours_ViewControl!=NULL)
{
- conwraviwcont = iter->second;
- cViewer = conwraviwcont->getViewer();
- cViewer->SetWidthLine(_widthOfContour);
- }
+ for (iter=_contours_ViewControl->begin(); iter!=_contours_ViewControl->end(); iter++ )
+ {
+ conwraviwcont = iter->second;
+ cViewer = conwraviwcont->getViewer();
+ cViewer->SetWidthLine( _widthOfContour );
+ cViewer->SetRange( _widthOfControlPoint );
+ } // for
+ } // if
}
bool wxVtkBaseView_SceneManager::isEditableCControler(std::string theKeyName){
std::map<std::string, ContourWrap_ViewControl *> * _contours_ViewControl;
std::map<std::string, ContourWrap_ViewControl *> * _sceneContours_ViewControl;
- wxVtkBaseView *_wxVtk_BaseView;
- wxEvtHandler *_eventHandler;
- ContourWrap_ViewControl *_lastInteraction;
+ wxVtkBaseView *_wxVtk_BaseView;
+ wxEvtHandler *_eventHandler;
+ ContourWrap_ViewControl *_lastInteraction;
std::string _lastInteractionName;
std::map<std::string, ContourWrap_ViewControl *> * _workingGroup;
bool _creatingMULT_ROI;
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;
- manualBaseModel *_modelSelectionROI;
+ manualRoiControler *_controlerSelectionROI;
+ manualViewRoi *_viewerSelectionROI;
+ manualBaseModel *_modelSelectionROI;
double _widthOfContour;
+ double _widthOfControlPoint;
bool _ctrlKey;
bool _shiftKey;