]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk2DBaseView.cxx
Feature #1606 Add a new entry to ColorLayerImageView to select the fitting mode betwe...
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / wxVtk2DBaseView.cxx
index c3f8516aef1319a0bca14bee41986cc902865aed..90f4bf030ed1c2c62eb97a144e18465405899d39 100644 (file)
@@ -199,24 +199,27 @@ void wxVtk2DBaseView::Configure(bool okimage)
                        vtkCamera *camera = IV2->GetRenderer()->GetActiveCamera();
 
 //EED 17Avril2009
-/*
+//EED 21 mars 2012     FLIP problem  ..PLOP..
+                       
+                       // XY
                        camera->SetViewUp               ( spx*0                 , -spy*1                        , spz*0         );
                        camera->SetPosition             ( spx*(x1+x2)/2 , spy*(y1+y2)/2 , -spz*10000    );
                        camera->SetFocalPoint   ( spx*(x1+x2)/2 , spy*(y1+y2)/2 , spz*0         );
-*/
+/*
                        camera->SetViewUp               ( spx*0                 , spy*1                 , spz*0         );
                        camera->SetPosition             ( spx*(x1+x2)/2 , spy*(y1+y2)/2 , spz*10000     );
                        camera->SetFocalPoint   ( spx*(x1+x2)/2 , spy*(y1+y2)/2 , spz*0         );
+*/
 
-
+                       
                        camera->SetClippingRange( 0.01                  , 1000000 );
                        camera->ComputeViewPlaneNormal();
                        camera->SetParallelScale( spx*(x2-x1)/3.0 );
 
                        // text information over the graphic window
                        if(_vtkIinfoTextImage == NULL){
-                               _vtkIinfoTextImage              = new vtkInfoTextImage();
-                               _vtkIinfoTextImageInteractor    = new vtkInfoTextImageInteractor();
+                               _vtkIinfoTextImage                                      = new vtkInfoTextImage();
+                               _vtkIinfoTextImageInteractor            = new vtkInfoTextImageInteractor();
                                ((vtkInteractorStyleBaseView*)this->GetInteractorStyleBaseView())->AddInteractorStyleMaracas(_vtkIinfoTextImageInteractor);
                        }
                        _vtkIinfoTextImage->SetWxVtk2DBaseView(this);
@@ -299,7 +302,6 @@ vtkRenderWindow* wxVtk2DBaseView::GetRenWin()               // virtual
 }
 
 //-------------------------------------------------------------------
-
 void wxVtk2DBaseView::GetSpacing(double spc[3])  // virtual
 {
    vtkImageData *imageData     = GetVtkBaseData()->GetImageData();
@@ -312,14 +314,18 @@ void wxVtk2DBaseView::GetSpacing(double spc[3])  // virtual
    }
 }
 
-void wxVtk2DBaseView::setColorTransferFunction(vtkColorTransferFunction* colortable){
+//-------------------------------------------------------------------
+void wxVtk2DBaseView::setColorTransferFunction(vtkColorTransferFunction* colortable)
+{
        if(_imageViewer2XYZ!=NULL){
                _imageViewer2XYZ->setColorTransferFunction(colortable);
                this->Refresh();
        }
 }
 
-void wxVtk2DBaseView::setWindowLevel(double level){
+//-------------------------------------------------------------------
+void wxVtk2DBaseView::setWindowLevel(double level)
+{
 //     _imageViewer2XYZ->GetVtkImageViewer2()->SetColorWindow(level);
 
        vtkImageMapToWindowLevelColors* imagemaptowindowlevel = _imageViewer2XYZ->GetVtkImageViewer2()->GetWindowLevel();
@@ -327,9 +333,18 @@ void wxVtk2DBaseView::setWindowLevel(double level){
        this->Refresh();
 }
 
-void wxVtk2DBaseView::setColorLevel(double level){
+//-------------------------------------------------------------------
+void wxVtk2DBaseView::setColorLevel(double level)
+{
 //     _imageViewer2XYZ->GetVtkImageViewer2()->SetColorLevel(level);
        vtkImageMapToWindowLevelColors* imagemaptowindowlevel = _imageViewer2XYZ->GetVtkImageViewer2()->GetWindowLevel();
        imagemaptowindowlevel->SetLevel(level);
        this->Refresh();
 }
+
+//-------------------------------------------------------------------
+int wxVtk2DBaseView::GetDirection() // virtual
+{
+    return 2;
+}
+