+ planeWidget->DisplayTextOn();
+ planeWidget->SetPicker(picker);
+ planeWidget->SetKeyPressActivationValue(activationkey);
+ prop1 = planeWidget->GetPlaneProperty();
+ prop1->SetColor(r, g, b);
+ return planeWidget;
+}
+
+//-------------------------------------------------------------------
+void wxVtkMPR3DView::SetFreePlanesOrtho()
+{
+ _planeWidgetX->SetPlaneOrientationToXAxes();
+ _planeWidgetY->SetPlaneOrientationToYAxes();
+ _planeWidgetZ->SetPlaneOrientationToZAxes();
+ vtkInteractorStyleBaseView *isbv = (vtkInteractorStyleBaseView*)GetWxvtk3Dbaseview()->GetInteractorStyleBaseView();
+ isbv->SetParent_refresh_waiting();
+ isbv->EvaluateToRefresh();
+}
+
+//-------------------------------------------------------------------
+void wxVtkMPR3DView::FreePlaneVisible(int plane, bool ok)
+{
+ if(_planeWidgetX)
+ {
+ if (ok==true)
+ {
+//EED 21/07/2013
+// 1. Make backup of actors
+// 2. Putting out all the actors
+// 3. Add vtkImagageActor in first place
+// 4. Putting again the originals actors
+// 5. Refresh
+
+ // step 1, step 2
+ vtkActorCollection *tmpCollection = vtkActorCollection::New();
+ vtkActorCollection *collectionActors = _wxvtk3Dbaseview->GetRenderer()->GetActors();
+ int i,size=collectionActors->GetNumberOfItems();
+ for (i=0; i<size; i++)
+ {
+ tmpCollection->AddItem ( (vtkActor*)collectionActors->GetItemAsObject(0) );
+ _wxvtk3Dbaseview->GetRenderer()->RemoveActor( (vtkProp*)tmpCollection->GetItemAsObject(i) );
+ } // for
+
+ // step 3
+ if ((plane==1) && (ok==true)) _planeWidgetX->EnabledOn();
+ if ((plane==2) && (ok==true)) _planeWidgetY->EnabledOn();
+ if ((plane==3) && (ok==true)) _planeWidgetZ->EnabledOn();
+
+ // step 4
+ for (i=0; i<size; i++)
+ {
+ _wxvtk3Dbaseview->GetRenderer()->AddActor( (vtkProp*)tmpCollection->GetItemAsObject(i) );
+ } // for
+ tmpCollection->Delete();
+
+ // step 5 Refresh
+ _wxvtk3Dbaseview->GetRenderer()->GetRenderWindow()->Render();
+ } // if ok
+ if ((plane==1) && (ok==false)) _planeWidgetX->EnabledOff();
+ if ((plane==2) && (ok==false)) _planeWidgetY->EnabledOff();
+ if ((plane==3) && (ok==false)) _planeWidgetZ->EnabledOff();
+ } // if _planeWidgetX
+}
+
+//-------------------------------------------------------------------
+void wxVtkMPR3DView::FreePlaneInteraction(bool ok)
+{
+ if(_planeWidgetX)
+ {
+ if (ok==true)
+ {
+ _planeWidgetX->InteractionOn();
+ _planeWidgetY->InteractionOn();
+ _planeWidgetZ->InteractionOn();
+ } else {
+ _planeWidgetX->InteractionOff();
+ _planeWidgetY->InteractionOff();
+ _planeWidgetZ->InteractionOff();
+ }
+ } // if _planeWidgetX