creadll=$generationdir/creatools_bin/creaBin
if [ $OperatingSystem = "MacOS" ]
then
- #duplicate form creaTools_name.sh?? //FCY
+ #duplicate form creaTools_name.sh?? //FCY
DYLD_LIBRARY_PATH=$creadll:$DYLD_LIBRARY_$PATH
else
LD_LIBRARY_PATH=$creadll:$LD_LIBRARY_$PATH
if [ $OperatingSystem = "MacOS" ]
then
#duplicate form creaTools_name.sh?? //FCY
- DYLD_LIBRARY_PATH=$creamaracasdll:$DYLD_LIBRARY_$PATH
+ DYLD_LIBRARY_PATH=$creamaracasdll:$DYLD_LIBRARY_$PATH
else
LD_LIBRARY_PATH=$creamaracasdll:$LD_LIBRARY_$PATH
fi
if [ $OperatingSystem = "MacOS" ]
then
-#duplicate form creaTools_name.sh?? //FCY
+ #duplicate form creaTools_name.sh?? //FCY
DYLD_LIBRARY_PATH=$creaimagedll:$DYLD_LIBRARY_$PATH
else
LD_LIBRARY_PATH=$creaimagedll:$LD_LIBRARY_$PATH
fi
echo "we remove old stuff"
- rm -rf $sourcesDir/InsightToolkit*
- rm -rf $binDir/InsightToolkit*
-
+ if [ $ITKVersion = ITK3 ]
+ then
+ rm -rf $sourcesDir/InsightToolkit*
+ rm -rf $binDir/InsightToolkit*
+ else
+ rm -rf $sourcesDir/ITK*
+ rm -rf $binDir/ITKt*
+ fi
cd $sourcesDir
echo "we download new stuff"
- if [ $OperatingSystem = "MacOS" ]
- then
- curl -O http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/InsightToolkit-3.20.0.tar.gz
- # MacOS, clever enough to understand it *has* to uncompress, doesn't understand tar -z :-(
- tar -xvf InsightToolkit-3.20.0.tar.gz
- else
- wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/InsightToolkit-3.20.0.tar.gz
- tar -xzvf InsightToolkit-3.20.0.tar.gz
- fi
+ if [ $ITKVersion = ITK3 ]
+ then
+ # deal with ITK3
+ if [ $OperatingSystem = "MacOS" ]
+ then
+ curl -O http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/InsightToolkit-3.20.0.tar.gz
+ else
+ wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/InsightToolkit-3.20.0.tar.gz
+ fi
+ tar -xzvf InsightToolkit-3.20.0.tar.gz
+ else
+ # deal with ITK4
+ if [ $OperatingSystem = "MacOS" ]
+ then
+ curl -O http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/ITK4.0.tgz
+ else
+ wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/ITK4.0.tgz
+ fi
+ tar -xzvf ITK4.0.tgz
+ fi
+
+#fi # JPR ------------1
if [ $buildType = "Debug" ]
then
#if [ true = false ]
if [ true = true ]
then
- libname=InsightToolkit-3.20.0
+ if [ $ITKVersion = ITK3 ]
+ then
+ libname=InsightToolkit-3.20.0
+ else
+ libname=ITK
+ fi
+
dirInstall=$binDir/$libname-Bin
export ITK_DIR=$installPrefixThird/lib/InsightToolkit/
mkdir $dirInstall
##cmake -G"CodeBlocks - Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/
cmake -D USE_DEBUG_LIB:BOOL=$buildType -D CMAKE_INSTALL_PREFIX:PATH=$installPrefixThird CMakeCache.txt
cmake -D BUILD_EXAMPLES:BOOL=OFF -D BUILD_TESTING:BOOL=OFF -D BUILD_SHARED_LIBS:BOOL=ON -D ITK_USE_REVIEW:BOOL=ON CMakeCache.txt
+ if [ $ITKVersion = ITK4 ]
+ then
+ cmake -D ITKV3_COMPATIBILITY:BOOL=ON -D ITKGroup_Nonunit:BOOL=ON -D ITKGroup_IO:BOOL=ON -D Module_ITK-Deprecated:BOOL=ON -D Module_ITK-Review:BOOL=ON CMakeCache.txt
+ fi
#uncomment following line if you want to use the bleeding edge of GDCM2!
#cmake -D ITK_USE_SYSTEM_GDCM:BOOL=ON CMakeCache.txt
cmake CMakeCache.txt
echo export PATH='$'PATH:$installPrefixThird/bin >> $installPrefixThird/share/creatools_third_party_library_config.sh
echo export VTK_DIR=$installPrefixThird/lib/vtk-5.6 >> $installPrefixThird/share/creatools_third_party_library_config.sh
-echo export ITK_DIR=$installPrefixThird/lib/InsightToolkit >> $installPrefixThird/share/creatools_third_party_library_config.sh
+if [ $ITKVersion = ITK3 ]
+then
+ echo export ITK_DIR=$installPrefixThird/lib/InsightToolkit >> $installPrefixThird/share/creatools_third_party_library_config.sh
+else
+ echo export ITK_DIR=$installPrefixThird/lib/ >> $installPrefixThird/share/creatools_third_party_library_config.sh
+fi
echo export GDCM_DIR=$installPrefixThird/lib/gdcm >> $installPrefixThird/share/creatools_third_party_library_config.sh
echo export TTH=$installPrefixThird/bin/tth >> $installPrefixThird/share/creatools_third_party_library_config.sh
+
if [ $OperatingSystem = "MacOS" ]
then
echo export DYLD_LIBRARY_PATH='$'DYLD_LIBRARY_PATH:$GDCM_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$VTK_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
fi
+export VTK_DIR=$installPrefixThird/lib/vtk-5.6
+if [ $ITKVersion = ITK3 ]
+then
+ export ITK_DIR=$installPrefixThird/lib/InsightToolkit
+else
+ export ITK_DIR=$installPrefixThird/lib/
+fi
+
+export GDCM_DIR=$installPrefixThird/lib/gdcm
+export TTH=$installPrefixThird/bin/tth
+
sed -i -e '/.*installPrefixThird*/ d' $ETC_BASHRC
sed -i -e '/.*creatools_third_party_library_config.*/ d' $ETC_BASHRC