}
//-------------------------------------------------------------------
-wxVtkClipping3DView::~wxVtkClipping3DView(){
+wxVtkClipping3DView::~wxVtkClipping3DView()
+{
if (_boxWidgetVolume!=NULL) { _boxWidgetVolume -> Delete(); }
if (_boxWidgetS1!=NULL) { _boxWidgetS1 -> Delete(); }
if (_vtkclipping3Ddataviewer!=NULL) { delete _vtkclipping3Ddataviewer; }
return _wxvtk3Dbaseview;
}
//-------------------------------------------------------------------
-void wxVtkClipping3DView::Configure(){
+void wxVtkClipping3DView::Configure()
+{
+
_wxvtk3Dbaseview->Configure();
// Actors are added to the renderer.
// the camera towards the FocalPoint, thereby enlarging the image.
_wxvtk3Dbaseview->GetRenderer()->SetActiveCamera(_wxvtk3Dbaseview->GetCamera());
_wxvtk3Dbaseview->GetRenderer()->ResetCamera ();
- _wxvtk3Dbaseview->GetCamera()->Dolly(1.5);
+ _wxvtk3Dbaseview->GetCamera()->Dolly(2);
+
// Set a background color for the renderer and set the size of the
// render window (expressed in pixels).
// near plane clips out objects in front of the plane; the far plane
// clips out objects behind the plane. This way only what is drawn
// between the planes is actually rendered.
- _wxvtk3Dbaseview->GetRenderer()->ResetCameraClippingRange();
+//EEDUPS _wxvtk3Dbaseview->GetRenderer()->ResetCameraClippingRange();
_vtkclipping3Ddataviewer->SetRenderer(this->GetWxvtk3Dbaseview()->GetRenderer());
_vtkclipping3Ddataviewer->SetInteractor(this->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor());
+
}
//-------------------------------------------------------------------
void wxVtkClipping3DView::SetVtkClipping3DDataViewer(vtkClipping3DDataViewer *vtkclipping3Ddataviewer)
//-------------------------------------------------------------------
void wxVtkMPR3DView::ResetCamera(int* ext, double* origin,double* spc)
{
- if(ext == NULL){
- _wxvtk3Dbaseview->GetRenderer()->ResetCamera ();
- _wxvtk3Dbaseview->GetCamera()->Dolly(2.0);
+ if(ext == NULL)
+ {
//EED 21 mars 2012 FLIP probleme ..PLOP..
+//EED 13 may 2013 FLIP probleme ..PLOP..
_wxvtk3Dbaseview->GetCamera()->Roll(180);
_wxvtk3Dbaseview->GetCamera()->Yaw(180+30);
_wxvtk3Dbaseview->GetCamera()->Pitch(-22);
+
+ _wxvtk3Dbaseview->GetRenderer()->ResetCamera ();
+ _wxvtk3Dbaseview->GetCamera()->Dolly(2.0);
}else{
_wxvtk3Dbaseview->GetRenderer()->ResetCamera(x0,x1,y0,y1,z0,z1);
//_wxvtk3Dbaseview->GetCamera()->SetPosition(x,y,z);
- _wxvtk3Dbaseview->GetCamera()->Dolly(1.5);
-
- }
-
+ _wxvtk3Dbaseview->GetCamera()->Dolly(1.5);
+ }
}
//-------------------------------------------------------------------
// _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkmpr3Ddataviewer->GetImageActor(2) ); // _coronal
- // An initial camera view is created. The Dolly() method moves
- // the camera towards the FocalPoint, thereby enlarging the image.
- _wxvtk3Dbaseview->GetRenderer()->SetActiveCamera(_wxvtk3Dbaseview->GetCamera());
- this->ResetCamera();
-
-
- // Set a background color for the renderer and set the size of the
- // render window (expressed in pixels).
- _wxvtk3Dbaseview->GetRenderer()->SetBackground( 0.36 , 0.36 , 0.36 );
-//EED 23oct2010 _wxvtk3Dbaseview->GetRenWin()->SetSize(400, 400);
-
- // Note that when camera movement occurs (as it does in the Dolly()
- // method), the clipping planes often need adjusting. Clipping planes
- // consist of two planes: near and far along the view direction. The
- // near plane clips out objects in front of the plane; the far plane
- // clips out objects behind the plane. This way only what is drawn
- // between the planes is actually rendered.
- _wxvtk3Dbaseview->GetRenderer()->ResetCameraClippingRange();
-
-
+
// vtkPointWidget
//if(_myCallback!=NULL){
//_myCallback->Delete();
// PlaneWidget
+
+// An initial camera view is created. The Dolly() method moves
+ // the camera towards the FocalPoint, thereby enlarging the image.
+ _wxvtk3Dbaseview->GetRenderer()->SetActiveCamera(_wxvtk3Dbaseview->GetCamera());
+
+ // Note that when camera movement occurs (as it does in the Dolly()
+ // method), the clipping planes often need adjusting. Clipping planes
+ // consist of two planes: near and far along the view direction. The
+ // near plane clips out objects in front of the plane; the far plane
+ // clips out objects behind the plane. This way only what is drawn
+ // between the planes is actually rendered.
+ _wxvtk3Dbaseview->GetRenderer()->ResetCameraClippingRange();
+
+ this->ResetCamera();
+
+
+ // Set a background color for the renderer and set the size of the
+ // render window (expressed in pixels).
+ _wxvtk3Dbaseview->GetRenderer()->SetBackground( 0.36 , 0.36 , 0.36 );
+//EED 23oct2010 _wxvtk3Dbaseview->GetRenWin()->SetSize(400, 400);
+
}
//-------------------------------------------------------------------