From a16b50b85de5ca6a4dfdfbc5656b490e0d358f52 Mon Sep 17 00:00:00 2001 From: guigues Date: Fri, 12 Dec 2008 10:20:40 +0000 Subject: [PATCH] *** empty log message *** --- INSTALL.txt | 43 ++--- kernel/cmake/BBTKAddDefinitions.cmake | 8 +- kernel/cmake/BBTKConfigurePackage.cmake | 19 ++- kernel/data/icons/wxart_delete.xpm | 2 +- kernel/data/icons/wxart_down.xpm | 2 +- kernel/data/icons/wxart_eldel.xpm | 2 +- kernel/data/icons/wxart_eldown.xpm | 2 +- kernel/data/icons/wxart_exefile.xpm | 2 +- kernel/data/icons/wxart_fileopen.xpm | 2 +- kernel/data/icons/wxart_filesave.xpm | 2 +- kernel/data/icons/wxart_filesaveas.xpm | 2 +- kernel/data/icons/wxart_new.xpm | 2 +- kernel/src/CMakeLists.txt | 4 +- kernel/src/bbtkConfigurationFile.cxx | 88 ++++++----- kernel/src/bbtkUtilities.cxx | 6 +- kernel/src/icons/cc_exit.xpm | 2 +- kernel/src/icons/cc_new.xpm | 2 +- kernel/src/icons/cc_open.xpm | 2 +- kernel/src/icons/cc_run.xpm | 2 +- kernel/src/icons/cc_save.xpm | 2 +- kernel/src/icons/cc_save_as.xpm | 2 +- kernel/src/icons/cc_stop.xpm | 2 +- packages/vtk/CMakeLists.txt | 2 + packages/vtk/src/bbvtkTransform.cxx | 148 +++++++++--------- packages/vtk/src/bbvtkTransform.h | 4 +- .../vtk/src/bbvtkVecImageGaussianSmooth.cxx | 6 +- packages/wxvtk/CMakeLists.txt | 2 + 27 files changed, 175 insertions(+), 187 deletions(-) diff --git a/INSTALL.txt b/INSTALL.txt index 3fe4e09..e366bec 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -1,3 +1,8 @@ +Basic instructions here. +Read http://www.creatis.insa-lyon.fr/creatools +or ./kernel/doc/bbtkWebSite/install.html +for details + *********** ** LINUX ** *********** @@ -11,10 +16,8 @@ - press 'g' - type : > make -> sudo make install (if you are a sudoer) -OR -> su -type root password +> su (NOTE: installing as a sudoer usually fails...) +type root password > make install > exit @@ -27,9 +30,7 @@ First, be sure to be logged *WITH YOUR USER NAME, NOT ROOT* ==== UNINSTALL ==== To uninstall bbtk, type : -> sudo bbtk-uninstall (if you are a sudoer) -OR -> su +> su (NOTE: uninstalling as a sudoer usually fails...) type root password > bbtk-uninstall @@ -39,30 +40,4 @@ type root password ** WINDOWS ** ************* -1) -INSTALL SOFA - (See environment variables VTK ITK GDCM WXWIN ..) - -2) -Install from - http://www.creatis.insa-lyon.fr/~davila/bbtk/Software/ - -basic-miktex-2.6.2742.exe - (You have to make update) - -tth_exe.zip (c:\Creatis\tth_exe) - -nsis-2.34-setup.exe - http://www.creatis.insa-lyon.fr/~davila/bbtk/Software/new/ - -graphviz-2.2.1.exe - -doxygen-1.5.3-setup.exe - - -3) -Set the global variables of windows - Start - -> Control Panel - -> System - -> Advance - -> Environment Variables -Ex. - -CREATIS = c:\Creatis\ - +Visit the web site ! diff --git a/kernel/cmake/BBTKAddDefinitions.cmake b/kernel/cmake/BBTKAddDefinitions.cmake index 30014da..68b1506 100644 --- a/kernel/cmake/BBTKAddDefinitions.cmake +++ b/kernel/cmake/BBTKAddDefinitions.cmake @@ -2,10 +2,10 @@ MESSAGE(STATUS "") MESSAGE(STATUS "=======================================") MESSAGE(STATUS "Adding definitions:") # Set C preprocessor definitions -CREA_DEFINE_WITH_VAL(BBTK_SHARE_REL_PATH "${BBTK_SHARE_REL_PATH}") -CREA_DEFINE_WITH_VAL(BBTK_DOC_REL_PATH "${BBTK_DOC_REL_PATH}") -CREA_DEFINE_WITH_VAL(BBTK_BBS_REL_PATH "${BBTK_BBS_REL_PATH}") -CREA_DEFINE_WITH_VAL(BBTK_DATA_REL_PATH "${BBTK_DATA_REL_PATH}") +CREA_DEFINE_WITH_VAL(BBTK_SHARE_REL_PATH ${BBTK_SHARE_REL_PATH}) +CREA_DEFINE_WITH_VAL(BBTK_DOC_REL_PATH ${BBTK_DOC_REL_PATH}) +CREA_DEFINE_WITH_VAL(BBTK_BBS_REL_PATH ${BBTK_BBS_REL_PATH}) +CREA_DEFINE_WITH_VAL(BBTK_DATA_REL_PATH ${BBTK_DATA_REL_PATH}) #----------------------------------------------------------------------------- # messages compilation options IF (BBTK_COMPILE_MESSAGES) diff --git a/kernel/cmake/BBTKConfigurePackage.cmake b/kernel/cmake/BBTKConfigurePackage.cmake index bdace25..a4104a4 100644 --- a/kernel/cmake/BBTKConfigurePackage.cmake +++ b/kernel/cmake/BBTKConfigurePackage.cmake @@ -95,7 +95,7 @@ IF(${BBTK_PACKAGE_NAME}_USE_VTK) SET(USE_VTK ON CACHE BOOL "Use VTK" FORCE) SET(${BBTK_PACKAGE_NAME}_LIBS ${${BBTK_PACKAGE_NAME}_LIBS} - ${BBTK_VTK_LIBRARIES} + ${VTK_LIBRARIES} ) ENDIF(${BBTK_PACKAGE_NAME}_USE_VTK) @@ -103,7 +103,7 @@ IF(${BBTK_PACKAGE_NAME}_USE_ITK) SET(USE_ITK ON CACHE BOOL "Use ITK" FORCE) SET(${BBTK_PACKAGE_NAME}_LIBS ${${BBTK_PACKAGE_NAME}_LIBS} - ${BBTK_ITK_LIBRARIES} + ${ITK_LIBRARIES} ) ENDIF(${BBTK_PACKAGE_NAME}_USE_ITK) @@ -111,7 +111,7 @@ IF(${BBTK_PACKAGE_NAME}_USE_GDCM) SET(USE_GDCM ON CACHE BOOL "Use GDCM" FORCE) SET(${BBTK_PACKAGE_NAME}_LIBS ${${BBTK_PACKAGE_NAME}_LIBS} - ${BBTK_GDCM_LIBRARIES} + ${GDCM_LIBRARIES} ) ENDIF(${BBTK_PACKAGE_NAME}_USE_GDCM) @@ -119,7 +119,7 @@ IF(${BBTK_PACKAGE_NAME}_USE_GSMIS) SET(USE_GSMIS ON CACHE BOOL "Use GSMIS" FORCE) SET(${BBTK_PACKAGE_NAME}_LIBS ${${BBTK_PACKAGE_NAME}_LIBS} - ${BBTK_GSMIS_LIBRARIES} + ${GSMIS_LIBRARIES} ) ENDIF(${BBTK_PACKAGE_NAME}_USE_GSMIS) @@ -131,7 +131,7 @@ IF(${BBTK_PACKAGE_NAME}_USE_WXWIDGETS) IF(WIN32) SET(${BBTK_PACKAGE_NAME}_LIBS ${${BBTK_PACKAGE_NAME}_LIBS} - ${BBTK_WXWIDGETS_LIBRARIES} + ${WXWIDGETS_LIBRARIES} ) ENDIF(WIN32) ELSE(BBTK_CORE_PACKAGE) @@ -144,7 +144,7 @@ IF(${BBTK_PACKAGE_NAME}_USE_WXWIDGETS) IF(WIN32) SET(${BBTK_PACKAGE_NAME}_LIBS ${${BBTK_PACKAGE_NAME}_LIBS} - ${BBTK_WXWIDGETS_LIBRARIES} + ${WXWIDGETS_LIBRARIES} ) ENDIF(WIN32) ENDIF(NOT BBTK_BUILT_WITH_WX) @@ -154,7 +154,12 @@ ENDIF(${BBTK_PACKAGE_NAME}_USE_WXWIDGETS) #--------------------------------------------------------------------------- - +MESSAGE(STATUS "") +MESSAGE(STATUS "=======================================") +MESSAGE(STATUS "${BBTK_PACKAGE_NAME} link libraries:") +MESSAGE(STATUS "${${BBTK_PACKAGE_NAME}_LIBS}") +MESSAGE(STATUS "=======================================") +MESSAGE(STATUS "") #--------------------------------------------------------------------------- # Recurse into subdirs diff --git a/kernel/data/icons/wxart_delete.xpm b/kernel/data/icons/wxart_delete.xpm index b7ecf3a..c2e7ca3 100644 --- a/kernel/data/icons/wxart_delete.xpm +++ b/kernel/data/icons/wxart_delete.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *delete_xpm[] = { +static const char *delete_xpm[] = { /* columns rows colors chars-per-pixel */ "16 15 21 1", "2 c #A5AEBD", diff --git a/kernel/data/icons/wxart_down.xpm b/kernel/data/icons/wxart_down.xpm index f03819e..1f9cf29 100644 --- a/kernel/data/icons/wxart_down.xpm +++ b/kernel/data/icons/wxart_down.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * down_xpm[] = { +static const char * down_xpm[] = { "16 15 3 1", " c None", ". c Black", diff --git a/kernel/data/icons/wxart_eldel.xpm b/kernel/data/icons/wxart_eldel.xpm index 9b83bb0..0a1d6a2 100644 --- a/kernel/data/icons/wxart_eldel.xpm +++ b/kernel/data/icons/wxart_eldel.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * eldel_xpm[] = { +static const char * eldel_xpm[] = { "16 16 3 1", " c None", ". c #7F0000", diff --git a/kernel/data/icons/wxart_eldown.xpm b/kernel/data/icons/wxart_eldown.xpm index 656cb9c..b02d2b1 100644 --- a/kernel/data/icons/wxart_eldown.xpm +++ b/kernel/data/icons/wxart_eldown.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * eldown_xpm[] = { +static const char * eldown_xpm[] = { "16 16 2 1", " c None", ". c #000000", diff --git a/kernel/data/icons/wxart_exefile.xpm b/kernel/data/icons/wxart_exefile.xpm index 4defb73..c231852 100644 --- a/kernel/data/icons/wxart_exefile.xpm +++ b/kernel/data/icons/wxart_exefile.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *exefile_xpm[] = { +static const char *exefile_xpm[] = { /* columns rows colors chars-per-pixel */ "16 16 51 1", "% c #E8E8EC", diff --git a/kernel/data/icons/wxart_fileopen.xpm b/kernel/data/icons/wxart_fileopen.xpm index 50724a8..ba49ed5 100644 --- a/kernel/data/icons/wxart_fileopen.xpm +++ b/kernel/data/icons/wxart_fileopen.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *fileopen_xpm[] = { +static const char *fileopen_xpm[] = { /* columns rows colors chars-per-pixel */ "16 15 36 1", "6 c #9BACC2", diff --git a/kernel/data/icons/wxart_filesave.xpm b/kernel/data/icons/wxart_filesave.xpm index 5c63fcf..4c30738 100644 --- a/kernel/data/icons/wxart_filesave.xpm +++ b/kernel/data/icons/wxart_filesave.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *filesave_xpm[] = { +static const char *filesave_xpm[] = { /* columns rows colors chars-per-pixel */ "16 15 21 1", "O c #FFFFFF", diff --git a/kernel/data/icons/wxart_filesaveas.xpm b/kernel/data/icons/wxart_filesaveas.xpm index 9fb5fca..a17c264 100644 --- a/kernel/data/icons/wxart_filesaveas.xpm +++ b/kernel/data/icons/wxart_filesaveas.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *filesaveas_xpm[] = { +static const char *filesaveas_xpm[] = { /* columns rows colors chars-per-pixel */ "16 15 23 1", "X c Black", diff --git a/kernel/data/icons/wxart_new.xpm b/kernel/data/icons/wxart_new.xpm index 4c2641c..d46e270 100644 --- a/kernel/data/icons/wxart_new.xpm +++ b/kernel/data/icons/wxart_new.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *new_xpm[] = { +static const char *new_xpm[] = { /* columns rows colors chars-per-pixel */ "16 15 29 1", "* c #97C4E7", diff --git a/kernel/src/CMakeLists.txt b/kernel/src/CMakeLists.txt index ae04bd1..eeb1909 100644 --- a/kernel/src/CMakeLists.txt +++ b/kernel/src/CMakeLists.txt @@ -129,11 +129,11 @@ FILE(GLOB SOURCES "." "*.cxx" "*.cpp") FILE(GLOB SOURCES_H "." "*.h" ) IF(BBTK_USE_KWWIDGETS) - IF(KWWIDGETS_FOUND) + IF(KWWidgets_FOUND) include("${KWWidgets_CMAKE_DIR}/KWWidgetsWrappingMacros.cmake") kwwidgets_wrap_tcl(bbtk LIB_TCL_SRCS "vtkKWBlackBoxDialog.cxx" "") SET(SOURCES ${SOURCES} ${LIB_TCL_SRCS}) - ENDIF(KWWIDGETS_FOUND) + ENDIF(KWWidgets_FOUND) ENDIF(BBTK_USE_KWWIDGETS) #----------------------------------------------------------------------------- diff --git a/kernel/src/bbtkConfigurationFile.cxx b/kernel/src/bbtkConfigurationFile.cxx index dbcc49b..4d59d57 100644 --- a/kernel/src/bbtkConfigurationFile.cxx +++ b/kernel/src/bbtkConfigurationFile.cxx @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbtkConfigurationFile.cxx,v $ Language: C++ - Date: $Date: 2008/12/10 10:00:36 $ - Version: $Revision: 1.24 $ + Date: $Date: 2008/12/12 10:20:48 $ + Version: $Revision: 1.25 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -69,39 +69,43 @@ namespace bbtk // ==> Set system paths mBin_path = GetExecutablePath(); -//EED mInstall_path = mBin_path + mFile_separator + ".."; + #ifdef MACOSX - mInstall_path = mBin_path + "/../../../.."; + mInstall_path = mBin_path + "/../../../.."; #else - mInstall_path = mBin_path + "/.."; + mInstall_path = mBin_path + "/.."; #endif - // The relative path to the doc folder (=BBTK_DOC_REL_PATH) + + // The relative path to the doc folder (=BBTK_DOC_REL_PATH) mDoc_rel_path = BBTK_STRINGIFY_SYMBOL(BBTK_DOC_REL_PATH); // The path to the doc folder (=mInstall_path+"/"+mDoc_rel_path) -//EED mDoc_path = mInstall_path + mFile_separator + mDoc_rel_path; mDoc_path = mInstall_path + "/" + mDoc_rel_path; // The relative path to the doc folder (=BBTK_BBS_REL_PATH) mBbs_rel_path = BBTK_STRINGIFY_SYMBOL(BBTK_BBS_REL_PATH); // The path to the bbs folder (=mInstall_path+"/"+mBbs_rel_path) -//EED mBbs_path = mInstall_path + mFile_separator + mBbs_rel_path; mBbs_path = mInstall_path + "/" + mBbs_rel_path; - // The relative path to the rsc folder (=BBTK_RSC_REL_PATH) - // mRsc_rel_path = BBTK_STRINGIFY_SYMBOL(BBTK_RSC_REL_PATH); - // The path to the rsc folder (=mInstall_path+"/"+mRsc_rel_path) - // mRsc_path = mInstall_path + mFile_separator + mRsc_rel_path; - // The path to the bbtk data folder - // Initialized to mInstall_path+"/"+BBTK_DATA_REL_PATH - // But can be overriden by value read from bbtk_config.xml -//EED mData_path = mInstall_path + mFile_separator + BBTK_STRINGIFY_SYMBOL(BBTK_DATA_REL_PATH); + mData_path = mInstall_path + "/" + BBTK_STRINGIFY_SYMBOL(BBTK_DATA_REL_PATH); - - Utilities::replace( mBin_path , INVALID_FILE_SEPARATOR , VALID_FILE_SEPARATOR); - Utilities::replace( mInstall_path , INVALID_FILE_SEPARATOR , VALID_FILE_SEPARATOR); - Utilities::replace( mDoc_rel_path , INVALID_FILE_SEPARATOR , VALID_FILE_SEPARATOR); - Utilities::replace( mDoc_path , INVALID_FILE_SEPARATOR , VALID_FILE_SEPARATOR); - Utilities::replace( mBbs_path , INVALID_FILE_SEPARATOR , VALID_FILE_SEPARATOR); - Utilities::replace( mData_path , INVALID_FILE_SEPARATOR , VALID_FILE_SEPARATOR); - + + Utilities::replace( mBin_path, + INVALID_FILE_SEPARATOR, + VALID_FILE_SEPARATOR); + Utilities::replace( mInstall_path, + INVALID_FILE_SEPARATOR, + VALID_FILE_SEPARATOR); + Utilities::replace( mDoc_rel_path, + INVALID_FILE_SEPARATOR, + VALID_FILE_SEPARATOR); + Utilities::replace( mDoc_path, + INVALID_FILE_SEPARATOR, + VALID_FILE_SEPARATOR); + Utilities::replace( mBbs_path, + INVALID_FILE_SEPARATOR, + VALID_FILE_SEPARATOR); + Utilities::replace( mData_path, + INVALID_FILE_SEPARATOR, + VALID_FILE_SEPARATOR); + bbtkMessage("Config",1," ==> bin : '"< prefix : '"< doc : '"< First we look for bbtk_config.xml in "." char buf[2048]; const char *currentDir = getcwd(buf, 2048); @@ -171,11 +175,11 @@ namespace bbtk // LG : throw an exception } -// std::string configXmlFullPathName = currentDir + mFile_separator + "bbtk_config.xml"; + // std::string configXmlFullPathName = currentDir + mFile_separator + "bbtk_config.xml"; std::string configXmlFullPathName = currentDir ; - configXmlFullPathName += "/bbtk_config.xml"; - Utilities::replace( configXmlFullPathName , INVALID_FILE_SEPARATOR , VALID_FILE_SEPARATOR); - + configXmlFullPathName += "/bbtk_config.xml"; + Utilities::replace( configXmlFullPathName , INVALID_FILE_SEPARATOR , VALID_FILE_SEPARATOR); + if ( Utilities::FileExists( configXmlFullPathName )) { bbtkMessage("Config",1, "ConfigurationFile : [" << configXmlFullPathName << diff --git a/kernel/src/bbtkUtilities.cxx b/kernel/src/bbtkUtilities.cxx index dafd6ce..778b45e 100644 --- a/kernel/src/bbtkUtilities.cxx +++ b/kernel/src/bbtkUtilities.cxx @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbtkUtilities.cxx,v $ Language: C++ - Date: $Date: 2008/11/26 12:49:57 $ - Version: $Revision: 1.9 $ + Date: $Date: 2008/12/12 10:20:48 $ + Version: $Revision: 1.10 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -527,7 +527,7 @@ namespace bbtk std::string ss("\\n"); std::string::size_type pos = 0; pos = s.find(ss,0); - char* cr = "\n"; + const char* cr = "\n"; while ( pos != std::string::npos ) { s.replace(pos,2,cr,1); diff --git a/kernel/src/icons/cc_exit.xpm b/kernel/src/icons/cc_exit.xpm index 1ea8981..453d3fa 100644 --- a/kernel/src/icons/cc_exit.xpm +++ b/kernel/src/icons/cc_exit.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * cc_exit_xpm[] = { +static const char * cc_exit_xpm[] = { "32 32 703 2", " c None", ". c #C78D8D", diff --git a/kernel/src/icons/cc_new.xpm b/kernel/src/icons/cc_new.xpm index 111d223..dd22a48 100644 --- a/kernel/src/icons/cc_new.xpm +++ b/kernel/src/icons/cc_new.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * cc_new_xpm[] = { +static const char * cc_new_xpm[] = { "32 32 93 2", " c None", ". c #F5F5F5", diff --git a/kernel/src/icons/cc_open.xpm b/kernel/src/icons/cc_open.xpm index 77ef4f5..ed98879 100644 --- a/kernel/src/icons/cc_open.xpm +++ b/kernel/src/icons/cc_open.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * cc_open_xpm[] = { +static const char * cc_open_xpm[] = { "32 32 149 2", " c None", ". c #858585", diff --git a/kernel/src/icons/cc_run.xpm b/kernel/src/icons/cc_run.xpm index 63cf415..eaeed15 100644 --- a/kernel/src/icons/cc_run.xpm +++ b/kernel/src/icons/cc_run.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * cc_run_xpm[] = { +static const char * cc_run_xpm[] = { "32 32 374 2", " c None", ". c #E9E9EB", diff --git a/kernel/src/icons/cc_save.xpm b/kernel/src/icons/cc_save.xpm index ef0f248..df4021f 100644 --- a/kernel/src/icons/cc_save.xpm +++ b/kernel/src/icons/cc_save.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * cc_save_xpm[] = { +static const char * cc_save_xpm[] = { "32 32 196 2", " c None", ". c #020202", diff --git a/kernel/src/icons/cc_save_as.xpm b/kernel/src/icons/cc_save_as.xpm index 3978476..a40f877 100644 --- a/kernel/src/icons/cc_save_as.xpm +++ b/kernel/src/icons/cc_save_as.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * cc_save_as_xpm[] = { +static const char * cc_save_as_xpm[] = { "32 32 267 2", " c None", ". c #020202", diff --git a/kernel/src/icons/cc_stop.xpm b/kernel/src/icons/cc_stop.xpm index aa8af9f..398e5d2 100644 --- a/kernel/src/icons/cc_stop.xpm +++ b/kernel/src/icons/cc_stop.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * cc_stop_xpm[] = { +static const char * cc_stop_xpm[] = { "32 32 399 2", " c None", ". c #D40505", diff --git a/packages/vtk/CMakeLists.txt b/packages/vtk/CMakeLists.txt index bae5271..969c10c 100644 --- a/packages/vtk/CMakeLists.txt +++ b/packages/vtk/CMakeLists.txt @@ -111,6 +111,8 @@ SET(${BBTK_PACKAGE_NAME}_INCLUDE_DIRS # - automatically handled libraries or packages : wx, vtk... (see above) # - the dirs automatically set by other libraries found by FIND_PACKAGE ../std/src + # The path to the build tree folder is needed to find bbstd_EXPORT.h + ${PROJECT_BINARY_DIR}/packages/std/src ) #=========================================================================== diff --git a/packages/vtk/src/bbvtkTransform.cxx b/packages/vtk/src/bbvtkTransform.cxx index 6473524..0d53007 100644 --- a/packages/vtk/src/bbvtkTransform.cxx +++ b/packages/vtk/src/bbvtkTransform.cxx @@ -5,86 +5,86 @@ namespace bbvtk { -BBTK_ADD_BLACK_BOX_TO_PACKAGE(vtk,Transform) -BBTK_BLACK_BOX_IMPLEMENTATION(Transform,bbtk::AtomicBlackBox); -void Transform::Process() -{ + BBTK_ADD_BLACK_BOX_TO_PACKAGE(vtk,Transform); + BBTK_BLACK_BOX_IMPLEMENTATION(Transform,bbtk::AtomicBlackBox); + void Transform::Process() + { if (result!=NULL) - { - result->Delete(); - } - result = vtkTransform::New(); - - - if (bbGetInputIn()!=NULL) - { - result->Concatenate( bbGetInputIn()->GetMatrix() ); - } - - - if (bbGetInputScale().size()>=3) - { - result->Scale(bbGetInputScale()[0], bbGetInputScale()[1], bbGetInputScale()[2]); - } - - if ((bbGetInputTranslate().size()>=3) && (bbGetInputSpacing().size()>=3)) - { - double tx = bbGetInputTranslate()[0] * bbGetInputSpacing()[0]; - double ty = bbGetInputTranslate()[1] * bbGetInputSpacing()[1]; - double tz = bbGetInputTranslate()[2] * bbGetInputSpacing()[2]; - result->Translate(tx,ty,tz); - } - - if (bbGetInputRotateWXYZ().size()>=4) - { - result->RotateWXYZ(bbGetInputRotateWXYZ()[0],bbGetInputRotateWXYZ()[1], bbGetInputRotateWXYZ()[2], bbGetInputRotateWXYZ()[3]); - } - - result->Update(); - - bbSetOutputOut(result); -} - - -void Transform::bbUserConstructor() -{ + { + result->Delete(); + } + result = vtkTransform::New(); + + + if (bbGetInputIn()!=NULL) + { + result->Concatenate( bbGetInputIn()->GetMatrix() ); + } + + + if (bbGetInputScale().size()>=3) + { + result->Scale(bbGetInputScale()[0], bbGetInputScale()[1], bbGetInputScale()[2]); + } + + if ((bbGetInputTranslate().size()>=3) && (bbGetInputSpacing().size()>=3)) + { + double tx = bbGetInputTranslate()[0] * bbGetInputSpacing()[0]; + double ty = bbGetInputTranslate()[1] * bbGetInputSpacing()[1]; + double tz = bbGetInputTranslate()[2] * bbGetInputSpacing()[2]; + result->Translate(tx,ty,tz); + } + + if (bbGetInputRotateWXYZ().size()>=4) + { + result->RotateWXYZ(bbGetInputRotateWXYZ()[0],bbGetInputRotateWXYZ()[1], bbGetInputRotateWXYZ()[2], bbGetInputRotateWXYZ()[3]); + } + + result->Update(); + + bbSetOutputOut(result); + } + + + void Transform::bbUserConstructor() + { bbSetInputIn(NULL); - - vecScale.push_back(1); // scale x - vecScale.push_back(1); // scale y - vecScale.push_back(1); // scale z + + vecScale.push_back(1); // scale x + vecScale.push_back(1); // scale y + vecScale.push_back(1); // scale z bbSetInputScale(vecScale); - - vecRotateWXYZ.push_back(0); //angle - vecRotateWXYZ.push_back(1); //vx - vecRotateWXYZ.push_back(0); //vy - vecRotateWXYZ.push_back(0); //vz + + vecRotateWXYZ.push_back(0); //angle + vecRotateWXYZ.push_back(1); //vx + vecRotateWXYZ.push_back(0); //vy + vecRotateWXYZ.push_back(0); //vz bbSetInputRotateWXYZ(vecRotateWXYZ); - - vecTranslate.push_back(0); //tx - vecTranslate.push_back(0); //ty - vecTranslate.push_back(0); //tz + + vecTranslate.push_back(0); //tx + vecTranslate.push_back(0); //ty + vecTranslate.push_back(0); //tz bbSetInputTranslate(vecTranslate); - - vecSpacing.push_back(1); //spacing x - vecSpacing.push_back(1); //spacing y - vecSpacing.push_back(1); //spacing z + + vecSpacing.push_back(1); //spacing x + vecSpacing.push_back(1); //spacing y + vecSpacing.push_back(1); //spacing z bbSetInputTranslate(vecSpacing); - - result = NULL; -} -/* -void Transform::bbUserCopyConstructor() -{ - - -} -*/ -void Transform::bbUserDestructor() -{ - - -} + + result = NULL; + } + /* + void Transform::bbUserCopyConstructor() + { + + + } + */ + void Transform::bbUserDestructor() + { + + + } } // EO namespace bbvtk diff --git a/packages/vtk/src/bbvtkTransform.h b/packages/vtk/src/bbvtkTransform.h index 92b0220..85b979b 100644 --- a/packages/vtk/src/bbvtkTransform.h +++ b/packages/vtk/src/bbvtkTransform.h @@ -3,8 +3,8 @@ #include "bbtkAtomicBlackBox.h" #include "iostream" -#include -#include +#include "vtkTransform.h" +//#include namespace bbvtk { diff --git a/packages/vtk/src/bbvtkVecImageGaussianSmooth.cxx b/packages/vtk/src/bbvtkVecImageGaussianSmooth.cxx index 01b9019..dabc868 100644 --- a/packages/vtk/src/bbvtkVecImageGaussianSmooth.cxx +++ b/packages/vtk/src/bbvtkVecImageGaussianSmooth.cxx @@ -13,7 +13,7 @@ void VecImageGaussianSmooth::Process() { vtkImageGaussianSmooth *vtkimagegaussiansmooth; - int i,size = VecVtkimagegaussiansmooth.size(); + int i,size = (int)VecVtkimagegaussiansmooth.size(); for (i=0 ; iDelete(); @@ -25,7 +25,7 @@ void VecImageGaussianSmooth::Process() double stdvY=bbGetInputStdDevY(); double stdvZ=bbGetInputStdDevZ(); - size=bbGetInputIn().size(); + size=(int)bbGetInputIn().size(); for (i=0 ; i