From 71174bb44a65806fe33fe736faba98d8bf8d89e5 Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Fri, 11 Aug 2017 18:24:34 +0200 Subject: [PATCH] #3110 creaVtk Bug New Normal - branch vtk7itk4 compilation with vtk7 --- bbtk_creaVtk_PKG/src/bbcreaVtkActor.cxx | 20 ++++++++++++++----- .../src/bbcreaVtkGenerateArrowSource.h | 4 +--- lib/creaVtk/cutImageSegmentation.cpp | 2 +- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkActor.cxx b/bbtk_creaVtk_PKG/src/bbcreaVtkActor.cxx index 39a3f8e..6b00248 100644 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkActor.cxx +++ b/bbtk_creaVtk_PKG/src/bbcreaVtkActor.cxx @@ -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 = " <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 diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkGenerateArrowSource.h b/bbtk_creaVtk_PKG/src/bbcreaVtkGenerateArrowSource.h index 9ecd02a..2f515a8 100644 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkGenerateArrowSource.h +++ b/bbtk_creaVtk_PKG/src/bbcreaVtkGenerateArrowSource.h @@ -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); 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,""); BBTK_OUTPUT(GenerateArrowSource,ArrowSource,"Arrow Representation",vtkPolyData*,""); BBTK_END_DESCRIBE_BLACK_BOX(GenerateArrowSource); //===== diff --git a/lib/creaVtk/cutImageSegmentation.cpp b/lib/creaVtk/cutImageSegmentation.cpp index 640b099..f898f85 100644 --- a/lib/creaVtk/cutImageSegmentation.cpp +++ b/lib/creaVtk/cutImageSegmentation.cpp @@ -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 -- 2.47.1