- rm -rf $sourcesDir/InsightToolkit*
-
- cd $sourcesDir
-
- 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
- fi
-
+ 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 [ $ITKVersion = ITK3 ]
+ then
+ # deal with ITK3
+ itkfile=InsightToolkit-3.20.0.patchCreatis.tar.gz
+ libname=InsightToolkit-3.20.0
+ else
+ # deal with ITK4
+ itkfile=ITK4.0.tgz
+ libname=ITK
+ fi
+
+ if [ $OperatingSystem = "MacOS" ]
+ then
+ curl -O http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/$itkfile
+ else
+ wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/$itkfile
+ fi
+ tar -xzvf $itkfile
+
+
+#fi # JPR ------------1
+