+
+ bool wxContourViewPanel::isEditableCControler(std::string theKeyName){
+ return _sceneManager->isEditableCControler(theKeyName);
+ }
+
+ void wxContourViewPanel::removeFromScene(std::string theKeyName){
+
+ _sceneManager->deleteCViewerCControler(theKeyName);
+
+
+ }
+
+ void wxContourViewPanel::onChangeInstant(wxCommandEvent& event){
+ ConceptDataWrap * dataConcept = NULL;
+ if ( GetId() == event.GetId() )
+ {
+ dataConcept = (ConceptDataWrap *)event.GetClientData();
+ int value = dataConcept->getActualValue();
+ //_instantPanel->setConceptValue( dataConcept->getName(), value );
+ wxContourMainFrame::getInstance()->setConceptValue( dataConcept->getName(), value );
+ }
+ else
+ {
+ dataConcept = wxContourMainFrame::getInstance()->getLastConceptData();
+ if( dataConcept->getName().compare( getVerticalConceptName() ) == 0)
+ {
+ setActualVertical( dataConcept->getActualValue());
+ //_theViewPanel->setVerticalConcept( dataConcept->getName(), dataConcept->getMinShowedValue()/*dataConcept->getMinValue()*/, /*dataConcept->getMaxValue()*/ dataConcept->getMaxShowedValue(), dataConcept->getMinShowedValue(), dataConcept->getMaxShowedValue(), dataConcept->getActualValue());
+ }
+ else if( dataConcept->getName().compare( getHorizontalConceptName() ) == 0|| wxContourMainFrame::getInstance()->getIfConceptCheckedAt( dataConcept->getName(), 0 ) )
+ {
+ setHorizontalConcept( dataConcept->getName(), dataConcept->getMinShowedValue()/*dataConcept->getMinValue()*/, /*dataConcept->getMaxValue()*/ dataConcept->getMaxShowedValue(), dataConcept->getMinShowedValue(), dataConcept->getMaxShowedValue(), dataConcept->getActualValue());
+ }
+ }
+ wxContourMainFrame::getInstance()->changeInstant();
+ }
+
+ void wxContourViewPanel::onCreateMultipleROI (wxCommandEvent& event){
+ }
+ void wxContourViewPanel::onCreateROI (wxCommandEvent& event){
+ }
+ void wxContourViewPanel::onStopCreateROI (wxCommandEvent& event){
+ }
+ void wxContourViewPanel::onChangedDeep (wxCommandEvent& event){
+ double val = getCurrentDeep();
+ //setActualVertical( (int)val );
+ wxContourMainFrame::getInstance()->onChangeDeep((int)val);
+ //_instantPanel->setConceptValue( "Axe Depth", (int)val );
+
+// changeInstant();
+ }
+ void wxContourViewPanel::changeDeep(){
+ double val = getCurrentDeep();
+ setActualVertical( (int)val );
+ }
+ void wxContourViewPanel::onActionButtonPressed(wxCommandEvent& event){
+
+
+ std::vector<std::string> currentSelection = _sceneManager->getSelectedObjects();
+// int elementsSelected = currentSelection.size();
+ bool ctrlKey = _sceneManager->isCtrlPressed();
+ char toolCommand = _sceneManager->getLastKeyCode();
+
+
+ if ( toolCommand == 3 && ctrlKey ) //'C' || 'c'
+ {
+ wxContourMainFrame::getInstance()->onCopy();
+ }
+ else if( toolCommand == 22 && ctrlKey ) //'V' || 'v'
+ {
+ wxContourMainFrame::getInstance()->onPaste();
+ }
+ else if( toolCommand == 8 || (toolCommand==127) ) // backspace Delete
+ {
+ wxContourMainFrame::getInstance()->onDeleteContour();
+ }
+ else if( toolCommand == 14 && ctrlKey ) //'N' || 'n'
+ {
+ //toolCommand = &(CREATE_CONTOUR_KEY);
+ }
+ else if( toolCommand == 15 && ctrlKey ) //'O' || 'o'
+ {
+ wxContourMainFrame::getInstance()->onLoad();
+ }
+ else if( toolCommand == 19 && ctrlKey ) //'S' || 's'
+ {
+ wxContourMainFrame::getInstance()->saveFileWithContoursAutomatique();
+ }else if( toolCommand == 26 ){
+ wxContourMainFrame::getInstance()->onUndo();
+ }else if( toolCommand == 25 ){
+ wxContourMainFrame::getInstance()->onRedo();
+ }
+ }
+
+ void wxContourViewPanel::removeSceneContours()
+ {
+ _sceneManager->removeSceneContours();
+ }
+
+ void wxContourViewPanel::addNameWrapperToScene()
+ {
+ int i,size = wxContourMainFrame::getInstance()->getNamesWrappingSize();
+ for(i = 0; i < size;i++)
+ {
+ std::string name = wxContourMainFrame::getInstance()->getNameWrapping(i);
+ _sceneManager->addToScene(name, true, true, true, false, false );
+ } // for i
+
+ _sceneManager->SetLabelNumberOfContours( "contours:"+std::to_string(size) );
+
+ std::vector<int> tempVector;
+ wxContourMainFrame::getInstance()->getInstantVector( tempVector );
+
+ if (_showBeforeContour==true)
+ {
+ size=0;
+ std::vector<std::string> lstNameBefor;
+ // Contours Befor
+ for (i=tempVector[1]-1; i>=0; i--)
+ {
+ lstNameBefor = wxContourMainFrame::getInstance()->getOutlinesName( i );
+ size = lstNameBefor.size();
+ if (size!=0)
+ {
+ i=-1;
+ } //if size
+ } // for
+ for(i = 0; i < size;i++)
+ {
+ // ctrol active showCtr
+ _sceneManager->addToScene(lstNameBefor[i], true, true, false, false, false );
+ } // for i
+ } // if _before Contour