+Basic instructions here.
+Read http://www.creatis.insa-lyon.fr/creatools
+or ./kernel/doc/bbtkWebSite/install.html
+for details
+
***********
** LINUX **
***********
- 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
==== 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
** 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 !
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)
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)
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)
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)
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)
IF(WIN32)
SET(${BBTK_PACKAGE_NAME}_LIBS
${${BBTK_PACKAGE_NAME}_LIBS}
- ${BBTK_WXWIDGETS_LIBRARIES}
+ ${WXWIDGETS_LIBRARIES}
)
ENDIF(WIN32)
ELSE(BBTK_CORE_PACKAGE)
IF(WIN32)
SET(${BBTK_PACKAGE_NAME}_LIBS
${${BBTK_PACKAGE_NAME}_LIBS}
- ${BBTK_WXWIDGETS_LIBRARIES}
+ ${WXWIDGETS_LIBRARIES}
)
ENDIF(WIN32)
ENDIF(NOT BBTK_BUILT_WITH_WX)
#---------------------------------------------------------------------------
-
+MESSAGE(STATUS "")
+MESSAGE(STATUS "=======================================")
+MESSAGE(STATUS "${BBTK_PACKAGE_NAME} link libraries:")
+MESSAGE(STATUS "${${BBTK_PACKAGE_NAME}_LIBS}")
+MESSAGE(STATUS "=======================================")
+MESSAGE(STATUS "")
#---------------------------------------------------------------------------
# Recurse into subdirs
/* XPM */
-static char *delete_xpm[] = {
+static const char *delete_xpm[] = {
/* columns rows colors chars-per-pixel */
"16 15 21 1",
"2 c #A5AEBD",
/* XPM */
-static char * down_xpm[] = {
+static const char * down_xpm[] = {
"16 15 3 1",
" c None",
". c Black",
/* XPM */
-static char * eldel_xpm[] = {
+static const char * eldel_xpm[] = {
"16 16 3 1",
" c None",
". c #7F0000",
/* XPM */
-static char * eldown_xpm[] = {
+static const char * eldown_xpm[] = {
"16 16 2 1",
" c None",
". c #000000",
/* XPM */
-static char *exefile_xpm[] = {
+static const char *exefile_xpm[] = {
/* columns rows colors chars-per-pixel */
"16 16 51 1",
"% c #E8E8EC",
/* XPM */
-static char *fileopen_xpm[] = {
+static const char *fileopen_xpm[] = {
/* columns rows colors chars-per-pixel */
"16 15 36 1",
"6 c #9BACC2",
/* XPM */
-static char *filesave_xpm[] = {
+static const char *filesave_xpm[] = {
/* columns rows colors chars-per-pixel */
"16 15 21 1",
"O c #FFFFFF",
/* XPM */
-static char *filesaveas_xpm[] = {
+static const char *filesaveas_xpm[] = {
/* columns rows colors chars-per-pixel */
"16 15 23 1",
"X c Black",
/* XPM */
-static char *new_xpm[] = {
+static const char *new_xpm[] = {
/* columns rows colors chars-per-pixel */
"16 15 29 1",
"* c #97C4E7",
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)
#-----------------------------------------------------------------------------
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 $
=========================================================================*/
/* ---------------------------------------------------------------------
// ==> 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 : '"<<mBin_path<<"'"<<std::endl);
bbtkMessage("Config",1," ==> prefix : '"<<mInstall_path<<"'"<<std::endl);
bbtkMessage("Config",1," ==> doc : '"<<mDoc_path<<"'"<<std::endl);
// bbs_paths
// always add "." (current working directory) at the begining
- mBbs_paths.push_back( "." );
+ mBbs_paths.push_back( "." );
// add system bbs path
mBbs_paths.push_back(mBbs_path);
// add toolsbbtk/appli
for (iStrVec=0;iStrVec<sizeStrVec;iStrVec++){
Utilities::replace( mBbs_paths[iStrVec] , INVALID_FILE_SEPARATOR , VALID_FILE_SEPARATOR);
}
-
+
// always add "." (current working directory) at the begining
mPackage_paths.push_back(".");
// add system bin path (for build tree / standalone folder install)
mPackage_paths.push_back(mBin_path);
// add system lib path (for install tree)
-//EED mPackage_paths.push_back(mInstall_path + mFile_separator + "lib");
+ //EED mPackage_paths.push_back(mInstall_path + mFile_separator + "lib");
mPackage_paths.push_back(mInstall_path + "/lib");
#ifdef WIN32
// add bin/Debug bin/Release paths (for build/install tree)
-//EED mPackage_paths.push_back(mBin_path + mFile_separator + "Debug");
+ //EED mPackage_paths.push_back(mBin_path + mFile_separator + "Debug");
mPackage_paths.push_back(mBin_path + "/Debug");
-//EED mPackage_paths.push_back(mBin_path + mFile_separator + "Release");
+ //EED mPackage_paths.push_back(mBin_path + mFile_separator + "Release");
mPackage_paths.push_back(mBin_path + "/Release");
#endif
-
- sizeStrVec = mPackage_paths.size();
- for (iStrVec=0;iStrVec<sizeStrVec;iStrVec++){
- Utilities::replace( mPackage_paths[iStrVec] , INVALID_FILE_SEPARATOR , VALID_FILE_SEPARATOR);
- }
-
-
-
+
+ sizeStrVec = mPackage_paths.size();
+ for (iStrVec=0;iStrVec<sizeStrVec;iStrVec++){
+ Utilities::replace( mPackage_paths[iStrVec] , INVALID_FILE_SEPARATOR , VALID_FILE_SEPARATOR);
+ }
+
+
+
GetHelp(2);
-
+
// ==> First we look for bbtk_config.xml in "."
char buf[2048];
const char *currentDir = getcwd(buf, 2048);
// 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 <<
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 $
=========================================================================*/
/* ---------------------------------------------------------------------
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);
/* XPM */
-static char * cc_exit_xpm[] = {
+static const char * cc_exit_xpm[] = {
"32 32 703 2",
" c None",
". c #C78D8D",
/* XPM */
-static char * cc_new_xpm[] = {
+static const char * cc_new_xpm[] = {
"32 32 93 2",
" c None",
". c #F5F5F5",
/* XPM */
-static char * cc_open_xpm[] = {
+static const char * cc_open_xpm[] = {
"32 32 149 2",
" c None",
". c #858585",
/* XPM */
-static char * cc_run_xpm[] = {
+static const char * cc_run_xpm[] = {
"32 32 374 2",
" c None",
". c #E9E9EB",
/* XPM */
-static char * cc_save_xpm[] = {
+static const char * cc_save_xpm[] = {
"32 32 196 2",
" c None",
". c #020202",
/* XPM */
-static char * cc_save_as_xpm[] = {
+static const char * cc_save_as_xpm[] = {
"32 32 267 2",
" c None",
". c #020202",
/* XPM */
-static char * cc_stop_xpm[] = {
+static const char * cc_stop_xpm[] = {
"32 32 399 2",
" c None",
". c #D40505",
# - 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
)
#===========================================================================
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
#include "bbtkAtomicBlackBox.h"
#include "iostream"
-#include <vtkTransform.h>
-#include <vtkLinearTransform.h>
+#include "vtkTransform.h"
+//#include <vtkLinearTransform.h>
namespace bbvtk
{
{
vtkImageGaussianSmooth *vtkimagegaussiansmooth;
- int i,size = VecVtkimagegaussiansmooth.size();
+ int i,size = (int)VecVtkimagegaussiansmooth.size();
for (i=0 ; i<size ; i++)
{
VecVtkimagegaussiansmooth[i]->Delete();
double stdvY=bbGetInputStdDevY();
double stdvZ=bbGetInputStdDevZ();
- size=bbGetInputIn().size();
+ size=(int)bbGetInputIn().size();
for (i=0 ; i<size ; i++)
{
vtkimagegaussiansmooth = vtkImageGaussianSmooth::New();
VecVtkimagegaussiansmooth.push_back(vtkimagegaussiansmooth);
} //for i
bbSetOutputOut(VecResult);
- if (bbGetInputiImage() < VecResult.size())
+ if (bbGetInputiImage() < (int)VecResult.size())
{
bbSetOutputOutImage(VecResult[bbGetInputiImage()]);
} //if
# - 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
)
#===========================================================================