Skip to content

Commit

Permalink
ENH: Update ITK to version 4.13.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
Woundorf authored and scalahater committed Mar 5, 2020
1 parent 571c551 commit ecb9f80
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 38 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ matrix:
- PATH="$QTDIR/bin:$PATH"
- LDFLAGS=-L$QTDIR/lib
- CPPFLAGS=-I$QTDIR/include
- wget -nv --directory-prefix=$HOME http:https://trueta.udg.edu/apt/macos/devel/0.15/starviewer-sdk-macos-0.15-1.tar.xz
- wget -nv --directory-prefix=$HOME http:https://trueta.udg.edu/apt/macos/devel/0.15/starviewer-sdk-macos-0.15-2.tar.xz
- mkdir ~/sdk-0.15
- tar xf ~/starviewer-sdk-macos-0.15-1.tar.xz -C ~/sdk-0.15
- tar xf ~/starviewer-sdk-macos-0.15-2.tar.xz -C ~/sdk-0.15

script:
- cd starviewer
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ RUN apt-get install -qq libwrap0 libwrap0-dev zlib1g zlib1g-dev libssl-dev
RUN rm -rf /var/lib/apt/lists/*
RUN unset DEBIAN_FRONTEND

RUN wget -nv --directory-prefix=/ http:https://trueta.udg.edu/apt/ubuntu/devel/0.15/starviewer-sdk-linux-0.15-1.tar.xz
RUN wget -nv --directory-prefix=/ http:https://trueta.udg.edu/apt/ubuntu/devel/0.15/starviewer-sdk-linux-0.15-2.tar.xz
RUN mkdir /sdk-0.15
RUN tar xf /starviewer-sdk-linux-0.15-1.tar.xz -C /sdk-0.15
RUN tar xf /starviewer-sdk-linux-0.15-2.tar.xz -C /sdk-0.15

ENV SDK_INSTALL_PREFIX /sdk-0.15/usr/local
ENV LD_LIBRARY_PATH /sdk-0.15/usr/local/lib:/sdk-0.15/usr/local/lib/x86_64-linux-gnu
Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ install:
- ps: |
# Setup precompiled SDK
$source = "http:https://trueta.udg.edu/apt/windows/devel/0.15/starviewer-sdk-win$env:BITS-0.15-1.7z"
$destination = "c:\starviewer-sdk-win$env:BITS-0.15-1.7z"
$source = "http:https://trueta.udg.edu/apt/windows/devel/0.15/starviewer-sdk-win$env:BITS-0.15-2.7z"
$destination = "c:\starviewer-sdk-win$env:BITS-0.15-2.7z"
Invoke-WebRequest $source -OutFile $destination
7z x $destination -oc:\ > 7z-output.txt
Expand Down
2 changes: 1 addition & 1 deletion sdk/library_versions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Si existeix vol dir que cal aplicar tots els patch que hi hagi en aquest directo

- Qt 5.6.3
- DCMTK 3.6.1-20120515
- ITK 4.10.0
- ITK 4.13.0
- VTK 8.1.1
- gdcm 2.8.6
- ThreadWeaver 5.3.0
10 changes: 4 additions & 6 deletions sdk/scripts/unix/config/itk.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#!/bin/bash

# Call gdcm configuration script to make sure GDCMCMAKEDIR is set
# This script in turn calls vtk configuration script, so VTKCMAKEDIR will also be set
. "$SCRIPTS_ROOT/config/gdcm.sh"

SOURCE_DIR="$SOURCE_DIR_BASE/InsightToolkit-4.10.0"
SOURCE_DIR="$SOURCE_DIR_BASE/InsightToolkit-4.13.0"

if [ $BUILD_TYPE = debug ]
then
Expand Down Expand Up @@ -33,9 +32,8 @@ CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE:STRING=$CMAKE_BUILD_TYPE \
-DModule_ITKRegistrationCommon:BOOL=TRUE \
-DModule_ITKVTK:BOOL=TRUE \
-DITK_USE_SYSTEM_GDCM:BOOL=TRUE \
-DGDCM_DIR:PATH=$GDCMCMAKEDIR \
-DVTK_DIR:PATH=$VTKCMAKEDIR"
-DGDCM_DIR:PATH=$GDCMCMAKEDIR"

ITKCMAKEDIR="$SDK_INSTALL_PREFIX/lib/cmake/ITK-4.10"
ITKCMAKEDIR="$SDK_INSTALL_PREFIX/lib/cmake/ITK-4.13"
ITKLIBDIR="$SDK_INSTALL_PREFIX/lib"
ITKINCLUDEDIR="$SDK_INSTALL_PREFIX/include/ITK-4.10"
ITKINCLUDEDIR="$SDK_INSTALL_PREFIX/include/ITK-4.13"
6 changes: 3 additions & 3 deletions sdk/scripts/unix/sdk_download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ do
'https://github.com/malaterre/GDCM/archive/v2.8.6.tar.gz'
;;
itk)
download_and_verify ea0011fc99a6303427b236c3ceaf54688224350ce1a216b64c9771ab3194b15f \
'InsightToolkit-4.10.0.tar.xz' \
'http:https://downloads.sourceforge.net/project/itk/itk/4.10/InsightToolkit-4.10.0.tar.xz' # https fails in mac
download_and_verify feb3fce3cd3bf08405e49da30876dc766e5145c821e5e3f8736df1d1717da125 \
'InsightToolkit-4.13.0.tar.xz' \
'https:https://freefr.dl.sourceforge.net/project/itk/itk/4.13/InsightToolkit-4.13.0.tar.xz'
;;
ecm)
download_and_verify ea8b6a648b7b2dc313df709940813c22ed5b68d2f7bef30acbaf2a83a6e4c723 \
Expand Down
2 changes: 1 addition & 1 deletion sdk/scripts/unix/sdk_extract.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ do
tar -C "${SOURCE_DIR_BASE}" -xvf "${DOWNLOAD_PREFIX}/GDCM-2.8.6.tar.gz"
;;
itk)
tar -C "${SOURCE_DIR_BASE}" -xvf "${DOWNLOAD_PREFIX}/InsightToolkit-4.10.0.tar.xz"
tar -C "${SOURCE_DIR_BASE}" -xvf "${DOWNLOAD_PREFIX}/InsightToolkit-4.13.0.tar.xz"
;;
ecm)
mkdir -p "${SOURCE_DIR_BASE}/threadweaver-5.3.0"
Expand Down
12 changes: 5 additions & 7 deletions sdk/scripts/windows/config/itk.cmd
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
REM Call gdcm configuration script to make sure GdcmDir is set
REM This script in turn calls vtk configuration script, so VtkDir will also be set
call "%ScriptsRoot%\config\gdcm.cmd"

set SourceDir=%SourceDirPrefix%\ITK-4.10.0
set BuildDir=%BuildDirPrefix%\ITK-4.10.0
set SourceDir=%SourceDirPrefix%\ITK-4.13.0
set BuildDir=%BuildDirPrefix%\ITK-4.13.0

if %BuildType% == debug (
set CMakeBuildType=Debug
set BuildDir=%BuildDir%-deb
set InstallPrefix=%SdkInstallPrefix%/InsightToolkit/4.10.0d
set InstallPrefix=%SdkInstallPrefix%/InsightToolkit/4.13.0d
)
if %BuildType% == release (
set CMakeBuildType=RelWithDebInfo
set BuildDir=%BuildDir%-rel
set InstallPrefix=%SdkInstallPrefix%/InsightToolkit/4.10.0
set InstallPrefix=%SdkInstallPrefix%/InsightToolkit/4.13.0
)

REM ============== Nothing should need to be changed below this line ==============
Expand All @@ -32,5 +31,4 @@ set CMakeOptions=-DCMAKE_BUILD_TYPE:STRING=%CMakeBuildType% ^
-DModule_ITKRegistrationCommon:BOOL=TRUE ^
-DModule_ITKVTK:BOOL=TRUE ^
-DITK_USE_SYSTEM_GDCM=TRUE ^
-DGDCM_DIR:PATH="%GdcmDir%" ^
-DVTK_DIR:PATH="%VtkDir%"
-DGDCM_DIR:PATH="%GdcmDir%"
6 changes: 3 additions & 3 deletions starviewer/src/defaultdirectories.pri
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ isEmpty(VTKINCLUDEDIR){
ITKLIBDIR = $$(ITKLIBDIR)
isEmpty(ITKLIBDIR){
unix:ITKLIBDIR = $$SDK_INSTALL_PREFIX/lib
win32:ITKLIBDIR = $$SDK_INSTALL_PREFIX/InsightToolkit/4.10.0/lib
win32:ITKLIBDIR = $$SDK_INSTALL_PREFIX/InsightToolkit/4.13.0/lib
}
ITKINCLUDEDIR = $$(ITKINCLUDEDIR)
isEmpty(ITKINCLUDEDIR){
unix:ITKINCLUDEDIR = $$SDK_INSTALL_PREFIX/include/ITK-4.10
win32:ITKINCLUDEDIR = $$SDK_INSTALL_PREFIX/InsightToolkit/4.10.0/include/ITK-4.10
unix:ITKINCLUDEDIR = $$SDK_INSTALL_PREFIX/include/ITK-4.13
win32:ITKINCLUDEDIR = $$SDK_INSTALL_PREFIX/InsightToolkit/4.13.0/include/ITK-4.13
}

# GDCM Libraries
Expand Down
14 changes: 3 additions & 11 deletions starviewer/src/itk.pri
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ include(defaultdirectories.pri)

INCLUDEPATH += $${ITKINCLUDEDIR}

ITKLIBSUFFIX = -4.10
ITKLIBSUFFIX = -4.13
ITKLIBS = \
ITKCommon \
ITKMetaIO \
Expand All @@ -26,20 +26,12 @@ ITKLIBS = \
itkdouble-conversion \
ITKTransform

win32 {
ITKLIBS += itktiff \
itkpng \
itkzlib

LIBS += -lShell32
}

LIBS += -L$${ITKLIBDIR}

for(lib, ITKLIBS) {
LIBS += -l$${lib}$${ITKLIBSUFFIX}
}

unix {
LIBS += -ldl
}
win32:LIBS += -lShell32
unix:LIBS += -ldl

0 comments on commit ecb9f80

Please sign in to comment.