#include "vtkInteractorStyleBaseView.h"
#include <vtkImageReslice.h>
-#ifdef _DEBUG
-#define new DEBUG_NEW
-#endif
-
//----------------------------------------------------------------------------
public:
static vtkWindowLevelImagePlaneWidgetCallback *New()
{
- return new vtkWindowLevelImagePlaneWidgetCallback;
+ return new vtkWindowLevelImagePlaneWidgetCallback;
}
void Execute( vtkObject *caller, unsigned long ev, void *callData )
//-------------------------------------------------------------------
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);
+
}
//-------------------------------------------------------------------