parent
39377dd776
commit
f94c63b2bf
@ -0,0 +1,13 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index c920c15..75bc60f 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -207,7 +207,7 @@ ENDIF(NOT GDCM_INSTALL_BIN_DIR)
|
||||
|
||||
IF(NOT GDCM_INSTALL_LIB_DIR)
|
||||
#SET(GDCM_INSTALL_LIB_DIR "lib/${PROJECT_NAME}")
|
||||
- SET(GDCM_INSTALL_LIB_DIR "lib")
|
||||
+ SET(GDCM_INSTALL_LIB_DIR "lib${LIB_SUFFIX}")
|
||||
ENDIF(NOT GDCM_INSTALL_LIB_DIR)
|
||||
|
||||
IF(NOT GDCM_INSTALL_DATA_DIR)
|
@ -0,0 +1,13 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 29f5802..93a2a24 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -199,7 +199,7 @@ ENDIF(MSVC)
|
||||
# Install directories
|
||||
|
||||
STRING(TOLOWER ${PROJECT_NAME} projectname)
|
||||
-SET(subdir "${projectname}-${GDCM_MAJOR_VERSION}.${GDCM_MINOR_VERSION}")
|
||||
+SET(subdir "${projectname}")
|
||||
|
||||
IF(NOT GDCM_INSTALL_BIN_DIR)
|
||||
SET(GDCM_INSTALL_BIN_DIR "bin")
|
@ -0,0 +1,83 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 93a2a24..7076a45 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -305,7 +305,7 @@ IF(GDCM_USE_SYSTEM_OPENJPEG)
|
||||
# For some reason I cannot specify the version I want.
|
||||
# FIND_PACKAGE(OpenJPEG 2.0 REQUIRED)
|
||||
# oh well we should handle both 1.0 and 2.0 anyway...
|
||||
- #FIND_PACKAGE(OpenJPEG REQUIRED)
|
||||
+ FIND_PACKAGE(OpenJPEG REQUIRED)
|
||||
SET(GDCM_OPENJPEG_LIBRARIES ${OPENJPEG_LIBRARIES})
|
||||
ELSE(GDCM_USE_SYSTEM_OPENJPEG)
|
||||
SET(GDCM_OPENJPEG_LIBRARIES gdcmopenjpeg)
|
||||
@@ -758,6 +758,11 @@ IF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
|
||||
set(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION
|
||||
"All of the tools you'll ever need to develop software using GDCM")
|
||||
|
||||
+ if(CMAKE_VERSION VERSION_EQUAL 2.8.3)
|
||||
+ # The following is needed for CMake 2.8.3 and above to preserve backward compat
|
||||
+ set(CPACK_MONOLITHIC_INSTALL 1)
|
||||
+ endif(CMAKE_VERSION VERSION_EQUAL 2.8.3)
|
||||
+
|
||||
# It doesn't make sense to install the headers without the libraries
|
||||
# (because you could never use the headers!), so make the headers component
|
||||
# depend on the libraries component.
|
||||
diff --git a/Source/Common/gdcmConfigure.h.in b/Source/Common/gdcmConfigure.h.in
|
||||
index a203235..534845a 100644
|
||||
--- a/Source/Common/gdcmConfigure.h.in
|
||||
+++ b/Source/Common/gdcmConfigure.h.in
|
||||
@@ -63,8 +63,7 @@
|
||||
#ifndef GDCM_USE_SYSTEM_OPENJPEG
|
||||
#define OPENJPEG_MAJOR_VERSION 2
|
||||
#else
|
||||
-//#define OPENJPEG_MAJOR_VERSION @OPENJPEG_MAJOR_VERSION@
|
||||
-#define OPENJPEG_MAJOR_VERSION 2
|
||||
+#define OPENJPEG_MAJOR_VERSION @OPENJPEG_MAJOR_VERSION@
|
||||
#endif //GDCM_USE_SYSTEM_OPENJPEG
|
||||
|
||||
#ifndef OPENJPEG_MAJOR_VERSION
|
||||
diff --git a/Source/Common/gdcmCryptographicMessageSyntax.cxx b/Source/Common/gdcmCryptographicMessageSyntax.cxx
|
||||
index ec48f40..054d72a 100644
|
||||
--- a/Source/Common/gdcmCryptographicMessageSyntax.cxx
|
||||
+++ b/Source/Common/gdcmCryptographicMessageSyntax.cxx
|
||||
@@ -102,8 +102,8 @@ public:
|
||||
::X509 *ret = sk_X509_value(recips, i);
|
||||
return ret;
|
||||
}
|
||||
- void SetPrivateKey(::EVP_PKEY* pkey) {
|
||||
- this->pkey = pkey;
|
||||
+ void SetPrivateKey(::EVP_PKEY* thepkey) {
|
||||
+ this->pkey = thepkey;
|
||||
}
|
||||
::EVP_PKEY* GetPrivateKey() const {
|
||||
return pkey;
|
||||
diff --git a/Source/MediaStorageAndFileFormat/gdcmJPEG2000Codec.cxx b/Source/MediaStorageAndFileFormat/gdcmJPEG2000Codec.cxx
|
||||
index 4c6d95b..3b6c1b6 100644
|
||||
--- a/Source/MediaStorageAndFileFormat/gdcmJPEG2000Codec.cxx
|
||||
+++ b/Source/MediaStorageAndFileFormat/gdcmJPEG2000Codec.cxx
|
||||
@@ -446,6 +446,7 @@ bool JPEG2000Codec::Decode(std::istream &is, std::ostream &os)
|
||||
return false;
|
||||
}
|
||||
|
||||
+ int reversible;
|
||||
#if OPENJPEG_MAJOR_VERSION == 1
|
||||
/* catch events using our callbacks and give a local context */
|
||||
opj_set_event_mgr((opj_common_ptr)dinfo, &event_mgr, NULL);
|
||||
@@ -484,7 +485,6 @@ bool JPEG2000Codec::Decode(std::istream &is, std::ostream &os)
|
||||
/* setup the decoder decoding parameters using user parameters */
|
||||
opj_setup_decoder(dinfo, ¶meters);
|
||||
bool bResult;
|
||||
- int reversible;
|
||||
OPJ_INT32 l_tile_x0,l_tile_y0;
|
||||
OPJ_UINT32 l_tile_width,l_tile_height,l_nb_tiles_x,l_nb_tiles_y;
|
||||
bResult = opj_read_header(
|
||||
@@ -586,7 +586,7 @@ bool JPEG2000Codec::Decode(std::istream &is, std::ostream &os)
|
||||
unsigned long len = Dimensions[0]*Dimensions[1] * (PF.GetBitsAllocated() / 8) * image->numcomps;
|
||||
char *raw = new char[len];
|
||||
//assert( len == fsrc->len );
|
||||
- for (unsigned int compno = 0; compno < image->numcomps; compno++)
|
||||
+ for (unsigned int compno = 0; compno < (unsigned int)image->numcomps; compno++)
|
||||
{
|
||||
opj_image_comp_t *comp = &image->comps[compno];
|
||||
|
@ -0,0 +1,102 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 75bc60f..29f5802 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -271,6 +271,12 @@ ENDIF(UNIX)
|
||||
OPTION(GDCM_USE_SYSTEM_EXPAT "Use system expat" OFF)
|
||||
OPTION(GDCM_USE_SYSTEM_LJPEG "Use system ljpeg (ijg lib)" OFF)
|
||||
OPTION(GDCM_USE_SYSTEM_OPENJPEG "Use system openjpeg (1.x)" OFF)
|
||||
+
|
||||
+IF(GDCM_USE_JPEGLS)
|
||||
+ OPTION(GDCM_USE_SYSTEM_JPEGLS "Use system JPEGLS (CharLS)" OFF)
|
||||
+ MARK_AS_ADVANCED(GDCM_USE_SYSTEM_JPEGLS)
|
||||
+ENDIF(GDCM_USE_JPEGLS)
|
||||
+
|
||||
MARK_AS_ADVANCED(GDCM_USE_SYSTEM_ZLIB GDCM_USE_SYSTEM_UUID GDCM_USE_SYSTEM_EXPAT GDCM_USE_SYSTEM_OPENSSL)
|
||||
MARK_AS_ADVANCED(GDCM_USE_SYSTEM_OPENJPEG GDCM_USE_SYSTEM_LJPEG)
|
||||
OPTION(GDCM_USE_SYSTEM_POPPLER "Use system poppler (pdf)" OFF)
|
||||
@@ -305,6 +311,13 @@ ELSE(GDCM_USE_SYSTEM_OPENJPEG)
|
||||
SET(GDCM_OPENJPEG_LIBRARIES gdcmopenjpeg)
|
||||
ENDIF(GDCM_USE_SYSTEM_OPENJPEG)
|
||||
|
||||
+IF(GDCM_USE_SYSTEM_JPEGLS)
|
||||
+ FIND_PACKAGE(CharLS REQUIRED)
|
||||
+ SET(GDCM_CHARLS_LIBRARIES ${CHARLS_LIBRARIES})
|
||||
+ELSE(GDCM_USE_SYSTEM_JPEGLS)
|
||||
+ SET(GDCM_CHARLS_LIBRARIES gdcmcharls)
|
||||
+ENDIF(GDCM_USE_SYSTEM_JPEGLS)
|
||||
+
|
||||
# Very advanced user option:
|
||||
# This will cause building of the broken JPEG library released by the Standford PVRG group:
|
||||
OPTION(GDCM_USE_PVRG "Use pvrg lib, only turn it on if you know what you are doing." OFF)
|
||||
diff --git a/Source/MediaStorageAndFileFormat/CMakeLists.txt b/Source/MediaStorageAndFileFormat/CMakeLists.txt
|
||||
index 290a5b7..3eee74c 100644
|
||||
--- a/Source/MediaStorageAndFileFormat/CMakeLists.txt
|
||||
+++ b/Source/MediaStorageAndFileFormat/CMakeLists.txt
|
||||
@@ -141,7 +141,7 @@ ADD_LIBRARY(gdcmMSFF ${MSFF_SRCS})
|
||||
TARGET_LINK_LIBRARIES(gdcmMSFF gdcmIOD gdcmDSED gdcmDICT ${GDCM_LJPEG_LIBRARIES} ${GDCM_OPENJPEG_LIBRARIES})
|
||||
SET_TARGET_PROPERTIES(gdcmMSFF PROPERTIES ${GDCM_LIBRARY_PROPERTIES} LINK_INTERFACE_LIBRARIES "gdcmDSED;gdcmDICT;gdcmIOD")
|
||||
IF(GDCM_USE_JPEGLS)
|
||||
- TARGET_LINK_LIBRARIES(gdcmMSFF gdcmcharls)
|
||||
+ TARGET_LINK_LIBRARIES(gdcmMSFF ${GDCM_CHARLS_LIBRARIES})
|
||||
ENDIF(GDCM_USE_JPEGLS)
|
||||
|
||||
IF(CMAKE_COMPILER_IS_GNUCXX AND MINGW)
|
||||
diff --git a/Source/MediaStorageAndFileFormat/gdcmJPEGLSCodec.cxx b/Source/MediaStorageAndFileFormat/gdcmJPEGLSCodec.cxx
|
||||
index fda51bc..aae07ed 100644
|
||||
--- a/Source/MediaStorageAndFileFormat/gdcmJPEGLSCodec.cxx
|
||||
+++ b/Source/MediaStorageAndFileFormat/gdcmJPEGLSCodec.cxx
|
||||
@@ -18,6 +18,16 @@
|
||||
#include "gdcmDataElement.h"
|
||||
|
||||
// CharLS includes
|
||||
+#ifdef GDCM_USE_SYSTEM_EXPAT
|
||||
+#include "CharLS/stdafx.h" // sigh...
|
||||
+#include "CharLS/interface.h"
|
||||
+#include "CharLS/util.h"
|
||||
+#include "CharLS/defaulttraits.h"
|
||||
+#include "CharLS/losslesstraits.h"
|
||||
+#include "CharLS/colortransform.h"
|
||||
+#include "CharLS/streams.h"
|
||||
+#include "CharLS/processline.h"
|
||||
+#else
|
||||
#include "gdcmcharls/stdafx.h" // sigh...
|
||||
#include "gdcmcharls/interface.h"
|
||||
#include "gdcmcharls/util.h"
|
||||
@@ -26,7 +36,7 @@
|
||||
#include "gdcmcharls/colortransform.h"
|
||||
#include "gdcmcharls/streams.h"
|
||||
#include "gdcmcharls/processline.h"
|
||||
-
|
||||
+#endif
|
||||
|
||||
namespace gdcm
|
||||
{
|
||||
diff --git a/Utilities/CMakeLists.txt b/Utilities/CMakeLists.txt
|
||||
index 8ade58c..8b417aa 100644
|
||||
--- a/Utilities/CMakeLists.txt
|
||||
+++ b/Utilities/CMakeLists.txt
|
||||
@@ -33,14 +33,17 @@ IF(NOT GDCM_USE_SYSTEM_OPENJPEG)
|
||||
ENDIF(NOT GDCM_USE_SYSTEM_OPENJPEG)
|
||||
|
||||
# Do jpegls (JPEG-LS aka near lossless implementation)
|
||||
+
|
||||
APPEND_COPYRIGHT(${CMAKE_CURRENT_SOURCE_DIR}/gdcmcharls/License.txt)
|
||||
IF(GDCM_USE_JPEGLS)
|
||||
- SET(CHARLS_NAMESPACE "GDCMCHARLS")
|
||||
- SET(CHARLS_INSTALL_NO_LIBRARIES ${GDCM_INSTALL_NO_LIBRARIES})
|
||||
- SET(CHARLS_INSTALL_BIN_DIR ${GDCM_INSTALL_BIN_DIR})
|
||||
- SET(CHARLS_INSTALL_LIB_DIR ${GDCM_INSTALL_LIB_DIR})
|
||||
- SET(CHARLS_INSTALL_INCLUDE_DIR ${GDCM_INSTALL_INCLUDE_DIR}/gdcmcharls)
|
||||
- SUBDIRS(gdcmcharls)
|
||||
+ IF(NOT GDCM_USE_SYSTEM_JPEGLS)
|
||||
+ SET(CHARLS_NAMESPACE "GDCMCHARLS")
|
||||
+ SET(CHARLS_INSTALL_NO_LIBRARIES ${GDCM_INSTALL_NO_LIBRARIES})
|
||||
+ SET(CHARLS_INSTALL_BIN_DIR ${GDCM_INSTALL_BIN_DIR})
|
||||
+ SET(CHARLS_INSTALL_LIB_DIR ${GDCM_INSTALL_LIB_DIR})
|
||||
+ SET(CHARLS_INSTALL_INCLUDE_DIR ${GDCM_INSTALL_INCLUDE_DIR})
|
||||
+ SUBDIRS(gdcmcharls)
|
||||
+ ENDIF(NOT GDCM_USE_SYSTEM_JPEGLS)
|
||||
ENDIF(GDCM_USE_JPEGLS)
|
||||
|
||||
# Do md5
|
Loading…
Reference in new issue