]> Creatis software - bbtk.git/blobdiff - packages/vtk/src/bbvtkSphereList.cxx
#3212 BBTK Feature New Normal - vtk8itk4wx3-mingw64
[bbtk.git] / packages / vtk / src / bbvtkSphereList.cxx
index 616f088d4b5093246a909ec71b00e15bcad69b65..cde4561ad0c8eb6e629f2c7bc3a26c3afa8d2fcd 100644 (file)
@@ -42,17 +42,15 @@ double SphereList::GetRadio(int i)
 {
     double radio;
        if ( bbGetInputlstRadio().size()==0 )
-        {
-            radio = 1.0;
-        } else if ( i<bbGetInputlstRadio().size() )
+    {
+               radio = 1.0;
+       } else if ( i<bbGetInputlstRadio().size() )
        {
-            radio = bbGetInputlstRadio()[i];
-        } else  
-        {
-            radio = bbGetInputlstRadio()[ bbGetInputlstRadio().size() - 1 ];
-        }  
-
-       return radio;
+               radio = bbGetInputlstRadio()[i];
+       } else {
+       radio = bbGetInputlstRadio()[ bbGetInputlstRadio().size() - 1 ];
+    }  
+       return radio;
 }
 
 
@@ -100,6 +98,8 @@ void SphereList::GetColor(int i, double &cr,double &cg,double &cb)
 
 void SphereList::Process()
 {
+printf("EED SphereList::Process Start\n");
+
        if (bbGetInputRenderer()!=NULL)
        {
                int sizeLstX=bbGetInputlstPointX().size();      
@@ -135,7 +135,15 @@ void SphereList::Process()
                                        newSphere -> SetPhiResolution(20);
                                        newSphere -> SetRadius( 1 ); 
                                        vtkPolyDataMapper * newMapper = vtkPolyDataMapper::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                                        newMapper -> SetInput( newSphere -> GetOutput() );      
+#else
+                                       newSphere -> Update();
+                                       newMapper -> SetInputData( newSphere -> GetOutput() );  
+#endif
+
                                        vtkActor * newActor = vtkActor::New();
                                        sphereActor.push_back(newActor);
                                        newActor -> SetMapper(newMapper);
@@ -163,6 +171,7 @@ void SphereList::Process()
                 sphereActor[i] -> GetProperty() -> SetOpacity( bbGetInputOpacity() );
                 sphereActor[i] -> GetProperty() -> SetColor( cr,cg,cb );
                 vtkspheresourceLst[i] -> SetRadius( GetRadio(i) ); 
+                       vtkspheresourceLst[i] -> Update();
                } // for i
 
                if (sphereActor.size() != 0)