]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk2DBaseView.cxx
#3472 TDx
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / wxVtk2DBaseView.cxx
index 2942530922006dc77d2baf1782440b45a69887f7..941b3ef3ae0d5f7c1e9e1d190d80e4bf3bbe33fa 100644 (file)
@@ -31,8 +31,8 @@
 #include "vtkImageActor.h"
 
 
-wxVtk2DBaseView::wxVtk2DBaseView(wxWindow *parent)
-:wxVtkBaseView(parent)
+wxVtk2DBaseView::wxVtk2DBaseView(wxWindow *parent,bool TDxWindow)
+:wxVtkBaseView(parent,TDxWindow)
 {
    _imageViewer2XYZ   = NULL;
    _vtkIinfoTextImage = NULL;
@@ -97,7 +97,6 @@ void wxVtk2DBaseView::TransformCoordinate_spacing_ModelToView(double &X,double &
 //-------------------------------------------------------------------
 void wxVtk2DBaseView::ResetView()
 {
-       printf("EED wxVtk2DBaseView::ResetView");
        double spx = 0,spy = 0,spz = 0;
        int x1 = 1,x2 = 1,y1 = 1,y2 = 1,z1 = 1,z2 = 1;
        wxVtkBaseView::Configure();
@@ -117,7 +116,6 @@ void wxVtk2DBaseView::ResetView()
                imageData->GetSpacing (spx,spy,spz);
                imageData->GetExtent (x1,x2,y1,y2,z1,z2);
        }
-printf("//EED wxVtk2DBaseView::ResetView %d %d    %d %d     %d %d \n",x1,x2,y1,y2,z1,z2);
        _imageViewer2XYZ -> SetExtentDimension(x1,x2,y1,y2,z1,z2);
        _imageViewer2XYZ -> GetVtkImageViewer2()->SetupInteractor ( iren );
 
@@ -144,13 +142,7 @@ printf("//EED wxVtk2DBaseView::ResetView %d %d    %d %d     %d %d \n",x1,x2,y1,y
        vtkInteractorZoomCamera *_vtkInteractorZoomCamera = new vtkInteractorZoomCamera();
        style2D->SetInteractorZoomCamera(_vtkInteractorZoomCamera);
 
-
-
        SetInteractorStyleImage( style2D );
-
-       // RaC
-       //////////////
-
 }
 
 //-------------------------------------------------------------------
@@ -426,6 +418,30 @@ int wxVtk2DBaseView::GetDirection() // virtual
     return 2;
 }
 
+//-------------------------------------------------------------------
+void wxVtk2DBaseView::GetNormal(double normal[3] ) // virtual
+{
+       if (GetDirection()==0 ) 
+       {
+               normal[0]=1;
+               normal[1]=0;
+               normal[2]=0;
+       } // if
+       if (GetDirection()==1 ) 
+       {
+               normal[0]=0;
+               normal[1]=1;
+               normal[2]=0;
+       } // if
+       if (GetDirection()==2 ) 
+       {
+               normal[0]=0;
+               normal[1]=0;
+               normal[2]=1;
+       } // if
+}
+
+
 //-------------------------------------------------------------------
 void wxVtk2DBaseView::SetOpacityText(double opacity)
 {