Skip to content

Commit

Permalink
ENH: Update GDCM to version 2.8.6.
Browse files Browse the repository at this point in the history
  • Loading branch information
Woundorf authored and scalahater committed Mar 5, 2020
1 parent ca9a393 commit 2a0ac8e
Show file tree
Hide file tree
Showing 16 changed files with 4,358 additions and 4,351 deletions.
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ matrix:
osx_image: xcode8.3
compiler: clang
env:
- SDK_INSTALL_PREFIX="$HOME/uroot/usr/local"
- SDK_INSTALL_PREFIX="$HOME/sdk-0.15/usr/local"
- DYLD_LIBRARY_PATH="$SDK_INSTALL_PREFIX/lib"
- DYLD_FRAMEWORK_PATH="/usr/local/opt/qt5/lib"

Expand All @@ -55,13 +55,13 @@ matrix:
- PATH="$QTDIR/bin:$PATH"
- LDFLAGS=-L$QTDIR/lib
- CPPFLAGS=-I$QTDIR/include
- wget -nv --directory-prefix=$HOME http:https://trueta.udg.edu/apt/macosx/devel/0.14/starviewer-sdk-macosx-0.14-4.tar.xz
- mkdir ~/uroot
- tar xf ~/starviewer-sdk-macosx-0.14-4.tar.xz -C ~/uroot
- wget -nv --directory-prefix=$HOME http:https://trueta.udg.edu/apt/macos/devel/0.15/starviewer-sdk-macos-0.15-0.tar.xz
- mkdir ~/sdk-0.15
- tar xf ~/starviewer-sdk-macos-0.15-0.tar.xz -C ~/sdk-0.15

script:
- cd starviewer
- qmake
- make -j3 | sed 's/\/Applications\/Xcode\.app\/Contents\/Developer/[xcode]/g' | sed -E 's/\/(Users|home)\/travis\/uroot/[uroot]/g'
- make -j3 | sed 's/\/Applications\/Xcode\.app\/Contents\/Developer/[xcode]/g' | sed -E 's/\/(Users|home)\/travis\/sdk-0.15/[sdk]/g'
- cd tests/auto
- ./autotests -silent
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ 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.14/starviewer-sdk-linux-0.14-4.tar.xz
RUN mkdir /sdk-0.14
RUN tar xf /starviewer-sdk-linux-0.14-4.tar.xz -C /sdk-0.14
RUN wget -nv --directory-prefix=/ http:https://trueta.udg.edu/apt/ubuntu/devel/0.15/starviewer-sdk-linux-0.15-0.tar.xz
RUN mkdir /sdk-0.15
RUN tar xf /starviewer-sdk-linux-0.15-0.tar.xz -C /sdk-0.15

ENV SDK_INSTALL_PREFIX /sdk-0.14/usr/local
ENV LD_LIBRARY_PATH /sdk-0.14/usr/local/lib:/sdk-0.14/usr/local/lib/x86_64-linux-gnu
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

WORKDIR /starviewer/starviewer
CMD ["bash"]
10 changes: 5 additions & 5 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 0.14-{build}-{branch}
version: 0.15-{build}-{branch}

environment:
SDK_INSTALL_PREFIX: C:\
Expand All @@ -19,18 +19,18 @@ install:
- ps: |
# Setup precompiled SDK
$source = "http:https://trueta.udg.edu/apt/windows/devel/0.14/starviewer-sdk-win$env:BITS-0.14-5.7z"
$destination = "c:\starviewer-sdk-win$env:BITS-0.14-5.7z"
$source = "http:https://trueta.udg.edu/apt/windows/devel/0.15/starviewer-sdk-win$env:BITS-0.15-0.7z"
$destination = "c:\starviewer-sdk-win$env:BITS-0.15-0.7z"
Invoke-WebRequest $source -OutFile $destination
7z x $destination -oc:\ > 7z-output.txt
$env:PATH = "$env:QTDIR\bin;c:\vtk\7.0.0\bin;c:\gdcm\2.6.4\bin;c:\ThreadWeaver\5.3.0\bin;$env:PATH"
$env:PATH = "$env:QTDIR\bin;c:\vtk\7.0.0\bin;c:\gdcm\2.8.6\bin;c:\ThreadWeaver\5.3.0\bin;$env:PATH"
# Setup jom
$source = "http:https://ftp.fau.de/qtproject/official_releases/jom/jom_1_1_0.zip"
$source = "http:https://ftp.fau.de/qtproject/official_releases/jom/jom_1_1_2.zip"
$destination = "c:\jom.zip"
Invoke-WebRequest $source -OutFile $destination
Expand Down
2 changes: 1 addition & 1 deletion sdk/library_versions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ Si existeix vol dir que cal aplicar tots els patch que hi hagi en aquest directo
- DCMTK 3.6.1-20120515
- ITK 4.10.0
- VTK 7.0.0
- gdcm 2.6.4
- gdcm 2.8.6
- ThreadWeaver 5.3.0
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
--- gdcm-2.0.19/Source/DataStructureAndEncodingDefinition/gdcmReader.cxx Tue Jun 12 12:16:11 2012
+++ gdcm-2.0.19_with_modifications/Source/DataStructureAndEncodingDefinition/gdcmReader.cxx Tue Jun 12 11:39:31 2012
@@ -657,6 +657,7 @@
diff --git a/Source/DataStructureAndEncodingDefinition/gdcmReader.cxx b/Source/DataStructureAndEncodingDefinition/gdcmReader.cxx
index 5c5edf7..93c2a61 100644
--- a/Source/DataStructureAndEncodingDefinition/gdcmReader.cxx
+++ b/Source/DataStructureAndEncodingDefinition/gdcmReader.cxx
@@ -671,11 +671,13 @@ bool Reader::InternalReadCommon(const T_Caller &caller)
{
gdcmDebugMacro( "No way this is DICOM" );
success = false;
+ throw ex;
}
}
#else
gdcmDebugMacro( ex.what() ); (void)ex;
success = false;
+ throw ex;
#endif /* GDCM_SUPPORT_BROKEN_IMPLEMENTATION */
}
catch( Exception &ex )
@@ -664,11 +665,13 @@
(void)ex; //to avoid unreferenced variable warning on release
@@ -683,11 +685,13 @@ bool Reader::InternalReadCommon(const T_Caller &caller)
(void)ex; //to avoid unreferenced variable warning on release
gdcmDebugMacro( ex.what() );
success = false;
+ throw ex;
Expand All @@ -22,8 +30,8 @@
}

