wxVtkBaseView_SceneManager :: wxVtkBaseView_SceneManager( wxVtkBaseView * theWxBaseViewToManage, wxEvtHandler * theEventHandler, double * spc )
{
-
_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;
- SetWidthContour(1.0);
-
+ _drawingSelectionROI = false;
+ SetWidthContour(1.0);
_wxVtk_BaseView = theWxBaseViewToManage;
if( _wxVtk_BaseView!=NULL )
{
}
configureSelectionROI( spc );
}
+
//------------------------------------------------------------------------------------------------------------
wxVtkBaseView_SceneManager :: ~wxVtkBaseView_SceneManager()
{
{
_contours_ViewControl->erase( iter );
i++;
- }
+ } // for
_contours_ViewControl->clear();
delete _contours_ViewControl;
_workingGroup->clear();
wxCommandEvent cevent( theEventType );
cevent.SetString( wxString( text.c_str(), wxConvUTF8) );
_eventHandler->ProcessEvent( cevent );
- }
+ } // if
}
-
//------------------------------------------------------------------------------------------------------------
// Attributes getters and setters
//------------------------------------------------------------------------------------------------------------
{
_eventHandler = theEventHandler;
}
+
//------------------------------------------------------------------------------------------------------------
void wxVtkBaseView_SceneManager :: setWxVtkViewBase( wxVtkBaseView * theBaseView )
{
{
return _wxVtk_BaseView;
}
+
//------------------------------------------------------------------------------------------------------------
- void wxVtkBaseView_SceneManager :: configureViewControlTo( std::string theKeyName, manualBaseModel * manModelContour, double * spc,int typeContour)
+ void wxVtkBaseView_SceneManager::configureViewControlTo( std::string theKeyName, manualBaseModel * manModelContour, double * spc,int typeContour)
{
//setControlActiveStateOfALL( false );
_creatingROI = true;
_lastInteraction->getControler()->SetActive( false );
this->_vtkInteractorStyleBaseView->SetRefresh_waiting();
}
-
-
manualContourBaseControler *manContourControl;
manualViewBaseContour *manViewerContour;
-
// Creating the view manualViewContour and the manualContourControler
// NOTE: The model is created in the KernelManagerContour class, factoryManualContourModel method
if (typeContour==1)
_contours_ViewControl->insert(std::pair <std::string, ContourWrap_ViewControl *> ( theKeyName, newContourWrap ));
return newContourWrap;
}
+
//------------------------------------------------------------------------------------------------------------
void wxVtkBaseView_SceneManager :: desconfigureViewControlOf( std::string theKeyName )
- {
-
+ {
}
+
//------------------------------------------------------------------------------------------------------------
void wxVtkBaseView_SceneManager :: removeWrap( std::string theKeyName )
{
this->_vtkInteractorStyleBaseView->SetRefresh_waiting();
this->_vtkInteractorStyleBaseView->EvaluateToRefresh();
}
+
//------------------------------------------------------------------------------------------------------------
ContourWrap_ViewControl * wxVtkBaseView_SceneManager :: getContourWrap_ViewControlOf ( std::string theName )
{
return iter->second;
//return iter->first;
}
+
//------------------------------------------------------------------------------------------------------------
ContourWrap_ViewControl * wxVtkBaseView_SceneManager :: getContourWrap_ViewControlOf ( std::string theName, std::map<std::string, ContourWrap_ViewControl *> * theMap )
{
iter = theMap->find( theName );
return iter->second;
}
+
//------------------------------------------------------------------------------------------------------------
manualContourBaseControler * wxVtkBaseView_SceneManager :: getControlerOf( std::string theName )
{
return getContourWrap_ViewControlOf ( theName )->getControler();
}
+
//------------------------------------------------------------------------------------------------------------
manualViewBaseContour * wxVtkBaseView_SceneManager :: getViewerOf( std::string theName )
{
return getContourWrap_ViewControlOf ( theName )->getViewer();
}
+
//------------------------------------------------------------------------------------------------------------
void wxVtkBaseView_SceneManager :: set_creatingMULT_ROI( bool condition )
{
_creatingMULT_ROI = condition;
}
+
//------------------------------------------------------------------------------------------------------------
void wxVtkBaseView_SceneManager :: set_editingROI( bool condition )
{
_editingROI = condition;
}
+
//------------------------------------------------------------------------------------------------------------
void wxVtkBaseView_SceneManager :: set_toIncludeAtInteractionGroup( bool condition )
{
_toIncludeAtInteractionGroup = condition;
}
+
//------------------------------------------------------------------------------------------------------------
void wxVtkBaseView_SceneManager :: set_waiting( bool condition )
{
_waiting = condition;
}
+
//------------------------------------------------------------------------------------------------------------
bool wxVtkBaseView_SceneManager :: get_creatingMULT_ROI( )
{
return _creatingMULT_ROI;
}
+
//------------------------------------------------------------------------------------------------------------
bool wxVtkBaseView_SceneManager :: get_editingROI( )
{
return _editingROI;
}
+
//------------------------------------------------------------------------------------------------------------
bool wxVtkBaseView_SceneManager :: get_toIncludeAtInteractionGroup( )
{
}
//------------------------------------------------------------------------------------------------------------
- void wxVtkBaseView_SceneManager :: removeSceneContours( )
+ void wxVtkBaseView_SceneManager::removeSceneContours()
{
std::map <std::string, ContourWrap_ViewControl *>::iterator iter = _sceneContours_ViewControl->begin();
int size = _sceneContours_ViewControl->size();
iter++;
}
_sceneContours_ViewControl->clear();
-
-
//Removing the selection rectangle to avoid showing when it's innecesary
_controlerSelectionROI->SetActive( false );
_viewerSelectionROI->RemoveCompleteContourActor();