]> Creatis software - creaMaracasVisu.git/commitdiff
#3109 creaMaracasVisu Bug New Normal - branch vtk7itk4 compilation with vtk7
authorEduardo DAVILA <davila@localhost.localdomain>
Thu, 10 Aug 2017 10:01:35 +0000 (12:01 +0200)
committerEduardo DAVILA <davila@localhost.localdomain>
Thu, 10 Aug 2017 10:01:35 +0000 (12:01 +0200)
CMakeLists.txt
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkClipping3DDataViewer.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkClipping3DDataViewer.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkMPR3DDataViewer.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkClipping3DView.cxx

index d699297bad3e3027e489d303a08c0797c28f9f4e..4b8e3d7ba7bcf4f079135017af67ceeb65ab12c6 100644 (file)
@@ -52,8 +52,8 @@ ENDIF(BUILD_TESTING)
 #-----------------------------------------------------------------------------
 
 SET(PROJECT_MAJOR_VERSION 1)
-SET(PROJECT_MINOR_VERSION 1)
-SET(PROJECT_BUILD_VERSION 1)
+SET(PROJECT_MINOR_VERSION 2)
+SET(PROJECT_BUILD_VERSION 0)
 
 #==================================
 
index 1e723a13e09b5973e0d1cbf9aa096a721d2c89ac..68f8c2b75f5fa08e0e83ec3a3cbc1ccd4155f3f9 100644 (file)
@@ -60,9 +60,7 @@ vtkClipping3DDataViewer::~vtkClipping3DDataViewer()
                _tissuePlanes[i]->Delete();
                _tissueClipper[i]->Delete();
        }
-       _outlineData->Delete();
-       _mapOutline->Delete();
-       _outline->Delete();
+
        // Volume
        _tfun->Delete();
        _ctfun->Delete();
@@ -78,11 +76,7 @@ vtkClipping3DDataViewer::~vtkClipping3DDataViewer()
        }
        _observerV-> Delete();
 }
-//-------------------------------------------------------------------
-vtkActor* vtkClipping3DDataViewer::GetOutlineActor()
-{
-       return _outline;
-}
+
 //-------------------------------------------------------------------
 vtkClipPolyData* vtkClipping3DDataViewer::GetTissueClipper(int id)
 {
@@ -260,16 +254,18 @@ void vtkClipping3DDataViewer::Configure_Tissue()
                imagedata->GetExtent(x1,x2,y1,y2,z1,z2);
                _tissuePlanes[i]->SetBounds  (x1,x2,y1,y2,z1,z2);
                _tissueClipper[i] = vtkClipPolyData::New();
+               _tissueClipper[i]->SetClipFunction( _tissuePlanes[i] );
+               _tissueClipper[i]->InsideOutOn( );
 
 //EED 2017-01-01 Migration VTK7
 #if VTK_MAJOR_VERSION <= 5
                _tissueClipper[i]->SetInput( _tissueStripper[i]->GetOutput() );
 #else
                _tissueClipper[i]->SetInputData( _tissueStripper[i]->GetOutput() );
+               printf("EED vtkClipping3DDataViewer::Configure_Tissue Update\n");
+               _tissueClipper[i]->Update();
 #endif
 
-               _tissueClipper[i]->SetClipFunction( _tissuePlanes[i] );
-               _tissueClipper[i]->InsideOutOn( );
                _tissueMapper[i] = vtkPolyDataMapper::New( );
 
 //EED 2017-01-01 Migration VTK7
@@ -277,6 +273,7 @@ void vtkClipping3DDataViewer::Configure_Tissue()
                _tissueMapper[i]->SetInput( _tissueClipper[i]->GetOutput() );
 #else
                _tissueMapper[i]->SetInputData( _tissueClipper[i]->GetOutput() );
+               _tissueMapper[i]->Update();
 #endif
 
 
@@ -529,25 +526,6 @@ void vtkClipping3DDataViewer::Configure()
        Configure_Tissue();
        Configure_Volume();
     Configure_VolumeBox();
-  // An outline provides context around the data.
-  //
-       _outlineData    = vtkOutlineFilter::New();
-
-//EED 2017-01-01 Migration VTK7
-#if VTK_MAJOR_VERSION <= 5
-    _outlineData->SetInput((vtkDataSet *) _vtkmprbasedata->GetImageData() );
-#else
-    _outlineData->SetInputData((vtkDataSet *) _vtkmprbasedata->GetImageData() );
-#endif
-
-       _mapOutline     = vtkPolyDataMapper::New();
-
-//EED 4 nov 2015 Estelle 
-//    _mapOutline->SetInput(_outlineData->GetOutput());
-
-       _outline        = vtkActor::New();
-    _outline->SetMapper(_mapOutline);
-    _outline->GetProperty()->SetColor(0,0,0);
 }
 
 
