]> Creatis software - creaMaracasVisu.git/commitdiff
#3155 creaMaracasVisu Feature New Normal - ViewerPlane ComplexBox
authorEduardo DAVILA <davila@localhost.localdomain>
Tue, 12 Dec 2017 22:14:17 +0000 (23:14 +0100)
committerEduardo DAVILA <davila@localhost.localdomain>
Tue, 12 Dec 2017 22:14:17 +0000 (23:14 +0100)
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkImageViewer2_XYZ.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk2DBaseView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.cxx

index 479db77aa95b91ff9637555f3a6d45918612f361..69a183fd49a728ad669b2f55543f9cd41d781911 100644 (file)
@@ -113,14 +113,12 @@ vtkImageViewer2 *vtkImageViewer2_XYZ::GetVtkImageViewer2()
        return _vtkimageviewer2;
 }
 //-------------------------------------------------------------------
-void vtkImageViewer2_XYZ::setColorTransferFunction(vtkColorTransferFunction* colortable){
-
-       
+void vtkImageViewer2_XYZ::setColorTransferFunction(vtkColorTransferFunction* colortable)
+{      
        vtkImageMapToWindowLevelColors* imagemaptowindowlevel = _vtkimageviewer2->GetWindowLevel();
-
-       if(colortable!=NULL&&colortable->GetSize()>0 && _colortable != colortable){
+       if(colortable!=NULL&&colortable->GetSize()>0 && _colortable != colortable)
+       {
                _colortable = colortable;
                imagemaptowindowlevel->SetLookupTable(colortable);
        }
-
 }
index 8f47f97123b89c99066db0c3e3aab6f7b5b1094d..b90dbaff4c38b4ee7cfa6a8a1cedb1a6db836a6e 100644 (file)
@@ -376,25 +376,32 @@ void wxMaracas_ViewerWidget::Refresh(bool eraseBackground ,const wxRect* rect  )
        wxVtkBaseView *wxMaracas_ViewerWidget::GetwxVtkBaseView()
        {
                wxVtkBaseView *wxvtkbaseview=NULL;
-               if (mvtk2Dbaseview!=NULL){
+               if (mvtk2Dbaseview!=NULL)
+               {
                        wxvtkbaseview = mvtk2Dbaseview;
                }
-               if (mvtkmpr2Dview_X!=NULL){
+               if (mvtkmpr2Dview_X!=NULL)
+               {
                        wxvtkbaseview = mvtkmpr2Dview_X;
                }
-               if (mvtkmpr2Dview_Y!=NULL){
+               if (mvtkmpr2Dview_Y!=NULL)
+               {
                        wxvtkbaseview = mvtkmpr2Dview_Y;
                }
-               if (mvtkmpr2Dview_Z!=NULL){
+               if (mvtkmpr2Dview_Z!=NULL)
+               {
                        wxvtkbaseview = mvtkmpr2Dview_Z;
                }
-               if (mvtkplane2Dview!=NULL){
+               if (mvtkplane2Dview!=NULL)
+               {
                        wxvtkbaseview = mvtkplane2Dview;
                }
-               if (mwxsphereview!=NULL){
+               if (mwxsphereview!=NULL)
+               {
                        wxvtkbaseview = mwxsphereview;
                }
-               if (mwxvtk3Dbaseview_Clipping3D!=NULL){
+               if (mwxvtk3Dbaseview_Clipping3D!=NULL)
+               {
                        wxvtkbaseview = mwxvtk3Dbaseview_Clipping3D;
                }
                return wxvtkbaseview   ;
index af726f120d87331ddc6485ca6667e6d5a1f072c9..1110fc11f1d824b8a0e012978bf8ce28f062370a 100644 (file)
@@ -112,6 +112,7 @@ 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 );
 
@@ -146,10 +147,11 @@ void wxVtk2DBaseView::ResetView()
 void wxVtk2DBaseView::SetImageToVtkViewer(vtkImageData *imageData)
 {
        int ext[6];
+       imageData->Update();
        imageData->GetWholeExtent(ext);
-       _imageViewer2XYZ->SetExtentDimension( ext[0],ext[1],ext[2],ext[3],ext[4],ext[5] );
        if (_imageViewer2XYZ!=NULL)
        {
+               _imageViewer2XYZ->SetExtentDimension( ext[0],ext[1],ext[2],ext[3],ext[4],ext[5] );
                _imageViewer2XYZ->GetVtkImageViewer2()->SetInput( imageData );
        } // if _imageViewer2XYZ
 
index 88ce1acc9cff550f035abb709da43f47e5dd5132..eb454c97a37b72c888c3602cf80790fc1277e944 100644 (file)
@@ -90,9 +90,7 @@ void wxVtkBaseView::Refresh()  // virtual
 //-------------------------------------------------------------------
 void wxVtkBaseView::RefreshView()  // virtual 
 {
-       printf("EED wxVtkBaseView::RefreshView() \n");
 // EED 10 Oct 2007
-
        #if defined(WIN32)
                GetRenWin()->Render();
        #else
index 69a58bb5e5f907f405d840b44587823baa29db89..bf823640f06f8c218929e53493565cf6c1a9cd43 100644 (file)
@@ -84,7 +84,8 @@ void wxVtkMPR2DView::Configure()
                ((vtkInteractorStyleBaseView*)GetInteractorStyleBaseView())->AddInteractorStyleMaracas( _interactorstylemprview );
        }
 
-       if(img!=NULL){
+       if(img!=NULL)
+       {
                double* origin = img->GetOrigin();
                img->GetExtent(x1,x2,y1,y2,z1,z2);
                img->GetSpacing(spc);