]> Creatis software - creaVtk.git/commitdiff
#3110 creaVtk Bug New Normal - branch vtk7itk4 compilation with vtk7
authorEduardo DAVILA <davila@localhost.localdomain>
Fri, 11 Aug 2017 16:24:34 +0000 (18:24 +0200)
committerEduardo DAVILA <davila@localhost.localdomain>
Fri, 11 Aug 2017 16:24:34 +0000 (18:24 +0200)
bbtk_creaVtk_PKG/src/bbcreaVtkActor.cxx
bbtk_creaVtk_PKG/src/bbcreaVtkGenerateArrowSource.h
lib/creaVtk/cutImageSegmentation.cpp

index 39a3f8edddc45a47e93bafd2bc18f70d4f04135a..6b002489e95175181c7ef321052d601dbd0b5c8f 100644 (file)
@@ -3,6 +3,9 @@
 //===== 
 #include "bbcreaVtkActor.h"
 #include "bbcreaVtkPackage.h"
+#include "vtkProperty.h"
+
+
 namespace bbcreaVtk
 {
 
@@ -30,12 +33,19 @@ void Actor::Process()
 //    std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
  
 
-     vtkProp3D* vtkactor=bbGetInputIn();
-//     vtkactor->GetProperty()->SetOpacity( bbGetInputOpacity() );
+     vtkProp3D* vtkprop3D=bbGetInputIn();
+
+
+    std::string className = vtkprop3D->GetClassName();
+    std::string wantedClass = "vtkOpenGLActor";
+    if(className == wantedClass)
+    {
+               ((vtkActor*)vtkprop3D)->GetProperty()->SetOpacity( bbGetInputOpacity() );
+    }
      
      if ( bbGetInputTransform()!=NULL )
      {
-        vtkactor->SetUserTransform( bbGetInputTransform() );
+        vtkprop3D->SetUserTransform( bbGetInputTransform() );
      }
 
 //     bbSetOutputOut( vtkactor );
@@ -47,9 +57,9 @@ void Actor::Process()
        
        if (bbGetInputActive()==true )
        {
-                       bbGetInputRenderer()->AddActor( vtkactor );
+                       bbGetInputRenderer()->AddActor( vtkprop3D );
        }  else {
-                       bbGetInputRenderer()->RemoveActor( vtkactor );
+                       bbGetInputRenderer()->RemoveActor( vtkprop3D );
        }  //if Active
                backActive=bbGetInputActive();
        } // if Renderer
index 9ecd02a9edf6d5d6849f384bca1e1d8a147f5fc7..2f515a891b226c78f12b659c35050b32af4f9dec 100644 (file)
@@ -22,7 +22,6 @@ class bbcreaVtk_EXPORT GenerateArrowSource
 //===== 
 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
 //===== 
-  BBTK_DECLARE_INPUT(Point,std::vector<double>);
   BBTK_DECLARE_OUTPUT(ArrowSource,vtkPolyData*);
   BBTK_PROCESS(Process);
   void Process();
@@ -34,9 +33,8 @@ class bbcreaVtk_EXPORT GenerateArrowSource
 BBTK_BEGIN_DESCRIBE_BLACK_BOX(GenerateArrowSource,bbtk::AtomicBlackBox);
 BBTK_NAME("GenerateArrowSource");
 BBTK_AUTHOR("Monica ESPINOSA");
-BBTK_DESCRIPTION("No Description.");
+BBTK_DESCRIPTION("To be used as the source for a glyph");
 BBTK_CATEGORY("empty");
-BBTK_INPUT(GenerateArrowSource,Point,"Coordinate of Point",std::vector<double>,"");
 BBTK_OUTPUT(GenerateArrowSource,ArrowSource,"Arrow Representation",vtkPolyData*,"");
 BBTK_END_DESCRIBE_BLACK_BOX(GenerateArrowSource);
 //===== 
index 640b09910925217c9027a3aad96b7487c23957ff..f898f85d7bee3c7138ca20b8813f0065f2823a67 100644 (file)
@@ -227,7 +227,7 @@ void cutImageSegmentation::Process()
        }//i m_Mesh1 != Null
        else{
 
-               std::cout << "MLER cutImageSegmentation :: NO HAY MESH" << std::endl;
+               std::cout << "MLER cutImageSegmentation :: MESH NOT EXIST" << std::endl;
 
        }//else if m_Mesh1