]> 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 dba7dcd..887cd0e 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 24d2ef0..1a72bb5 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 fa7a0cf..f7be326 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 fec8240..33bb1d7 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 dcbac34..ad6c30c 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 2c0e510..a0de9ce 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 ca7fa29..640d4f0 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 6658585..3bbcf89 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;
 };