From: davila Date: Thu, 25 Sep 2014 12:37:04 +0000 (+0200) Subject: #2456 BBTK Feature New Normal - package BBTK vtk : vtkpolydata Get Element X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=cd2c70a981f0321260e3a9f126f065dd4eb53a1a;p=bbtk.git #2456 BBTK Feature New Normal - package BBTK vtk : vtkpolydata Get Element --- diff --git a/packages/std/src/bbstdMagicBox.cxx b/packages/std/src/bbstdMagicBox.cxx index 8b99a75..1a66b5c 100644 --- a/packages/std/src/bbstdMagicBox.cxx +++ b/packages/std/src/bbstdMagicBox.cxx @@ -47,7 +47,6 @@ namespace bbstd if (bbGetInputActive()==false) { -printf("EED MagicBox::bbComputePostProcessStatus 1\n"); // Update the output statuses IOStatus new_output_status = UPTODATE; OutputConnectorMapType::iterator o; @@ -77,14 +76,8 @@ printf("EED MagicBox::bbComputePostProcessStatus 1\n"); { if (bbGetInputActive()==true) { -printf("EED MagicBox::DoProcess Start %p\n", this); bbSetOutputOut( bbGetInputIn() ); -printf("EED MagicBox::DoProcess End\n"); } // Active - else - { - printf("EED MagicBox::DoProcess FALSE\n"); - } } BBTK_ADD_BLACK_BOX_TO_PACKAGE(std,MagicBox); diff --git a/packages/vtk/src/bbvtkGetVectorElement.cxx b/packages/vtk/src/bbvtkGetVectorElement.cxx index 48e2690..818e5e7 100644 --- a/packages/vtk/src/bbvtkGetVectorElement.cxx +++ b/packages/vtk/src/bbvtkGetVectorElement.cxx @@ -37,7 +37,7 @@ #include "bbvtkGetVectorElement.h" #include "bbvtkPackage.h" -#include "vtkImageData.h" + namespace bbvtk { @@ -49,8 +49,8 @@ namespace bbvtk //==================================================================== // Add the specialized boxes to the package -typedef vtkImageData * ptrvtkImageData; BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(vtk,GetVectorElement,ptrvtkImageData); +BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(vtk,GetVectorElement,ptrvtkPolyData); //==================================================================== diff --git a/packages/vtk/src/bbvtkGetVectorElement.h b/packages/vtk/src/bbvtkGetVectorElement.h index e73c571..94903be 100644 --- a/packages/vtk/src/bbvtkGetVectorElement.h +++ b/packages/vtk/src/bbvtkGetVectorElement.h @@ -39,6 +39,9 @@ #include "bbtkAtomicBlackBox.h" #include "bbvtk_EXPORT.h" +#include "vtkImageData.h" +#include "vtkPolyData.h" + namespace bbvtk { //================================================================= @@ -56,11 +59,30 @@ namespace bbvtk }; //================================================================= + + typedef vtkImageData* ptrvtkImageData; + typedef vtkPolyData* ptrvtkPolyData; + +// BBTK_DEFINE_HUMAN_READABLE_TYPE_NAME( ptrvtkImageData ,"PtrvtkImageData"); +// BBTK_DEFINE_HUMAN_READABLE_TYPE_NAME( ptrvtkPolyData ,"PtrvtkPolyData"); +// BBTK_DEFINE_HUMAN_READABLE_VECTOR_TYPE_NAME(ptrvtkImageData); +// BBTK_DEFINE_HUMAN_READABLE_VECTOR_TYPE_NAME(ptrvtkPolyData); + //================================================================= // BlackBox description BBTK_BEGIN_DESCRIBE_TEMPLATE_BLACK_BOX(GetVectorElement,bbtk::AtomicBlackBox); + + std::string humantypename; + if (bbtk::HumanTypeName()==bbtk::HumanTypeName()) { humantypename="VtkPolyData"; } + if (bbtk::HumanTypeName()==bbtk::HumanTypeName()) { humantypename="VtkImageData"; } + + BBTK_NAME("GetVector"+humantypename+"Element"); + +// BBTK_NAME("GetVector"+bbtk::HumanTypeName()+"Element"); + // BBTK_NAME("Get"+bbtk::HumanTypeName >()+"Element"); - BBTK_NAME("GetVectorVtkImageDataElement"); +// BBTK_NAME("GetVector"+"T"+"Element"); +// BBTK_NAME("GetVectorVtkImageDataElement"); BBTK_AUTHOR("info-dev@creatis.insa-lyon.fr"); // BBTK_DEFAULT_ADAPTOR(); BBTK_DESCRIPTION("Gets the i-th element from the input vector ("+bbtk::TypeName >());