From 794bb9fced397e87bb7e93a32d31520a1dee7698 Mon Sep 17 00:00:00 2001 From: davila Date: Fri, 20 Feb 2015 18:34:02 +0100 Subject: [PATCH] #2542 creaVtk Feature New Normal - VectorPolyDataReader DirName --- bbtk_creaVtk_PKG/src/bbcreaVtkVectorPolyDataReader.cxx | 6 ++++-- bbtk_creaVtk_PKG/src/bbcreaVtkVectorPolyDataReader.h | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkVectorPolyDataReader.cxx b/bbtk_creaVtk_PKG/src/bbcreaVtkVectorPolyDataReader.cxx index 25be54c..654a555 100644 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkVectorPolyDataReader.cxx +++ b/bbtk_creaVtk_PKG/src/bbcreaVtkVectorPolyDataReader.cxx @@ -31,12 +31,14 @@ void VectorPolyDataReader::Process() std::vector vecPolyData; + std::string tmpFileName; int i,size=bbGetInputFileNameVector().size(); for (i=0;iSetFileName( bbGetInputFileNameVector()[i].c_str() ); + tmpFileName=bbGetInputDirName() + "/" + bbGetInputFileNameVector()[i]; + reader->SetFileName( tmpFileName.c_str() ); reader->ReadAllScalarsOn(); reader->ReadAllVectorsOn(); reader->ReadAllNormalsOn(); @@ -60,7 +62,7 @@ void VectorPolyDataReader::bbUserSetDefaultValues() // SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX // Here we initialize the input 'In' to 0 -// bbSetInputIn(0); + bbSetInputDirName(""); } //===== diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkVectorPolyDataReader.h b/bbtk_creaVtk_PKG/src/bbcreaVtkVectorPolyDataReader.h index 393eb04..13ba8c2 100644 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkVectorPolyDataReader.h +++ b/bbtk_creaVtk_PKG/src/bbcreaVtkVectorPolyDataReader.h @@ -20,6 +20,7 @@ class bbcreaVtk_EXPORT VectorPolyDataReader //===== // 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(DirName,std::string); BBTK_DECLARE_INPUT(FileNameVector,std::vector); BBTK_DECLARE_OUTPUT(PolyDataVector,std::vector); BBTK_PROCESS(Process); @@ -34,6 +35,7 @@ BBTK_BEGIN_DESCRIBE_BLACK_BOX(VectorPolyDataReader,bbtk::AtomicBlackBox); BBTK_AUTHOR("Info-Dev"); BBTK_DESCRIPTION("No Description."); BBTK_CATEGORY("empty"); + BBTK_INPUT(VectorPolyDataReader,DirName,"DirectoryName",std::string,""); BBTK_INPUT(VectorPolyDataReader,FileNameVector,"String vector with the name of the .vtk files",std::vector,""); BBTK_OUTPUT(VectorPolyDataReader,PolyDataVector,"Std::vector with PolyData(s)",std::vector,""); BBTK_END_DESCRIBE_BLACK_BOX(VectorPolyDataReader); -- 2.47.1