]> Creatis software - creaMaracasVisu.git/commitdiff
#3109 creaMaracasVisu Bug New Normal - branch vtk7itk4 compilation with vtk7
authorEduardo DAVILA <davila@localhost.localdomain>
Fri, 4 Aug 2017 08:19:26 +0000 (10:19 +0200)
committerEduardo DAVILA <davila@localhost.localdomain>
Fri, 4 Aug 2017 08:19:26 +0000 (10:19 +0200)
bbtk/src/bbmaracasvisuAnimationSphere.cxx
bbtk/src/bbmaracasvisuAxeVolume.cxx
bbtk/src/bbmaracasvisuDrawAxe3D.cxx
bbtk/src/bbmaracasvisuDrawAxisTree3D.cxx
bbtk/src/bbmaracasvisuImageActor.cxx
bbtk/src/bbmaracasvisuImageChangeInformation.cxx
bbtk/src/bbmaracasvisuTransferFunctionView.cxx
bbtk/src/bbmaracasvisuTransferFunctionView.h

index dba7dcdf2873d06fc6197423c3a0c8901291205d..887cd0ef0f7ed1c7312dfae79be8cbb579a7555c 100644 (file)
@@ -60,7 +60,12 @@ void AnimationSphere::Process()
                        vtksphere->SetRadius( 1  ); 
 
                vtkPolyDataMapper       *sphereMapper   = vtkPolyDataMapper::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                        sphereMapper->SetInput( vtksphere->GetOutput() );
+#else
+                       sphereMapper->SetInputData( vtksphere->GetOutput() );
+#endif
 
                sphereActor             = vtkActor::New();
                        sphereActor->SetMapper(sphereMapper);
@@ -144,7 +149,14 @@ void AnimationSphere::Process()
                                w2i = vtkWindowToImageFilter::New();
                                png = vtkPNGWriter::New();
                                w2i->SetInput( bbGetInputRenderer()->GetRenderWindow() );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                                png->SetInput( w2i->GetOutput() );     
+#else
+                               png->SetInputData( w2i->GetOutput() );     
+#endif
+
                                png->SetFileName( newFileName.c_str() );
                                png->Write();
                                png->Delete();
index 24d2ef0a68db885ac7d427e50d2709d917c5e0a7..1a72bb5e4a55e8daf80b77784cd5c8f716081092 100644 (file)
@@ -91,8 +91,13 @@ void AxeVolume::Process()
        mimage->SetDimensions(bbGetInputIn()->GetDimensions());
        mimage->SetExtent(bbGetInputIn()->GetExtent());
        mimage->SetOrigin(bbGetInputIn()->GetOrigin());
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        mimage->SetScalarType( outputformat );
        mimage->AllocateScalars();
+#else
+       mimage->AllocateScalars( outputformat , 1);
+#endif
 
     int sizeLstPointR  = bbGetInputlstPointR().size();
        int iAxe,sizeAxe        = bbGetInputlstPointX().size();
index fa7a0cfe5c7ebf9fed64923660ecd44af0e51a30..f7be326c61962da3983b7cab719e1fe130671dd1 100644 (file)
@@ -120,7 +120,13 @@ void DrawAxe3D::bbUserSetDefaultValues()
                polydatamapper = vtkPolyDataMapper::New();
                mvtkactor      = vtkActor::New();
                
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                polydatamapper->SetInput(mallData);
+#else
+               polydatamapper->SetInputData(mallData);
+#endif
+
                mvtkactor->SetMapper(polydatamapper);
                bbSetOutputOut(mvtkactor);
        }
index fec824099408a2b00eace62478298500b02845c7..33bb1d776f08bac7cbcf4ca07a452cc746da09f7 100644 (file)
@@ -49,7 +49,12 @@ void DrawAxisTree3D::DrawOneAxis(int iGeneral,int numPoints, int iAxis)
        vtkActor                        *vtkactor               = vtkActor::New();
 
 //     polydatamapper->ScalarVisibilityOff();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        polydatamapper->SetInput(polydata);
+#else
+       polydatamapper->SetInputData(polydata);
+#endif
        vtkactor->SetMapper(polydatamapper);
 
        vecVtkPolyData.push_back( polydata );
index dcbac3431771099a0c8cc2018b7be9c631810391..ad6c30cb2375184283a1179561b447f22aa0c0bb 100644 (file)
@@ -43,9 +43,20 @@ void ImageActor::Process()
 
                if(img != NULL){
                        
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                        imageshiftscale->SetInput( img );       
+#else
+                       imageshiftscale->SetInputData( img );   
+#endif
                        imageshiftscale->SetOutputScalarTypeToUnsignedChar();   
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                        imageactor->SetInput( imageshiftscale->GetOutput() );   
+#else
+                       imageactor->SetInputData( imageshiftscale->GetOutput() );       
+#endif
                        if (transform!=NULL){
                          imageactor->SetUserTransform( transform );    
                        } // transform
index 2c0e5108500a2cced85ddf2a6d121acb0420c5d4..a0de9cef608751ca5b47490a31679cc98f5dfb54 100644 (file)
@@ -47,7 +47,14 @@ void ImageChangeInformation::Process()
                origin[1]=0.0;
                origin[2]=0.0;
                img->SetOrigin(origin);         
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                mchange->SetInput( img );
+#else
+               mchange->SetInputData( img );
+#endif
+
 //EED 2016 15 06
 //             mchange->SetExtentTranslation( -ext[0], -ext[2], -ext[4] );
                mchange->SetOutputOrigin (0, 0, 0);
index ca7fa29fa7413104d3910684d0a77424bf1fe457..640d4f02c7ce13642dacee0ecb9f36cbd7249ece 100644 (file)
@@ -106,8 +106,12 @@ void TransferFunctionView::onColorChange()
                _ctfun->AddRGBPoint( greylevelcolors[i] , red[i],green[i], blue[i]);
        }               
 
-       
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        _tfun->Update();
+#else
+  //...
+#endif
        bbSetOutputOpacityFunction(_tfun);
        bbSetOutputColorFunction(_ctfun );
        bbSetOutputActive( mwxwidget->GetActive() );
index 665858503caa9a13c20e2e2a039b702f19051fdf..3bbcf899e72851ea8476de624a0f283d63558d51 100644 (file)
@@ -70,11 +70,11 @@ class /*BBTK_EXPORT*/ TransferFunctionView
 
   private:
        //HistogramWidget *mwxwidget;
-         HistogramDialogComboBox *mwxwidget;
-       vtkImageData* _currentimg;
+         HistogramDialogComboBox       *mwxwidget;
+       vtkImageData*                           _currentimg;
        
-       vtkPiecewiseFunction* _tfun;
-       vtkColorTransferFunction* _ctfun;
+       vtkPiecewiseFunction*           _tfun;
+       vtkColorTransferFunction*       _ctfun;
 };