X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FvtkMPR3DDataViewer.cxx;h=cb1dc1e54e6b971f4456fed694c69f6fe4cc45e0;hb=80b04dc9e3b981e24fe9ae0d81cdeb8af6e6f8c1;hp=45e4f3869ec476ca0f8295b8eca3fc199be8c3c7;hpb=69c806e632999e11e12e8626609f4192d3aec364;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkMPR3DDataViewer.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkMPR3DDataViewer.cxx index 45e4f38..cb1dc1e 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkMPR3DDataViewer.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkMPR3DDataViewer.cxx @@ -141,10 +141,18 @@ std::vector* vtkMPR3DDataViewer::GetctFunVectorBlue() //------------------------------------------------------------------- void vtkMPR3DDataViewer::SetImage() { - _saggitalColors -> SetInput( _vtkmprbasedata->GetImageData() ); - _axialColors -> SetInput( _vtkmprbasedata->GetImageData() ); - _coronalColors -> SetInput( _vtkmprbasedata->GetImageData() ); - _outlineData -> SetInput((vtkDataSet *) _vtkmprbasedata->GetImageData() ); +//EED 2017-01-01 Migration VTK7 +#if VTK_MAJOR_VERSION <= 5 + _saggitalColors ->SetInput( _vtkmprbasedata->GetImageData() ); + _axialColors ->SetInput( _vtkmprbasedata->GetImageData() ); + _coronalColors ->SetInput( _vtkmprbasedata->GetImageData() ); + _outlineData ->SetInput((vtkDataSet *) _vtkmprbasedata->GetImageData() ); +#else + _saggitalColors ->SetInputData( _vtkmprbasedata->GetImageData() ); + _axialColors ->SetInputData( _vtkmprbasedata->GetImageData() ); + _coronalColors ->SetInputData( _vtkmprbasedata->GetImageData() ); + _outlineData ->SetInputData((vtkDataSet *) _vtkmprbasedata->GetImageData() ); +#endif } //------------------------------------------------------------------- @@ -179,7 +187,12 @@ void vtkMPR3DDataViewer::Configure() double delta; 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]; @@ -267,13 +280,27 @@ void vtkMPR3DDataViewer::Configure() _saggitalColors = vtkImageMapToColors::New(); } _saggitalColors->RemoveAllInputs(); - _saggitalColors->SetInput( _vtkmprbasedata->GetImageData() ); + // _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 + + 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(); @@ -285,13 +312,29 @@ void vtkMPR3DDataViewer::Configure() _axialColors = vtkImageMapToColors::New(); } _axialColors->RemoveAllInputs(); - _axialColors->SetInput( _vtkmprbasedata->GetImageData() ); // _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 + 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(); @@ -302,31 +345,61 @@ void vtkMPR3DDataViewer::Configure() _coronalColors = vtkImageMapToColors::New(); } _coronalColors->RemoveAllInputs(); - _coronalColors->SetInput( _vtkmprbasedata->GetImageData() ); // _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 + + 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 // An outline provides context around the data. // 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() ); + _outlineData->Update(); +#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();