//if( success ) assert( Stream->eof() );
@@ -679,11 +682,13 @@
(void)ex; //to avoid unreferenced variable warning on release
@@ -698,11 +702,13 @@ bool Reader::InternalReadCommon(const T_Caller &caller)
(void)ex; //to avoid unreferenced variable warning on release
gdcmDebugMacro( ex.what() );
success = false;
+ throw ex;
Expand All @@ -34,5 +42,5 @@
success = false;
+ throw;
}
// if( !success )
// {

// FIXME : call this function twice...
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ diff -upr gdcm-2.4.3/Source/MediaStorageAndFileFormat/gdcmRLECodec.cxx gdcm-2.4.
delete[] mybuffer;
std::stringstream os;
+ os.exceptions(std::ostream::failbit | std::ostream::badbit);
SetLength( llen );
SetLength( (unsigned long)llen );
#if !defined(NDEBUG)
const unsigned int * const dimensions = this->GetDimensions();
@@ -610,6 +611,7 @@ bool RLECodec::Decode(DataElement const
Expand All @@ -72,5 +72,5 @@ diff -upr gdcm-2.4.3/Source/MediaStorageAndFileFormat/gdcmRLECodec.cxx gdcm-2.4.
std::stringstream os;
+ os.exceptions(std::ostream::failbit | std::ostream::badbit);
bool r = DecodeByStreams(is, os);
assert( r ); (void)r; //warning removal
std::string str = os.str();
if( !r )
{
7 changes: 4 additions & 3 deletions sdk/scripts/unix/config/gdcm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Call vtk configuration script to make sure VTKCMAKEDIR is set
. "$SCRIPTS_ROOT/config/vtk.sh"

SOURCE_DIR="$SOURCE_DIR_BASE/GDCM-2.6.4"
SOURCE_DIR="$SOURCE_DIR_BASE/GDCM-2.8.6"

if [ $BUILD_TYPE = debug ]
then
Expand All @@ -21,9 +21,10 @@ fi
CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE:STRING=$CMAKE_BUILD_TYPE \
-DCMAKE_INSTALL_PREFIX:PATH=$SDK_INSTALL_PREFIX \
-DGDCM_BUILD_SHARED_LIBS:BOOL=TRUE \
-DGDCM_BUILD_DOCBOOK_MANPAGES:BOOL=FALSE \
-DGDCM_USE_VTK:BOOL=TRUE \
-DVTK_DIR:PATH=$VTKCMAKEDIR"

GDCMCMAKEDIR="$SDK_INSTALL_PREFIX/lib/gdcm-2.6"
GDCMCMAKEDIR="$SDK_INSTALL_PREFIX/lib/gdcm-2.8"
GDCMLIBDIR="$SDK_INSTALL_PREFIX/lib"
GDCMINCLUDEDIR="$SDK_INSTALL_PREFIX/include/gdcm-2.6"
GDCMINCLUDEDIR="$SDK_INSTALL_PREFIX/include/gdcm-2.8"
6 changes: 3 additions & 3 deletions sdk/scripts/unix/sdk_download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ do
'https://www.vtk.org/files/release/7.0/VTK-7.0.0.tar.gz'
;;
gdcm)
download_and_verify bbf7eeda622cf18499bd162f3b06d0c937a5379f6f3d1445d57b3d4d0070f97e \
'gdcm-2.6.4.tar.gz' \
'https://github.com/malaterre/GDCM/archive/v2.6.4.tar.gz'
download_and_verify f4e611c74ea2b16c9aa28d7fdf3a8678ce926909606705b7cd08c9a5b05d34fc \
'GDCM-2.8.6.tar.gz' \
'https://github.com/malaterre/GDCM/archive/v2.8.6.tar.gz'
;;
itk)
download_and_verify ea0011fc99a6303427b236c3ceaf54688224350ce1a216b64c9771ab3194b15f \
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 @@ -29,7 +29,7 @@ do
tar -C "${SOURCE_DIR_BASE}" -xvf "${DOWNLOAD_PREFIX}/VTK-7.0.0.tar.gz"
;;
gdcm)
tar -C "${SOURCE_DIR_BASE}" -xvf "${DOWNLOAD_PREFIX}/gdcm-2.6.4.tar.gz"
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"
Expand Down
11 changes: 6 additions & 5 deletions sdk/scripts/windows/config/gdcm.cmd
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
REM Call vtk configuration script to make sure VtkDir is set
call "%ScriptsRoot%\config\vtk.cmd"