index 2822ca362155a76d04fee6b5ff64cd1dc34258b4..0c998de28443cfb425a546aaa6eba842586191d0 100644 (file)
@@ -57,7 +57,8 @@ public:
        virtual ~vtkClipping3DDataViewer();
 
 //     vtkImageActor*                  GetImageActor(int id);
-       vtkActor*                               GetOutlineActor();
+
+
        vtkClipPolyData*                GetTissueClipper(int id);
        vtkPolyDataMapper*              GetTissueMapper(int id);
        vtkPlanes*                              GetTissuePlanes(int id);
@@ -146,11 +147,6 @@ private:
        vtkPlanes                               *_tissuePlanes[ VTKMPRDATA_MAXTISSUE ];
        vtkClipPolyData                 *_tissueClipper[ VTKMPRDATA_MAXTISSUE ];
 
-       // outline
-       vtkOutlineFilter                *_outlineData;
-       vtkPolyDataMapper               *_mapOutline;
-       vtkActor                                *_outline;
-
        /// Volume
        vtkPiecewiseFunction            *_tfun;
        vtkColorTransferFunction        *_ctfun;
index e43df9aa9ca1882dcb6e674f76ae7ab745037440..f35206765b43494bb0fc6c36e5063b224b5656d7 100644 (file)
@@ -281,16 +281,16 @@ void vtkMPR3DDataViewer::Configure()
                        _saggitalColors = vtkImageMapToColors::New();
                }
                _saggitalColors->RemoveAllInputs();
+       //    _saggitalColors->SetLookupTable(_bwLut);
+               _saggitalColors->SetLookupTable(_ctfun);
 //EED 2017-01-01 Migration VTK7
 #if VTK_MAJOR_VERSION <= 5
                _saggitalColors->SetInput( _vtkmprbasedata->GetImageData() );
 #else
                _saggitalColors->SetInputData( _vtkmprbasedata->GetImageData() );
+               _saggitalColors->Update();
 #endif
                
-       //    _saggitalColors->SetLookupTable(_bwLut);
-               
-               _saggitalColors->SetLookupTable(_ctfun);
                
 
                if(_saggital==NULL)
@@ -317,16 +317,17 @@ void vtkMPR3DDataViewer::Configure()
                }
 
                _axialColors->RemoveAllInputs();
+       //    _axialColors->SetLookupTable(_hueLut);
+               _axialColors->SetLookupTable(_ctfun);
 
 //EED 2017-01-01 Migration VTK7
 #if VTK_MAJOR_VERSION <= 5
                _axialColors->SetInput( _vtkmprbasedata->GetImageData() );
 #else
                _axialColors->SetInputData( _vtkmprbasedata->GetImageData() );
+               _axialColors->Update();
 #endif
 
-       //    _axialColors->SetLookupTable(_hueLut);
-               _axialColors->SetLookupTable(_ctfun);
 
                if(_axial==NULL)
                {
@@ -351,16 +352,17 @@ void vtkMPR3DDataViewer::Configure()
                        _coronalColors = vtkImageMapToColors::New();
                }
                _coronalColors->RemoveAllInputs();
+       //    _coronalColors->SetLookupTable(_satLut);
+               _coronalColors->SetLookupTable(_ctfun);
 
 //EED 2017-01-01 Migration VTK7
 #if VTK_MAJOR_VERSION <= 5
                _coronalColors->SetInput( _vtkmprbasedata->GetImageData() );
 #else
                _coronalColors->SetInputData( _vtkmprbasedata->GetImageData() );
+               _coronalColors->Update();
 #endif
 
-       //    _coronalColors->SetLookupTable(_satLut);
-               _coronalColors->SetLookupTable(_ctfun);
 
                if(_coronal==NULL)
                {
@@ -391,6 +393,7 @@ void vtkMPR3DDataViewer::Configure()
                        _outlineData->SetInput((vtkDataSet *) _vtkmprbasedata->GetImageData() );
 #else
                        _outlineData->SetInputData((vtkDataSet *) _vtkmprbasedata->GetImageData() );
+                       _outlineData->Update();    
 #endif
                } // if _image
 
