]> Creatis software - creaVtk.git/commitdiff
#3461 clean box Actor
authorEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Wed, 28 Apr 2021 17:05:18 +0000 (19:05 +0200)
committerEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Wed, 28 Apr 2021 17:05:18 +0000 (19:05 +0200)
bbtk_creaVtk_PKG/src/bbcreaVtkActor.cxx

index 19626b8aac4d263007a3a74caff0a1a77f3158de..2d52f394429bb1d012155eada8377f2c9cafab45 100644 (file)
@@ -33,42 +33,43 @@ void Actor::Process()
 //    std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
  
 
-     vtkProp3D* vtkprop3D=bbGetInputIn();
-
-
-    std::string className = vtkprop3D->GetClassName();
-    std::string wantedClass = "vtkOpenGLActor";
-    if(className == wantedClass)
-    {
-       vtkActor *vtkactor=((vtkActor*)vtkprop3D);
-               vtkactor->GetProperty()->SetOpacity( bbGetInputOpacity() );
-               vtkactor->GetProperty()->SetLineWidth( bbGetInputLineWidth() );
-               double r = bbGetInputColor()[0];
-               double g = bbGetInputColor()[1];
-               double b = bbGetInputColor()[2];
-               vtkactor->GetProperty()->SetColor( r,g,b );
-    }
-     
-     if ( bbGetInputTransform()!=NULL )
-     {
-        vtkprop3D->SetUserTransform( bbGetInputTransform() );
-     }
-
-//     bbSetOutputOut( vtkactor );
-
-     // Interface Update
-
-    if ((bbGetInputRenderer()!=NULL) && ( backActive!=bbGetInputActive() ))
+       if (bbGetInputIn()!=NULL)
        {
-       
-       if (bbGetInputActive()==true )
-       {
-                       bbGetInputRenderer()->AddActor( vtkprop3D );
-       }  else {
-                       bbGetInputRenderer()->RemoveActor( vtkprop3D );
-       }  //if Active
-               backActive=bbGetInputActive();
-       } // if Renderer
+               vtkProp3D* vtkprop3D=bbGetInputIn();
+               std::string className = vtkprop3D->GetClassName();
+               std::string wantedClass = "vtkOpenGLActor";
+               if(className == wantedClass)
+               {
+                       vtkActor *vtkactor=((vtkActor*)vtkprop3D);
+                       vtkactor->GetProperty()->SetOpacity( bbGetInputOpacity() );
+                       vtkactor->GetProperty()->SetLineWidth( bbGetInputLineWidth() );
+                       double r = bbGetInputColor()[0];
+                       double g = bbGetInputColor()[1];
+                       double b = bbGetInputColor()[2];
+                       vtkactor->GetProperty()->SetColor( r,g,b );
+               }
+                
+                if ( bbGetInputTransform()!=NULL )
+                {
+                   vtkprop3D->SetUserTransform( bbGetInputTransform() );
+                }
+
+       //     bbSetOutputOut( vtkactor );
+
+                // Interface Update
+
+               if ((bbGetInputRenderer()!=NULL) && ( backActive!=bbGetInputActive() ))
+               {
+               
+                       if (bbGetInputActive()==true )
+                       {
+                               bbGetInputRenderer()->AddActor( vtkprop3D );
+                       }  else {
+                               bbGetInputRenderer()->RemoveActor( vtkprop3D );
+                       }  //if Active
+                       backActive=bbGetInputActive();
+               } // if Renderer
+       }// bbGetInputIn
 
 }
 //=====