set SourceDir=%SourceDirPrefix%\gdcm-2.6.4
set BuildDir=%BuildDirPrefix%\gdcm-2.6.4
set SourceDir=%SourceDirPrefix%\GDCM-2.8.6
set BuildDir=%BuildDirPrefix%\GDCM-2.8.6

if %BuildType% == debug (
set CMakeBuildType=Debug
set BuildDir=%BuildDir%-deb
set InstallPrefix=%SdkInstallPrefix%/gdcm/2.6.4d
set InstallPrefix=%SdkInstallPrefix%/gdcm/2.8.6d
)
if %BuildType% == release (
set CMakeBuildType=RelWithDebInfo
set BuildDir=%BuildDir%-rel
set InstallPrefix=%SdkInstallPrefix%/gdcm/2.6.4
set InstallPrefix=%SdkInstallPrefix%/gdcm/2.8.6
)

REM ============== Nothing should need to be changed below this line ==============

set CMakeOptions=-DCMAKE_BUILD_TYPE:STRING=%CMakeBuildType% ^
-DCMAKE_INSTALL_PREFIX:PATH="%InstallPrefix%" ^
-DGDCM_BUILD_SHARED_LIBS:BOOL=TRUE ^
-DGDCM_BUILD_DOCBOOK_MANPAGES:BOOL=FALSE ^
-DGDCM_USE_VTK:BOOL=TRUE ^
-DVTK_DIR="%VtkDir%"

set GdcmDir=%InstallPrefix%/lib/gdcm-2.6
set GdcmDir=%InstallPrefix%/lib/gdcm-2.8
11 changes: 7 additions & 4 deletions sdk/scripts/windows/config/setup.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ REM List of libs to build. Possible values: zlib, dcmtk, vtk, gdcm, itk, ecm, th
set Libs=zlib dcmtk vtk gdcm itk ecm threadweaver

REM Global prefix of the Starviewer SDK files.
set Prefix=D:\starviewer-sdk-0.14
set Prefix=E:\starviewer-sdk-0.15

REM Where the libraries are downloaded.
set DownloadPrefix=%Prefix%\downloads
Expand All @@ -24,17 +24,20 @@ set SdkInstallPrefix=%Prefix%\%Arch%

REM The path where Qt is installed.
if %Arch% == 32 (
set QtInstallPrefix=%SystemDrive%\Qt\5.6\msvc2015
set QtInstallPrefix=%SystemDrive%\Qt\5.6.3\msvc2015
) else (
set QtInstallPrefix=%SystemDrive%\Qt\5.6\msvc2015_64
set QtInstallPrefix=%SystemDrive%\Qt\5.6.3\msvc2015_64
)

REM How to call CMake.
set CMakeGenerator=-G "NMake Makefiles"
set CMake="%ProgramFiles(x86)%\CMake\bin\cmake.exe" %CMakeGenerator%
set CMake="%ProgramFiles%\CMake\bin\cmake.exe" %CMakeGenerator%

REM How to call git.
set Git="%ProgramFiles%\Git\bin\git.exe"

REM Needed by CMake to find Qt.
set CMAKE_PREFIX_PATH=%QtInstallPrefix%

REM How to call jom.
set Jom="%SystemDrive%\Qt\Tools\QtCreator\bin\jom.exe"
4 changes: 2 additions & 2 deletions sdk/scripts/windows/libs/cmakebuild.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if exist "%PatchesRoot%\%BuildLib%" (
)

%CMake% -Wno-dev %CMakeOptions% "%SourceDir%"
nmake
nmake install
%Jom% -j2
%Jom% install

popd
22 changes: 0 additions & 22 deletions sdk/scripts/windows/prepare-sdk_64bit.cmd

This file was deleted.

Loading

0 comments on commit 2a0ac8e

Please sign in to comment.