index 99fad9d0c4426b44050d5452c4c7294b7389dd8c..bdbf0b50573dfc6513386a5699c9c0c0d6702032 100644 (file)
@@ -655,41 +655,35 @@ void wxMPRWidget::ConfigureVTK(){
        if (_vtkmprbasedata!=NULL)
        {
                _vtkmprbasedata->Configure();
-               x=_vtkmprbasedata                       ->      GetMaxPositionX()/2;
-               y=_vtkmprbasedata                       ->      GetMaxPositionY()/2;
-               z=_vtkmprbasedata                       ->      GetMaxPositionZ()/2;    
+               x = _vtkmprbasedata->GetMaxPositionX()/2;
+               y = _vtkmprbasedata->GetMaxPositionY()/2;
+               z = _vtkmprbasedata->GetMaxPositionZ()/2;       
                _vtkmprbasedata->SetX( x );
                _vtkmprbasedata->SetY( y );
                _vtkmprbasedata->SetZ( z );
        
        }
 
-       if(_vtkmpr2Dview[0]!=NULL) {_vtkmpr2Dview[0]                            ->      Configure();}
-       if(_vtkmpr2Dview[1]!=NULL) {_vtkmpr2Dview[1]                            ->      Configure();}
-       if(_vtkmpr2Dview[2]!=NULL) {_vtkmpr2Dview[2]                            ->      Configure();}
+       if(_vtkmpr2Dview[0]!=NULL)              { _vtkmpr2Dview[0]->Configure();                                        }
+       if(_vtkmpr2Dview[1]!=NULL)              { _vtkmpr2Dview[1]->Configure();                                        }
+       if(_vtkmpr2Dview[2]!=NULL)              { _vtkmpr2Dview[2]->Configure();                                        }
 
+       if (_vtkmpr2Dview_B[0]!=NULL)   { _vtkmpr2Dview_B[0]->Configure();                                      }
+       if (_vtkmpr2Dview_B[1]!=NULL)   { _vtkmpr2Dview_B[1]->Configure();                                      }
+       if (_vtkmpr2Dview_B[2]!=NULL)   { _vtkmpr2Dview_B[2]->Configure();                                      }
 
-       if (_vtkmpr2Dview_B[0]!=NULL) { _vtkmpr2Dview_B[0]                              ->      Configure(); }
-       if (_vtkmpr2Dview_B[1]!=NULL) { _vtkmpr2Dview_B[1]                              ->      Configure(); }
-       if (_vtkmpr2Dview_B[2]!=NULL) { _vtkmpr2Dview_B[2]                              ->      Configure(); }
+       if (_vtkplane2Dview!=NULL)              { _vtkplane2Dview->Configure();                                         }
+       if (_widgetMesure!=NULL)                { _widgetMesure->ConfigureA(_vtkplane2Dview);           }
+       if (_widgetMesure!=NULL)                { _widgetMesure->SetActiveLink(true);                           }
+       if (_wxsphereview!=NULL)                { _wxsphereview->Configure();                                           }
 
+       if (_wxvtk3Dbaseview_MPRClipping3D!=NULL){_wxvtk3Dbaseview_MPRClipping3D->Configure();}
+       if (_wxvtkmpr3Dview!=NULL)              { _wxvtkmpr3Dview->Configure();                                         }
+       if (_wxvtkclipping3Dview!=NULL) { _wxvtkclipping3Dview->Configure();                            }
 
-       
-
-       if (_vtkplane2Dview!=NULL){_vtkplane2Dview                              ->      Configure();}
-       if (_widgetMesure!=NULL){_widgetMesure                                  ->      ConfigureA(_vtkplane2Dview);}
-       if (_widgetMesure!=NULL){_widgetMesure                                  ->      SetActiveLink(true);}
-       if (_wxsphereview!=NULL){_wxsphereview                                  ->      Configure();}
-
-       if (_wxvtk3Dbaseview_MPRClipping3D!=NULL){_wxvtk3Dbaseview_MPRClipping3D        ->  Configure();}
-       if (_wxvtkmpr3Dview!=NULL){
-               _wxvtkmpr3Dview                                 ->      Configure();
-       }
-       if (_wxvtkclipping3Dview!=NULL){_wxvtkclipping3Dview            ->      Configure();}
-
-       if (_vtkplane2Dview_B!=NULL){   _vtkplane2Dview_B                       ->      Configure(); }
-       if (_widgetMesure_B!=NULL){             _widgetMesure_B                         ->      ConfigureA( _vtkplane2Dview_B ); }
-       if (_widgetMesure_B!=NULL){             _widgetMesure_B                         ->      SetActiveLink(true); }
+       if (_vtkplane2Dview_B!=NULL)    { _vtkplane2Dview_B->Configure();                                       }
+       if (_widgetMesure_B!=NULL)              { _widgetMesure_B->ConfigureA( _vtkplane2Dview_B ); }
+       if (_widgetMesure_B!=NULL)              { _widgetMesure_B->SetActiveLink(true);                         }
 
 //EEDx3
 //     double spc[3];
index 6172e1deccc61e81d1d13a96305a8d62eddedb55..4fd2218353644285d17e92081f29d6bbfaf60ea3 100644 (file)
@@ -168,7 +168,6 @@ void wxVtkClipping3DView::Configure()
        _wxvtk3Dbaseview->Configure();
 
        // Actors are added to the renderer.
-       _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkclipping3Ddataviewer->GetOutlineActor() );
 
        _boxWidgetS1 = vtkBoxWidget::New();
        _boxWidgetS1->SetInteractor( _wxvtk3Dbaseview->GetWxVTKRenderWindowInteractor() );