From: guigues Date: Fri, 15 Feb 2008 08:46:17 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: r0.6.1~200 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=1549130608fe5eaec31c965f16babae0795a4afd;p=bbtk.git *** empty log message *** --- diff --git a/kernel/appli/bbfy/bbfy.cpp b/kernel/appli/bbfy/bbfy.cpp index 7ec9442..dce426a 100644 --- a/kernel/appli/bbfy/bbfy.cpp +++ b/kernel/appli/bbfy/bbfy.cpp @@ -275,19 +275,19 @@ void bbfy::ParseXML() } // UserConstructor body - if (BB.nChildNode("constructor")) + if (BB.nChildNode("userconstructor")) { - bbtk::GetTextOrClear(BB.getChildNode("constructor"),mUserConstructor); + bbtk::GetTextOrClear(BB.getChildNode("userconstructor"),mUserConstructor); } // UserCopyConstructor body - if (BB.nChildNode("copyconstructor")) + if (BB.nChildNode("usercopyconstructor")) { - bbtk::GetTextOrClear(BB.getChildNode("copyconstructor"),mUserCopyConstructor); + bbtk::GetTextOrClear(BB.getChildNode("usercopyconstructor"),mUserCopyConstructor); } // UserDestructor body - if (BB.nChildNode("destructor")) + if (BB.nChildNode("userdestructor")) { - bbtk::GetTextOrClear(BB.getChildNode("destructor"),mUserDestructor); + bbtk::GetTextOrClear(BB.getChildNode("userdestructor"),mUserDestructor); } // Template parameters @@ -666,8 +666,8 @@ void bbfy::CreateHeader() // Process if ((mType == STD)||(mProcess.size())) { - mFile << " BBTK_PROCESS(DoProcess);\n" ; - mFile << " void DoProcess();\n"; + mFile << " BBTK_PROCESS(Process);\n" ; + mFile << " void Process();\n"; } else if (mType == itkImageToImageFilter) { @@ -683,8 +683,8 @@ void bbfy::CreateHeader() // CreateWidget if (mIsWidget) { - mFile << " BBTK_CREATE_WIDGET(DoCreateWidget);\n" ; - mFile << " void DoCreateWidget();\n"; + mFile << " BBTK_CREATE_WIDGET(CreateWidget);\n" ; + mFile << " void CreateWidget();\n"; } @@ -992,14 +992,14 @@ void bbfy::CreateCode() // Process if ((mType == STD)||(mProcess.size())) { - mFile << "void "<::const_iterator i; diff --git a/packages/BoxCategories.txt b/packages/BoxCategories.txt index 4d829ce..e46e607 100644 --- a/packages/BoxCategories.txt +++ b/packages/BoxCategories.txt @@ -1,18 +1,25 @@ -adaptor -application -atomic box -complex box -demo -filter -image -interaction -math -mesh -misc -read/write -test -viewer -widget +=== Here are the current categories === +Those with a ? are submitted for approval ... -If no category found : adds ' NONE' +adaptor : Adaptor box +application : Final application +atomic box : System category. + Automatically assigned to Atomic Black Boxes (c++ defined) +complex box : System category. + Automatically assigned to Complex Black Boxes (script defined) +? command line : Script which defines a command line application. +demo : Demonstration +? devel : Developer tool (bbCreatePackage.bbs, ...) +example : Example script showing a box use-case +filter : +image : Image processing related box +interaction : +math : +mesh : Mesh processing related box +misc : A box that cannot be put in other category ! +read/write : Box that read or write data from or to disk +test : REMOVED : UPDATE BOXES ! +? tool : ? +viewer : Box which displays some data +widget : Piece of graphical interface diff --git a/packages/itk/data/CMakeLists.txt b/packages/itk/data/CMakeLists.txt new file mode 100644 index 0000000..eb2556d --- /dev/null +++ b/packages/itk/data/CMakeLists.txt @@ -0,0 +1,4 @@ +#=========================================================================== +# Include package data configuration cmake script from bbtk dir +INCLUDE(${BBTK_CMAKE_DIR}/BBTKConfigurePackage_data.cmake) +#=========================================================================== diff --git a/packages/std/data/CMakeLists.txt b/packages/std/data/CMakeLists.txt new file mode 100644 index 0000000..eb2556d --- /dev/null +++ b/packages/std/data/CMakeLists.txt @@ -0,0 +1,4 @@ +#=========================================================================== +# Include package data configuration cmake script from bbtk dir +INCLUDE(${BBTK_CMAKE_DIR}/BBTKConfigurePackage_data.cmake) +#=========================================================================== diff --git a/packages/vtk/CMakeLists.txt b/packages/vtk/CMakeLists.txt index 0d14c3d..bae5271 100644 --- a/packages/vtk/CMakeLists.txt +++ b/packages/vtk/CMakeLists.txt @@ -110,6 +110,7 @@ SET(${BBTK_PACKAGE_NAME}_INCLUDE_DIRS # - bbtk dirs # - automatically handled libraries or packages : wx, vtk... (see above) # - the dirs automatically set by other libraries found by FIND_PACKAGE + ../std/src ) #=========================================================================== diff --git a/packages/vtk/data/CMakeLists.txt b/packages/vtk/data/CMakeLists.txt new file mode 100644 index 0000000..eb2556d --- /dev/null +++ b/packages/vtk/data/CMakeLists.txt @@ -0,0 +1,4 @@ +#=========================================================================== +# Include package data configuration cmake script from bbtk dir +INCLUDE(${BBTK_CMAKE_DIR}/BBTKConfigurePackage_data.cmake) +#=========================================================================== diff --git a/packages/vtk/src/bbvtkImageDataToString.cxx b/packages/vtk/src/bbvtkImageDataToString.cxx new file mode 100644 index 0000000..5bcdd96 --- /dev/null +++ b/packages/vtk/src/bbvtkImageDataToString.cxx @@ -0,0 +1,75 @@ +/*========================================================================= + + Program: bbtk + Module: $RCSfile: bbvtkImageDataToString.cxx,v $ + Language: C++ + Date: $Date: 2008/02/15 08:46:19 $ + Version: $Revision: 1.1 $ + + Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de + l'Image). All rights reserved. See Doc/License.txt or + http://www.creatis.insa-lyon.fr/Public/bbtk/License.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +/** + * \file + * \brief + */ + + +#ifdef _USE_VTK_ + +#include "bbstdToString.h" +#include "vtkImageData.h" +#include "bbvtkPackage.h" + +typedef vtkImageData* vtkImageDataPtr; +typedef const vtkImageData* vtkImageDataConstPtr; + +namespace bbtk +{ + // BBTK_DEFINE_HUMAN_READABLE_TYPE_NAME(vtkImageDataPtr,"vtkImageDataPtr"); + // BBTK_DEFINE_HUMAN_READABLE_TYPE_NAME(vtkImageDataConstPtr,"vtkImageDataConstPtr"); +} + +namespace bbstd +{ + //==================================================================== + BBTK_USER_BLACK_BOX_TEMPLATE_IMPLEMENTATION(ToString, + bbtk::AtomicBlackBox); + //==================================================================== + + + //==================================================================== + template <> void ToString ::DoIt() + { + vtkImageData* im = bbGetInputIn(); + int dim[3]; + im->GetDimensions(dim); + + std::ostringstream str; + str << "vtkImageData [" + << dim[0] << "," + << dim[1] << "," + << dim[2] << "]"; + + bbSetOutputOut( str.str() ); //bbGetInputIn()->GetInfoString() ); + } + //==================================================================== +} + + +using namespace bbstd; +namespace bbvtk +{ + //==================================================================== + // Add the specialized adaptors to the package + BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(vtk,ToString,vtkImageDataPtr); +} + + +#endif // _USE_VTK_ diff --git a/packages/vtk/src/bbvtkImageDataToString.h b/packages/vtk/src/bbvtkImageDataToString.h new file mode 100644 index 0000000..41b3f5a --- /dev/null +++ b/packages/vtk/src/bbvtkImageDataToString.h @@ -0,0 +1,37 @@ +/*========================================================================= + + Program: bbtk + Module: $RCSfile: bbvtkImageDataToString.h,v $ + Language: C++ + Date: $Date: 2008/02/15 08:46:19 $ + Version: $Revision: 1.1 $ + + Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de + l'Image). All rights reserved. See Doc/License.txt or + http://www.creatis.insa-lyon.fr/Public/bbtk/License.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*//** + * \brief Short description in one line + * + * Long description which + * can span multiple lines + */ +/** + * \file + * \brief Pattern for the definition of a new type of Node (header) + */ +/** + * \class bbtk::NodePatern + * \brief Pattern for the definition of a new type of Node + */ + + +#ifdef _USE_VTK_ + + + +#endif //_USE_VTK_ \ No newline at end of file diff --git a/packages/vtk/src/bbvtkMetaImageReader.xml b/packages/vtk/src/bbvtkMetaImageReader.xml index 8c50c78..d254bc4 100644 --- a/packages/vtk/src/bbvtkMetaImageReader.xml +++ b/packages/vtk/src/bbvtkMetaImageReader.xml @@ -13,6 +13,11 @@ +
+   SetFileName(bbGetInputIn().c_str());
+   Update();
+ 
+ diff --git a/packages/wx/data/CMakeLists.txt b/packages/wx/data/CMakeLists.txt new file mode 100644 index 0000000..eb2556d --- /dev/null +++ b/packages/wx/data/CMakeLists.txt @@ -0,0 +1,4 @@ +#=========================================================================== +# Include package data configuration cmake script from bbtk dir +INCLUDE(${BBTK_CMAKE_DIR}/BBTKConfigurePackage_data.cmake) +#===========================================================================