]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkMPR3DDataViewer.cxx
#3109 creaMaracasVisu Bug New Normal - branch vtk7itk4 compilation with vtk7
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / vtkMPR3DDataViewer.cxx
index 242c9bd68a415e957e507a4b342621031bfd4746..e43df9aa9ca1882dcb6e674f76ae7ab745037440 100644 (file)
@@ -142,9 +142,16 @@ std::vector<double>*     vtkMPR3DDataViewer::GetctFunVectorBlue()
 //-------------------------------------------------------------------
 void vtkMPR3DDataViewer::SetImage()
 {
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        _saggitalColors->SetInput( _vtkmprbasedata->GetImageData() );
        _axialColors->SetInput( _vtkmprbasedata->GetImageData() );
        _coronalColors->SetInput( _vtkmprbasedata->GetImageData() );
+#else
+       _saggitalColors->SetInputData( _vtkmprbasedata->GetImageData() );
+       _axialColors->SetInputData( _vtkmprbasedata->GetImageData() );
+       _coronalColors->SetInputData( _vtkmprbasedata->GetImageData() );
+#endif
 }
 
 //-------------------------------------------------------------------
@@ -181,7 +188,12 @@ void vtkMPR3DDataViewer::Configure()
        
        if(_vtkmprbasedata->GetImageData())
        {
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                _vtkmprbasedata->GetImageData()->Update();
+#else
+               // ..
+#endif
                _vtkmprbasedata->GetImageData()->Modified();
                _vtkmprbasedata->GetImageData()->GetScalarRange(range);
                delta = range[1]-range[0];
@@ -269,7 +281,12 @@ void vtkMPR3DDataViewer::Configure()
                        _saggitalColors = vtkImageMapToColors::New();
                }
                _saggitalColors->RemoveAllInputs();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                _saggitalColors->SetInput( _vtkmprbasedata->GetImageData() );
+#else
+               _saggitalColors->SetInputData( _vtkmprbasedata->GetImageData() );
+#endif
                
        //    _saggitalColors->SetLookupTable(_bwLut);
                
@@ -279,7 +296,12 @@ void vtkMPR3DDataViewer::Configure()
                if(_saggital==NULL)
                {
                        _saggital = vtkImageActor::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                        _saggital->SetInput(_saggitalColors->GetOutput());
+#else
+                       _saggital->SetInputData(_saggitalColors->GetOutput());
+#endif
                }       
                //_saggitalColors->Update();
        
@@ -295,14 +317,28 @@ void vtkMPR3DDataViewer::Configure()
                }
 
                _axialColors->RemoveAllInputs();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                _axialColors->SetInput( _vtkmprbasedata->GetImageData() );
+#else
+               _axialColors->SetInputData( _vtkmprbasedata->GetImageData() );
+#endif
+
        //    _axialColors->SetLookupTable(_hueLut);
                _axialColors->SetLookupTable(_ctfun);
 
                if(_axial==NULL)
                {
                        _axial = vtkImageActor::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                        _axial->SetInput(_axialColors->GetOutput());
+#else
+                       _axial->SetInputData(_axialColors->GetOutput());
+#endif
+
                }
                
                //_axialColors->Update();
@@ -315,15 +351,29 @@ void vtkMPR3DDataViewer::Configure()
                        _coronalColors = vtkImageMapToColors::New();
                }
                _coronalColors->RemoveAllInputs();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                _coronalColors->SetInput( _vtkmprbasedata->GetImageData() );
+#else
+               _coronalColors->SetInputData( _vtkmprbasedata->GetImageData() );
+#endif
+
        //    _coronalColors->SetLookupTable(_satLut);
                _coronalColors->SetLookupTable(_ctfun);
 
                if(_coronal==NULL)
                {
                        _coronal = vtkImageActor::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                        _coronal->SetInput(_coronalColors->GetOutput());
-               }
+#else
+                       _coronal->SetInputData(_coronalColors->GetOutput());
+#endif
+
+               } // if _coronal
                
        
 
@@ -332,17 +382,29 @@ void vtkMPR3DDataViewer::Configure()
                if(_outlineData==NULL)
                {
                        _outlineData = vtkOutlineFilter::New();
-               }
+               } // if _outlineData
                _outlineData->RemoveAllInputs();
                if(_vtkmprbasedata->GetImageData())
                {
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                        _outlineData->SetInput((vtkDataSet *) _vtkmprbasedata->GetImageData() );
-               }
+#else
+                       _outlineData->SetInputData((vtkDataSet *) _vtkmprbasedata->GetImageData() );
+#endif
+               } // if _image
 
                if(_mapOutline==NULL)
                {
                        _mapOutline = vtkPolyDataMapper::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                        _mapOutline->SetInput(_outlineData->GetOutput());
+#else
+                       _mapOutline->SetInputData(_outlineData->GetOutput());
+#endif
+
                }
                _mapOutline->Update();    
                //_mapOutline->RemoveAllInputs();