parent
e084ac6607
commit
24032edaf0
@ -1,34 +0,0 @@
|
||||
FIND_PATH(CHARLS_INCLUDE_DIR CharLS/interface.h
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(CHARLS_LIBRARY
|
||||
NAMES CharLS
|
||||
PATHS /usr/lib /usr/local/lib /usr/lib64 /usr/local/lib64
|
||||
)
|
||||
|
||||
|
||||
IF (CHARLS_LIBRARY AND CHARLS_INCLUDE_DIR)
|
||||
SET(CHARLS_LIBRARIES ${CHARLS_LIBRARY})
|
||||
SET(CHARLS_INCLUDE_DIRS ${CHARLS_INCLUDE_DIR})
|
||||
SET(CHARLS_FOUND "YES")
|
||||
ELSE (CHARLS_LIBRARY AND CHARLS_INCLUDE_DIR)
|
||||
SET(CHARLS_FOUND "NO")
|
||||
ENDIF (CHARLS_LIBRARY AND CHARLS_INCLUDE_DIR)
|
||||
|
||||
|
||||
IF (CHARLS_FOUND)
|
||||
IF (NOT CHARLS_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found CHARLS: ${CHARLS_LIBRARIES}")
|
||||
ENDIF (NOT CHARLS_FIND_QUIETLY)
|
||||
ELSE (CHARLS_FOUND)
|
||||
IF (CHARLS_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Could not find CHARLS library")
|
||||
ENDIF (CHARLS_FIND_REQUIRED)
|
||||
ENDIF (CHARLS_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
CHARLS_LIBRARIES
|
||||
CHARLS_INCLUDE_DIR
|
||||
)
|
@ -1,58 +0,0 @@
|
||||
diff --git a/Source/MediaStorageAndFileFormat/gdcmJPEGLSCodec.cxx b/Source/MediaStorageAndFileFormat/gdcmJPEGLSCodec.cxx
|
||||
index 4d38bef..48a52ac 100644
|
||||
--- a/Source/MediaStorageAndFileFormat/gdcmJPEGLSCodec.cxx
|
||||
+++ b/Source/MediaStorageAndFileFormat/gdcmJPEGLSCodec.cxx
|
||||
@@ -72,7 +72,7 @@ bool JPEGLSCodec::GetHeaderInfo(std::istream &is, TransferSyntax &ts)
|
||||
is.seekg(0, std::ios::beg);
|
||||
is.read( dummy_buffer, buf_size);
|
||||
|
||||
- JlsParamaters metadata;
|
||||
+ JlsParameters metadata;
|
||||
if (JpegLsReadHeader(dummy_buffer, buf_size, &metadata) != OK)
|
||||
{
|
||||
return false;
|
||||
@@ -160,7 +160,7 @@ bool JPEGLSCodec::Decode(DataElement const &in, DataElement &out)
|
||||
sf->GetBuffer(buffer, totalLen);
|
||||
//is.write(buffer, totalLen);
|
||||
|
||||
- JlsParamaters metadata;
|
||||
+ JlsParameters metadata;
|
||||
if (JpegLsReadHeader(buffer, totalLen, &metadata) != OK)
|
||||
{
|
||||
return false;
|
||||
@@ -172,7 +172,7 @@ bool JPEGLSCodec::Decode(DataElement const &in, DataElement &out)
|
||||
const BYTE* pbyteCompressed = (const BYTE*)buffer;
|
||||
int cbyteCompressed = totalLen;
|
||||
|
||||
- JlsParamaters params = {0};
|
||||
+ JlsParameters params = {0};
|
||||
JpegLsReadHeader(pbyteCompressed, cbyteCompressed, ¶ms);
|
||||
|
||||
std::vector<BYTE> rgbyteCompressed;
|
||||
@@ -216,7 +216,7 @@ bool JPEGLSCodec::Decode(DataElement const &in, DataElement &out)
|
||||
// what if 0xd9 is never found ?
|
||||
assert( totalLen > 0 && pbyteCompressed[totalLen-1] == 0xd9 );
|
||||
|
||||
- JlsParamaters metadata;
|
||||
+ JlsParameters metadata;
|
||||
if (JpegLsReadHeader(mybuffer, totalLen, &metadata) != OK)
|
||||
{
|
||||
return false;
|
||||
@@ -228,7 +228,7 @@ bool JPEGLSCodec::Decode(DataElement const &in, DataElement &out)
|
||||
|
||||
int cbyteCompressed = totalLen;
|
||||
|
||||
- JlsParamaters params = {0};
|
||||
+ JlsParameters params = {0};
|
||||
JpegLsReadHeader(pbyteCompressed, cbyteCompressed, ¶ms);
|
||||
|
||||
std::vector<BYTE> rgbyteCompressed;
|
||||
@@ -293,7 +293,7 @@ bool JPEGLSCodec::Code(DataElement const &in, DataElement &out)
|
||||
{
|
||||
const char *inputdata = input + dim * image_len; //bv->GetPointer();
|
||||
|
||||
- JlsParamaters params = {};
|
||||
+ JlsParameters params = {};
|
||||
/*
|
||||
The fields in JlsCustomParameters do not control lossy/lossless. They
|
||||
provide the possiblity to tune the JPEG-LS internals for better compression
|
@ -1,22 +0,0 @@
|
||||
diff --git a/Source/MediaStorageAndFileFormat/gdcmJPEGLSCodec.cxx b/Source/MediaStorageAndFileFormat/gdcmJPEGLSCodec.cxx
|
||||
index d51832f..4d38bef 100644
|
||||
--- a/Source/MediaStorageAndFileFormat/gdcmJPEGLSCodec.cxx
|
||||
+++ b/Source/MediaStorageAndFileFormat/gdcmJPEGLSCodec.cxx
|
||||
@@ -181,7 +181,7 @@ bool JPEGLSCodec::Decode(DataElement const &in, DataElement &out)
|
||||
std::vector<BYTE> rgbyteOut;
|
||||
rgbyteOut.resize(params.height *params.width * ((params.bitspersample + 7) / 8) * params.components);
|
||||
|
||||
- JLS_ERROR result = JpegLsDecode(&rgbyteOut[0], rgbyteOut.size(), pbyteCompressed, cbyteCompressed);
|
||||
+ JLS_ERROR result = JpegLsDecode(&rgbyteOut[0], rgbyteOut.size(), pbyteCompressed, cbyteCompressed, ¶ms);
|
||||
ASSERT(result == OK);
|
||||
|
||||
delete[] buffer;
|
||||
@@ -237,7 +237,7 @@ bool JPEGLSCodec::Decode(DataElement const &in, DataElement &out)
|
||||
std::vector<BYTE> rgbyteOut;
|
||||
rgbyteOut.resize(params.height *params.width * ((params.bitspersample + 7) / 8) * params.components);
|
||||
|
||||
- JLS_ERROR result = JpegLsDecode(&rgbyteOut[0], rgbyteOut.size(), pbyteCompressed, cbyteCompressed);
|
||||
+ JLS_ERROR result = JpegLsDecode(&rgbyteOut[0], rgbyteOut.size(), pbyteCompressed, cbyteCompressed, ¶ms);
|
||||
ASSERT(result == OK);
|
||||
bool r = true;
|
||||
|
@ -1,12 +0,0 @@
|
||||
diff --git a/gdcm-2.0.16/Wrapping/Python/gdcmswig.i b/gdcm-2.0.16/Wrapping/Python/gdcmswig.i
|
||||
index 6a5a5c7..26c8ba5 100644
|
||||
--- a/gdcm-2.0.16/Wrapping/Python/gdcmswig.i
|
||||
+++ b/gdcm-2.0.16/Wrapping/Python/gdcmswig.i
|
||||
@@ -27,6 +27,7 @@
|
||||
// "There is no option to suppress all SWIG warning messages."
|
||||
#pragma SWIG nowarn=302,303,312,362,383,389,401,503,504,509,510,514,516
|
||||
%{
|
||||
+#include <cstddef> // ptrdiff_t
|
||||
#include "gdcmTypes.h"
|
||||
#include "gdcmASN1.h"
|
||||
#include "gdcmSmartPointer.h"
|
@ -1,13 +0,0 @@
|
||||
diff --git a/Source/MediaStorageAndFileFormat/gdcmJPEGLSCodec.cxx b/Source/MediaStorageAndFileFormat/gdcmJPEGLSCodec.cxx
|
||||
index aae07ed..3f1fa8b 100644
|
||||
--- a/Source/MediaStorageAndFileFormat/gdcmJPEGLSCodec.cxx
|
||||
+++ b/Source/MediaStorageAndFileFormat/gdcmJPEGLSCodec.cxx
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
// CharLS includes
|
||||
#ifdef GDCM_USE_SYSTEM_EXPAT
|
||||
-#include "CharLS/stdafx.h" // sigh...
|
||||
+//#include "CharLS/stdafx.h" // sigh...
|
||||
#include "CharLS/interface.h"
|
||||
#include "CharLS/util.h"
|
||||
#include "CharLS/defaulttraits.h"
|
@ -1,83 +0,0 @@
|
||||
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];
|
||||
|
@ -1,102 +0,0 @@
|
||||
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