#2 Update to use CharLS 2
Closed 4 years ago by ankursinha. Opened 4 years ago by ankursinha.
rpms/ ankursinha/dcmtk charls-2  into  master

0001-3.6.4-Use-system-CharLS-include.patch dcmtk-3.6.0-0005-Fixed-includes-for-CharLS-1.0.patch
file renamed
+14 -14
@@ -1,16 +1,16 @@ 

- From 6d6a52c1c049c0fe8440d8b03d5cb852a47c0cd5 Mon Sep 17 00:00:00 2001

- From: Mario Ceresa <mrceresa@gmail.com>

- Date: Sun, 20 Mar 2011 14:40:48 +0100

- Subject: [PATCH 5/6] Fixed includes for CharLS 1.0

+ From 222912a741144c340ab226c9cdf02579c4f10a63 Mon Sep 17 00:00:00 2001

+ From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur@gmail.com>

+ Date: Sun, 28 Jul 2019 18:22:57 +0100

+ Subject: [PATCH 01/16] 3.6.4 Use system CharLS include

  

  ---

-  dcmjpls/libsrc/djcodecd.cc |    2 +-

-  dcmjpls/libsrc/djcodece.cc |    2 +-

-  dcmjpls/libsrc/djerror.h   |    2 +-

+  dcmjpls/libsrc/djcodecd.cc | 2 +-

+  dcmjpls/libsrc/djcodece.cc | 2 +-

+  dcmjpls/libsrc/djerror.h   | 2 +-

   3 files changed, 3 insertions(+), 3 deletions(-)

  

  diff --git a/dcmjpls/libsrc/djcodecd.cc b/dcmjpls/libsrc/djcodecd.cc

- index 8a11515..8da8d7a 100644

+ index 3f0d85e1d..a56f944fe 100644

  --- a/dcmjpls/libsrc/djcodecd.cc

  +++ b/dcmjpls/libsrc/djcodecd.cc

  @@ -37,7 +37,7 @@
@@ -18,12 +18,12 @@ 

   

   // JPEG-LS library (CharLS) includes

  -#include "intrface.h"

- +#include "CharLS/interface.h"

+ +#include "CharLS/charls.h"

   

   E_TransferSyntax DJLSLosslessDecoder::supportedTransferSyntax() const

   {

  diff --git a/dcmjpls/libsrc/djcodece.cc b/dcmjpls/libsrc/djcodece.cc

- index 9d6e1d8..8148b31 100644

+ index 34eb81023..199f92489 100644

  --- a/dcmjpls/libsrc/djcodece.cc

  +++ b/dcmjpls/libsrc/djcodece.cc

  @@ -55,7 +55,7 @@
@@ -31,12 +31,12 @@ 

   

   // JPEG-LS library (CharLS) includes

  -#include "intrface.h"

- +#include "CharLS/interface.h"

+ +#include "CharLS/charls.h"

   

   BEGIN_EXTERN_C

   #ifdef HAVE_FCNTL_H

  diff --git a/dcmjpls/libsrc/djerror.h b/dcmjpls/libsrc/djerror.h

- index 68ebae1..d3cd2ad 100644

+ index d625c48a6..8bb51dc24 100644

  --- a/dcmjpls/libsrc/djerror.h

  +++ b/dcmjpls/libsrc/djerror.h

  @@ -24,7 +24,7 @@
@@ -44,10 +44,10 @@ 

   #include "dcmtk/config/osconfig.h"

   #include "dcmtk/dcmjpls/djlsutil.h" /* For the OFCondition codes */

  -#include "intrface.h" /* CharLS include */

- +#include "CharLS/interface.h" /* CharLS include */

+ +#include "CharLS/charls.h" /* CharLS include */

   

   /** Helper class for converting between dcmjpls and CharLS error codes

    */

  -- 

- 1.7.4

+ 2.21.0

  

@@ -0,0 +1,54 @@ 

+ From fc1b268764920d89e595827d1521c65ea5650c14 Mon Sep 17 00:00:00 2001

+ From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur@gmail.com>

+ Date: Sun, 28 Jul 2019 18:25:08 +0100

+ Subject: [PATCH 02/16] 3.6.4 Add FindCharLS

+ 

+ ---

+  CMake/FindCharLS.cmake | 35 +++++++++++++++++++++++++++++++++++

+  1 file changed, 35 insertions(+)

+  create mode 100644 CMake/FindCharLS.cmake

+ 

+ diff --git a/CMake/FindCharLS.cmake b/CMake/FindCharLS.cmake

+ new file mode 100644

+ index 000000000..bb36a90c2

+ --- /dev/null

+ +++ b/CMake/FindCharLS.cmake

+ @@ -0,0 +1,35 @@

+ +FIND_PATH(CHARLS_INCLUDE_DIR CharLS/charls.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

+ +	)

+ +

+ -- 

+ 2.21.0

+ 

@@ -0,0 +1,38 @@ 

+ From 5239b7f0ec2ac171e078dea515b41c624b333e54 Mon Sep 17 00:00:00 2001

+ From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur@gmail.com>

+ Date: Sun, 28 Jul 2019 18:26:51 +0100

+ Subject: [PATCH 03/16] 3.6.4 Find and include CharLS

+ 

+ ---

+  CMake/3rdparty.cmake | 15 +++++++++++++++

+  1 file changed, 15 insertions(+)

+ 

+ diff --git a/CMake/3rdparty.cmake b/CMake/3rdparty.cmake

+ index de829f66b..c5ce77a55 100644

+ --- a/CMake/3rdparty.cmake

+ +++ b/CMake/3rdparty.cmake

+ @@ -306,6 +306,21 @@ else()

+      endif()

+    endif()

+  

+ +  # Find charls

+ +  SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMake)

+ +

+ +  if(DCMTK_WITH_CHARLS)

+ +      FIND_PACKAGE(CharLS)

+ +      INCLUDE_DIRECTORIES(${CHARLS_INCLUDE_DIRS})

+ +      SET(CHARLS_LIBS ${CHARLS_LIBRARIES})

+ +      if (NOT CHARLS_LIBS)

+ +          MESSAGE(STATUS "Warning: CharLS not found. Cannot build!")

+ +      else(NOT CHARLS_LIBS)

+ +          MESSAGE(STATUS "Info: DCMTK CHARLS support will be enabled")

+ +          SET(WITH_CHARLS 1)

+ +      endif(NOT CHARLS_LIBS)

+ +  endif(DCMTK_WITH_CHARLS)

+ +

+  endif()

+  

+  if(NOT DEFINED DCMTK_WITH_STDLIBC_ICONV)

+ -- 

+ 2.21.0

+ 

0004-3.6.4-Use-cmake-suggested-locations-for-CharLS.patch dcmtk-3.6.4-0004-Use-cmake-suggested-location-for-CharLS.patch
file renamed
+11 -8
@@ -1,7 +1,7 @@ 

- From 356494231c72c30d4cfa17559891863c1c0c483b Mon Sep 17 00:00:00 2001

- From: Mario Ceresa <mario.ceresa@upf.edu>

- Date: Mon, 15 Dec 2014 14:26:11 +0100

- Subject: [PATCH] Use cmake suggested location for CharLS

+ From b9e805310db67dd83f51d19e2081d73f1d65336d Mon Sep 17 00:00:00 2001

+ From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur@gmail.com>

+ Date: Sun, 28 Jul 2019 18:28:59 +0100

+ Subject: [PATCH 04/16] 3.6.4 Use cmake suggested locations for CharLS

  

  ---

   dcmjpls/apps/CMakeLists.txt   | 2 +-
@@ -9,10 +9,10 @@ 

   2 files changed, 2 insertions(+), 2 deletions(-)

  

  diff --git a/dcmjpls/apps/CMakeLists.txt b/dcmjpls/apps/CMakeLists.txt

- index 2e881d7..6170f8a 100644

+ index 2a9a4526e..c5e955347 100644

  --- a/dcmjpls/apps/CMakeLists.txt

  +++ b/dcmjpls/apps/CMakeLists.txt

- @@ -8,5 +8,5 @@

+ @@ -8,5 +8,5 @@ endforeach()

   

   # make sure executables are linked to the corresponding libraries

   foreach(PROGRAM dcmcjpls dcmdjpls dcml2pnm)
@@ -20,12 +20,15 @@ 

  +  DCMTK_TARGET_LINK_MODULES(${PROGRAM} dcmjpls ${CHARLS_LIBS} dcmimage dcmimgle dcmdata oflog ofstd ofstd)

   endforeach()

  diff --git a/dcmjpls/libsrc/CMakeLists.txt b/dcmjpls/libsrc/CMakeLists.txt

- index 8a7b4e8..dc3ff44 100644

+ index 314face74..c6cbb52c8 100644

  --- a/dcmjpls/libsrc/CMakeLists.txt

  +++ b/dcmjpls/libsrc/CMakeLists.txt

- @@ -4,4 +4,4 @@

+ @@ -4,4 +4,4 @@ include_directories("${dcmjpls_SOURCE_DIR}/include" "${ofstd_SOURCE_DIR}/include

   # create library from source files

   DCMTK_ADD_LIBRARY(dcmjpls djcparam djdecode djencode djrparam djcodecd djutils djcodece)

   

  -DCMTK_TARGET_LINK_MODULES(dcmjpls ofstd oflog dcmdata dcmimgle dcmimage charls)

  +DCMTK_TARGET_LINK_MODULES(dcmjpls ofstd oflog dcmdata dcmimgle dcmimage ${CHARLS_LIBS})

+ -- 

+ 2.21.0

+ 

0005-3.6.4-Correct-CharLS-API-call.patch dcmtk-3.6.2-0006-libcharls-changed-api.patch
file renamed
+18 -4
@@ -1,6 +1,17 @@ 

- --- a/dcmjpls/libsrc/djcodece.cc	2017-12-10 11:53:04.128184499 +0100

- +++ b/dcmjpls/libsrc/djcodece.cc	2017-12-10 11:53:54.752173632 +0100

- @@ -664,7 +664,7 @@

+ From 1461a6c22fba7d5432ae676aecc2599c131abb1a Mon Sep 17 00:00:00 2001

+ From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur@gmail.com>

+ Date: Sun, 28 Jul 2019 18:30:46 +0100

+ Subject: [PATCH 05/16] 3.6.4 Correct CharLS API call

+ 

+ ---

+  dcmjpls/libsrc/djcodece.cc | 4 ++--

+  1 file changed, 2 insertions(+), 2 deletions(-)

+ 

+ diff --git a/dcmjpls/libsrc/djcodece.cc b/dcmjpls/libsrc/djcodece.cc

+ index 199f92489..49c66d2d2 100644

+ --- a/dcmjpls/libsrc/djcodece.cc

+ +++ b/dcmjpls/libsrc/djcodece.cc

+ @@ -664,7 +664,7 @@ OFCondition DJLSEncoderBase::compressRawFrame(

   

       size_t bytesWritten = 0;

   
@@ -9,7 +20,7 @@ 

       result = DJLSError::convert(err);

   

       if (result.good())

- @@ -1055,7 +1055,7 @@

+ @@ -1071,7 +1071,7 @@ OFCondition DJLSEncoderBase::compressCookedFrame(

   

     size_t bytesWritten = 0;

   
@@ -18,3 +29,6 @@ 

     result = DJLSError::convert(err);

   

     if (result.good())

+ -- 

+ 2.21.0

+ 

0006-3.6.4-Remove-reference-to-bundled-CharLS.patch dcmtk-3.6.4-0001-Removed-reference-to-bundled-libcharls.patch
file renamed
+8 -5
@@ -1,14 +1,14 @@ 

- From 6996b93b9ea3721ae970e4984d617fe050cd3b02 Mon Sep 17 00:00:00 2001

- From: Mario Ceresa <mario.ceresa@upf.edu>

- Date: Mon, 15 Dec 2014 12:00:53 +0100

- Subject: [PATCH] Removed reference to bundled libcharls

+ From 0a1f6b7640ee558d6405bc33755ebf0b071878eb Mon Sep 17 00:00:00 2001

+ From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur@gmail.com>

+ Date: Sun, 28 Jul 2019 18:31:32 +0100

+ Subject: [PATCH 06/16] 3.6.4 Remove reference to bundled CharLS

  

  ---

   dcmjpls/CMakeLists.txt | 2 +-

   1 file changed, 1 insertion(+), 1 deletion(-)

  

  diff --git a/dcmjpls/CMakeLists.txt b/dcmjpls/CMakeLists.txt

- index e114663..c92ac5b 100644

+ index c8a05a7a9..82d0cc352 100644

  --- a/dcmjpls/CMakeLists.txt

  +++ b/dcmjpls/CMakeLists.txt

  @@ -2,6 +2,6 @@
@@ -19,3 +19,6 @@ 

  +foreach(SUBDIR libsrc apps include)

     add_subdirectory(${SUBDIR})

   endforeach()

+ -- 

+ 2.21.0

+ 

@@ -0,0 +1,78 @@ 

+ From 42dbe6a06f87c9223ab7a968eb6140188af81e8d Mon Sep 17 00:00:00 2001

+ From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur@gmail.com>

+ Date: Sun, 28 Jul 2019 18:58:25 +0100

+ Subject: [PATCH 07/16] 3.6.4 Update JLS_ERROR to jpegls_error in CharLS usage

+ 

+ ---

+  dcmjpls/libsrc/djcodecd.cc | 3 ++-

+  dcmjpls/libsrc/djcodece.cc | 5 +++--

+  dcmjpls/libsrc/djerror.h   | 2 +-

+  3 files changed, 6 insertions(+), 4 deletions(-)

+ 

+ diff --git a/dcmjpls/libsrc/djcodecd.cc b/dcmjpls/libsrc/djcodecd.cc

+ index a56f944fe..0a31ff974 100644

+ --- a/dcmjpls/libsrc/djcodecd.cc

+ +++ b/dcmjpls/libsrc/djcodecd.cc

+ @@ -38,6 +38,7 @@

+  

+  // JPEG-LS library (CharLS) includes

+  #include "CharLS/charls.h"

+ +#include "CharLS/public_types.h"

+  

+  E_TransferSyntax DJLSLosslessDecoder::supportedTransferSyntax() const

+  {

+ @@ -382,7 +383,7 @@ OFCondition DJLSDecoderBase::decodeFrame(

+    if (result.good())

+    {

+      JlsParameters params;

+ -    JLS_ERROR err;

+ +    CharlsApiResultType err;

+  

+      err = JpegLsReadHeader(jlsData, compressedSize, &params);

+      result = DJLSError::convert(err);

+ diff --git a/dcmjpls/libsrc/djcodece.cc b/dcmjpls/libsrc/djcodece.cc

+ index 49c66d2d2..98a9ceccb 100644

+ --- a/dcmjpls/libsrc/djcodece.cc

+ +++ b/dcmjpls/libsrc/djcodece.cc

+ @@ -56,6 +56,7 @@

+  

+  // JPEG-LS library (CharLS) includes

+  #include "CharLS/charls.h"

+ +#include "CharLS/public_types.h"

+  

+  BEGIN_EXTERN_C

+  #ifdef HAVE_FCNTL_H

+ @@ -664,7 +665,7 @@ OFCondition DJLSEncoderBase::compressRawFrame(

+  

+      size_t bytesWritten = 0;

+  

+ -    JLS_ERROR err = JpegLsEncode(buffer, size, &bytesWritten, framePointer, frameSize, &jls_params);

+ +    CharlsApiResultType err = JpegLsEncode(buffer, size, &bytesWritten, framePointer, frameSize, &jls_params);

+      result = DJLSError::convert(err);

+  

+      if (result.good())

+ @@ -1071,7 +1072,7 @@ OFCondition DJLSEncoderBase::compressCookedFrame(

+  

+    size_t bytesWritten = 0;

+  

+ -  JLS_ERROR err = JpegLsEncode(compressed_buffer, compressed_buffer_size, &bytesWritten, framePointer, buffer_size, &jls_params);

+ +  CharlsApiResultType err = JpegLsEncode(compressed_buffer, compressed_buffer_size, &bytesWritten, framePointer, buffer_size, &jls_params);

+    result = DJLSError::convert(err);

+  

+    if (result.good())

+ diff --git a/dcmjpls/libsrc/djerror.h b/dcmjpls/libsrc/djerror.h

+ index 8bb51dc24..a701dbada 100644

+ --- a/dcmjpls/libsrc/djerror.h

+ +++ b/dcmjpls/libsrc/djerror.h

+ @@ -40,7 +40,7 @@ public:

+     *  @param error The CharLS error code

+     *  @return The OFCondition

+     */

+ -  static const OFConditionConst& convert(JLS_ERROR error)

+ +  static const OFConditionConst& convert(CharlsApiResultType error)

+    {

+      switch (error)

+      {

+ -- 

+ 2.21.0

+ 

@@ -0,0 +1,25 @@ 

+ From ee71231260cb6f031ec3ad7401f202df42dd8968 Mon Sep 17 00:00:00 2001

+ From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur@gmail.com>

+ Date: Sun, 28 Jul 2019 19:01:23 +0100

+ Subject: [PATCH 08/16] 3.6.4 correct JpegLsReadHeader arguments

+ 

+ ---

+  dcmjpls/libsrc/djcodecd.cc | 2 +-

+  1 file changed, 1 insertion(+), 1 deletion(-)

+ 

+ diff --git a/dcmjpls/libsrc/djcodecd.cc b/dcmjpls/libsrc/djcodecd.cc

+ index 0a31ff974..3f906b783 100644

+ --- a/dcmjpls/libsrc/djcodecd.cc

+ +++ b/dcmjpls/libsrc/djcodecd.cc

+ @@ -385,7 +385,7 @@ OFCondition DJLSDecoderBase::decodeFrame(

+      JlsParameters params;

+      CharlsApiResultType err;

+  

+ -    err = JpegLsReadHeader(jlsData, compressedSize, &params);

+ +    err = JpegLsReadHeader(jlsData, compressedSize, &params, NULL);

+      result = DJLSError::convert(err);

+  

+      if (result.good())

+ -- 

+ 2.21.0

+ 

@@ -0,0 +1,87 @@ 

+ From b3c7a934cbd9f1b90a5d1280c46b8cfe2c7863c6 Mon Sep 17 00:00:00 2001

+ From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur@gmail.com>

+ Date: Sun, 28 Jul 2019 19:03:56 +0100

+ Subject: [PATCH 09/16] 3.6.4 update JlsParameters for new CharLS

+ 

+ ---

+  dcmjpls/libsrc/djcodecd.cc |  4 ++--

+  dcmjpls/libsrc/djcodece.cc | 18 +++++++++---------

+  2 files changed, 11 insertions(+), 11 deletions(-)

+ 

+ diff --git a/dcmjpls/libsrc/djcodecd.cc b/dcmjpls/libsrc/djcodecd.cc

+ index 3f906b783..ece4a5e10 100644

+ --- a/dcmjpls/libsrc/djcodecd.cc

+ +++ b/dcmjpls/libsrc/djcodecd.cc

+ @@ -393,8 +393,8 @@ OFCondition DJLSDecoderBase::decodeFrame(

+        if (params.width != imageColumns) result = EC_JLSImageDataMismatch;

+        else if (params.height != imageRows) result = EC_JLSImageDataMismatch;

+        else if (params.components != imageSamplesPerPixel) result = EC_JLSImageDataMismatch;

+ -      else if ((bytesPerSample == 1) && (params.bitspersample > 8)) result = EC_JLSImageDataMismatch;

+ -      else if ((bytesPerSample == 2) && (params.bitspersample <= 8)) result = EC_JLSImageDataMismatch;

+ +      else if ((bytesPerSample == 1) && (params.bitsPerSample > 8)) result = EC_JLSImageDataMismatch;

+ +      else if ((bytesPerSample == 2) && (params.bitsPerSample <= 8)) result = EC_JLSImageDataMismatch;

+      }

+  

+      if (!result.good())

+ diff --git a/dcmjpls/libsrc/djcodece.cc b/dcmjpls/libsrc/djcodece.cc

+ index 98a9ceccb..8e68f7386 100644

+ --- a/dcmjpls/libsrc/djcodece.cc

+ +++ b/dcmjpls/libsrc/djcodece.cc

+ @@ -569,13 +569,13 @@ OFCondition DJLSEncoderBase::compressRawFrame(

+  

+    // Set up the information structure for CharLS

+    OFBitmanipTemplate<char>::zeroMem((char *) &jls_params, sizeof(jls_params));

+ -  jls_params.bitspersample = bitsAllocated;

+ +  jls_params.bitsPerSample = bitsAllocated;

+    jls_params.height = height;

+    jls_params.width = width;

+ -  jls_params.allowedlossyerror = 0; // must be zero for raw mode

+ +  jls_params.allowedLossyError = 0; // must be zero for raw mode

+    jls_params.outputBgr = false;

+    // No idea what this one does, but I don't think DICOM says anything about it

+ -  jls_params.colorTransform = 0;

+ +  jls_params.colorTransformation = 0;

+  

+    // Unset: jls_params.jfif (thumbnail, dpi)

+  

+ @@ -998,11 +998,11 @@ OFCondition DJLSEncoderBase::compressCookedFrame(

+    OFBitmanipTemplate<char>::zeroMem((char *) &jls_params, sizeof(jls_params));

+    jls_params.height = height;

+    jls_params.width = width;

+ -  jls_params.allowedlossyerror = nearLosslessDeviation;

+ +  jls_params.allowedLossyError = nearLosslessDeviation;

+    jls_params.outputBgr = false;

+ -  jls_params.bitspersample = depth;

+ +  jls_params.bitsPerSample = depth;

+    // No idea what this one does, but I don't think DICOM says anything about it

+ -  jls_params.colorTransform = 0;

+ +  jls_params.colorTransformation = 0;

+  

+    // This was already checked for a sane value above

+    jls_params.components = samplesPerPixel;

+ @@ -1010,11 +1010,11 @@ OFCondition DJLSEncoderBase::compressCookedFrame(

+    {

+      case EPR_Uint8:

+      case EPR_Sint8:

+ -      jls_params.bitspersample = 8;

+ +      jls_params.bitsPerSample = 8;

+        break;

+      case EPR_Uint16:

+      case EPR_Sint16:

+ -      jls_params.bitspersample = 16;

+ +      jls_params.bitsPerSample = 16;

+        break;

+      default:

+        // Everything else was already handled above and can't happen here

+ @@ -1064,7 +1064,7 @@ OFCondition DJLSEncoderBase::compressCookedFrame(

+  

+      frameBuffer = new Uint8[buffer_size];

+      framePointer = frameBuffer;

+ -    result = convertToUninterleaved(frameBuffer, buffer, samplesPerPixel, width, height, jls_params.bitspersample);

+ +    result = convertToUninterleaved(frameBuffer, buffer, samplesPerPixel, width, height, jls_params.bitsPerSample);

+    }

+  

+    size_t compressed_buffer_size = buffer_size + 1024;

+ -- 

+ 2.21.0

+ 

@@ -0,0 +1,25 @@ 

+ From dd0121ad580126742679c691b52549414baef36f Mon Sep 17 00:00:00 2001

+ From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur@gmail.com>

+ Date: Sun, 28 Jul 2019 19:06:44 +0100

+ Subject: [PATCH 10/16] 3.6.4 correct JpegLsDecode arguments for CharLS 2

+ 

+ ---

+  dcmjpls/libsrc/djcodecd.cc | 2 +-

+  1 file changed, 1 insertion(+), 1 deletion(-)

+ 

+ diff --git a/dcmjpls/libsrc/djcodecd.cc b/dcmjpls/libsrc/djcodecd.cc

+ index ece4a5e10..6f1ddba61 100644

+ --- a/dcmjpls/libsrc/djcodecd.cc

+ +++ b/dcmjpls/libsrc/djcodecd.cc

+ @@ -403,7 +403,7 @@ OFCondition DJLSDecoderBase::decodeFrame(

+      }

+      else

+      {

+ -      err = JpegLsDecode(buffer, bufSize, jlsData, compressedSize, &params);

+ +      err = JpegLsDecode(buffer, bufSize, jlsData, compressedSize, &params, NULL);

+        result = DJLSError::convert(err);

+        delete[] jlsData;

+  

+ -- 

+ 2.21.0

+ 

@@ -0,0 +1,151 @@ 

+ From e31292ddd7f296e88a390566e632e5eab25eabb1 Mon Sep 17 00:00:00 2001

+ From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur@gmail.com>

+ Date: Sun, 28 Jul 2019 19:20:49 +0100

+ Subject: [PATCH 11/16] 3.6.4 update ilv for new CharLS

+ 

+ ---

+  dcmjpls/libsrc/djcodecd.cc |  4 ++--

+  dcmjpls/libsrc/djcodece.cc | 48 +++++++++++++++++++-------------------

+  2 files changed, 26 insertions(+), 26 deletions(-)

+ 

+ diff --git a/dcmjpls/libsrc/djcodecd.cc b/dcmjpls/libsrc/djcodecd.cc

+ index 6f1ddba61..2e36680cd 100644

+ --- a/dcmjpls/libsrc/djcodecd.cc

+ +++ b/dcmjpls/libsrc/djcodecd.cc

+ @@ -409,7 +409,7 @@ OFCondition DJLSDecoderBase::decodeFrame(

+  

+        if (result.good() && imageSamplesPerPixel == 3)

+        {

+ -        if (imagePlanarConfiguration == 1 && params.ilv != ILV_NONE)

+ +        if (imagePlanarConfiguration == 1 && params.interleaveMode != charls::InterleaveMode::None)

+          {

+            // The dataset says this should be planarConfiguration == 1, but

+            // it isn't -> convert it.

+ @@ -419,7 +419,7 @@ OFCondition DJLSDecoderBase::decodeFrame(

+            else

+              result = createPlanarConfiguration1Word(OFreinterpret_cast(Uint16*, buffer), imageColumns, imageRows);

+          }

+ -        else if (imagePlanarConfiguration == 0 && params.ilv != ILV_SAMPLE && params.ilv != ILV_LINE)

+ +        else if (imagePlanarConfiguration == 0 && params.interleaveMode != charls::InterleaveMode::Sample && params.interleaveMode != charls::InterleaveMode::Line)

+          {

+            // The dataset says this should be planarConfiguration == 0, but

+            // it isn't -> convert it.

+ diff --git a/dcmjpls/libsrc/djcodece.cc b/dcmjpls/libsrc/djcodece.cc

+ index 8e68f7386..9e06d842a 100644

+ --- a/dcmjpls/libsrc/djcodece.cc

+ +++ b/dcmjpls/libsrc/djcodece.cc

+ @@ -597,15 +597,15 @@ OFCondition DJLSEncoderBase::compressRawFrame(

+    else

+      return EC_IllegalCall;

+  

+ -  enum interleavemode ilv;

+ +  CharlsInterleaveModeType ilv;

+    switch (planarConfiguration)

+    {

+ -    // ILV_LINE is not supported by DICOM

+ +    // charls::InterleaveMode::Line is not supported by DICOM

+      case 0:

+ -      ilv = ILV_SAMPLE;

+ +      ilv = charls::InterleaveMode::Sample;

+        break;

+      case 1:

+ -      ilv = ILV_NONE;

+ +      ilv = charls::InterleaveMode::None;

+        break;

+      default:

+        return EC_IllegalCall;

+ @@ -614,39 +614,39 @@ OFCondition DJLSEncoderBase::compressRawFrame(

+    switch (djcp->getJplsInterleaveMode())

+    {

+      case DJLSCodecParameter::interleaveSample:

+ -      jls_params.ilv = ILV_SAMPLE;

+ +      jls_params.interleaveMode = charls::InterleaveMode::Sample;

+        break;

+      case DJLSCodecParameter::interleaveLine:

+ -      jls_params.ilv = ILV_LINE;

+ +      jls_params.interleaveMode = charls::InterleaveMode::Line;

+        break;

+      case DJLSCodecParameter::interleaveNone:

+ -      jls_params.ilv = ILV_NONE;

+ +      jls_params.interleaveMode = charls::InterleaveMode::None;

+        break;

+      case DJLSCodecParameter::interleaveDefault:

+      default:

+        // In default mode we just never convert the image to another

+        // interleave-mode. Instead, we use what is already there.

+ -      jls_params.ilv = ilv;

+ +      jls_params.interleaveMode = ilv;

+        break;

+    }

+  

+ -  // Special case: one component images are always ILV_NONE (Standard requires this)

+ +  // Special case: one component images are always charls::InterleaveMode::None (Standard requires this)

+    if (jls_params.components == 1)

+    {

+ -    jls_params.ilv = ILV_NONE;

+ +    jls_params.interleaveMode = charls::InterleaveMode::None;

+      // Don't try to convert to another interleave mode, not necessary

+ -    ilv = ILV_NONE;

+ +    ilv = charls::InterleaveMode::None;

+    }

+  

+    // Do we have to convert the image to some other interleave mode?

+ -  if ((jls_params.ilv == ILV_NONE && (ilv == ILV_SAMPLE || ilv == ILV_LINE)) ||

+ -      (ilv == ILV_NONE && (jls_params.ilv == ILV_SAMPLE || jls_params.ilv == ILV_LINE)))

+ +  if ((jls_params.interleaveMode == charls::InterleaveMode::None && (ilv == charls::InterleaveMode::Sample || ilv == charls::InterleaveMode::Line)) ||

+ +      (ilv == charls::InterleaveMode::None && (jls_params.interleaveMode == charls::InterleaveMode::Sample || jls_params.interleaveMode == charls::InterleaveMode::Line)))

+    {

+ -    DCMJPLS_DEBUG("Converting image from " << (ilv == ILV_NONE ? "color-by-plane" : "color-by-pixel")

+ -          << " to " << (jls_params.ilv == ILV_NONE ? "color-by-plane" : "color-by-pixel"));

+ +    DCMJPLS_DEBUG("Converting image from " << (ilv == charls::InterleaveMode::None ? "color-by-plane" : "color-by-pixel")

+ +          << " to " << (jls_params.interleaveMode == charls::InterleaveMode::None ? "color-by-plane" : "color-by-pixel"));

+  

+      frameBuffer = new Uint8[frameSize];

+ -    if (jls_params.ilv == ILV_NONE)

+ +    if (jls_params.interleaveMode == charls::InterleaveMode::None)

+        result = convertToUninterleaved(frameBuffer, framePointer, samplesPerPixel, width, height, bitsAllocated);

+      else

+        /* For CharLS, sample-interleaved and line-interleaved is both expected to

+ @@ -1034,31 +1034,31 @@ OFCondition DJLSEncoderBase::compressCookedFrame(

+    switch (djcp->getJplsInterleaveMode())

+    {

+      case DJLSCodecParameter::interleaveSample:

+ -      jls_params.ilv = ILV_SAMPLE;

+ +      jls_params.interleaveMode = charls::InterleaveMode::Sample;

+        break;

+      case DJLSCodecParameter::interleaveLine:

+ -      jls_params.ilv = ILV_LINE;

+ +      jls_params.interleaveMode = charls::InterleaveMode::Line;

+        break;

+      case DJLSCodecParameter::interleaveNone:

+ -      jls_params.ilv = ILV_NONE;

+ +      jls_params.interleaveMode = charls::InterleaveMode::None;

+        break;

+      case DJLSCodecParameter::interleaveDefault:

+      default:

+ -      // Default for the cooked encoder is always ILV_LINE

+ -      jls_params.ilv = ILV_LINE;

+ +      // Default for the cooked encoder is always charls::InterleaveMode::Line

+ +      jls_params.interleaveMode = charls::InterleaveMode::Line;

+        break;

+    }

+  

+ -  // Special case: one component images are always ILV_NONE (Standard requires this)

+ +  // Special case: one component images are always CharlsInterleaveMode.None (Standard requires this)

+    if (jls_params.components == 1)

+    {

+ -    jls_params.ilv = ILV_NONE;

+ +    jls_params.interleaveMode = charls::InterleaveMode::None;

+    }

+  

+    Uint8 *frameBuffer = NULL;

+    Uint8 *framePointer = buffer;

+    // Do we have to convert the image to color-by-plane now?

+ -  if (jls_params.ilv == ILV_NONE && jls_params.components != 1)

+ +  if (jls_params.interleaveMode == charls::InterleaveMode::None && jls_params.components != 1)

+    {

+      DCMJPLS_DEBUG("Converting image from color-by-pixel to color-by-plane");

+  

+ -- 

+ 2.21.0

+ 

@@ -0,0 +1,52 @@ 

+ From 7b20ec2b206ac325bb8b18aaad2ef704959abb7e Mon Sep 17 00:00:00 2001

+ From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur@gmail.com>

+ Date: Sun, 28 Jul 2019 19:43:48 +0100

+ Subject: [PATCH 12/16] 3.6.4 Correct extra include for CharLS

+ 

+ ---

+  dcmjpls/libsrc/djcodecd.cc | 2 +-

+  dcmjpls/libsrc/djcodece.cc | 2 +-

+  dcmjpls/libsrc/djerror.h   | 1 +

+  3 files changed, 3 insertions(+), 2 deletions(-)

+ 

+ diff --git a/dcmjpls/libsrc/djcodecd.cc b/dcmjpls/libsrc/djcodecd.cc

+ index 2e36680cd..b2ad93d60 100644

+ --- a/dcmjpls/libsrc/djcodecd.cc

+ +++ b/dcmjpls/libsrc/djcodecd.cc

+ @@ -38,7 +38,7 @@

+  

+  // JPEG-LS library (CharLS) includes

+  #include "CharLS/charls.h"

+ -#include "CharLS/public_types.h"

+ +#include "CharLS/publictypes.h"

+  

+  E_TransferSyntax DJLSLosslessDecoder::supportedTransferSyntax() const

+  {

+ diff --git a/dcmjpls/libsrc/djcodece.cc b/dcmjpls/libsrc/djcodece.cc

+ index 9e06d842a..d91965c25 100644

+ --- a/dcmjpls/libsrc/djcodece.cc

+ +++ b/dcmjpls/libsrc/djcodece.cc

+ @@ -56,7 +56,7 @@

+  

+  // JPEG-LS library (CharLS) includes

+  #include "CharLS/charls.h"

+ -#include "CharLS/public_types.h"

+ +#include "CharLS/publictypes.h"

+  

+  BEGIN_EXTERN_C

+  #ifdef HAVE_FCNTL_H

+ diff --git a/dcmjpls/libsrc/djerror.h b/dcmjpls/libsrc/djerror.h

+ index a701dbada..e0a4a3022 100644

+ --- a/dcmjpls/libsrc/djerror.h

+ +++ b/dcmjpls/libsrc/djerror.h

+ @@ -25,6 +25,7 @@

+  #include "dcmtk/config/osconfig.h"

+  #include "dcmtk/dcmjpls/djlsutil.h" /* For the OFCondition codes */

+  #include "CharLS/charls.h" /* CharLS include */

+ +#include "CharLS/publictypes.h" /* CharLS include */

+  

+  /** Helper class for converting between dcmjpls and CharLS error codes

+   */

+ -- 

+ 2.21.0

+ 

@@ -0,0 +1,52 @@ 

+ From f937b086b59f2d882067ffb280243bc286b18a97 Mon Sep 17 00:00:00 2001

+ From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur@gmail.com>

+ Date: Sun, 28 Jul 2019 21:26:28 +0100

+ Subject: [PATCH 13/16] 3.6.4 Update errors to use enum class in CharLS 2

+ 

+ ---

+  dcmjpls/libsrc/djerror.h | 20 ++++++++++----------

+  1 file changed, 10 insertions(+), 10 deletions(-)

+ 

+ diff --git a/dcmjpls/libsrc/djerror.h b/dcmjpls/libsrc/djerror.h

+ index e0a4a3022..e1a88f359 100644

+ --- a/dcmjpls/libsrc/djerror.h

+ +++ b/dcmjpls/libsrc/djerror.h

+ @@ -45,25 +45,25 @@ public:

+    {

+      switch (error)

+      {

+ -      case OK:

+ +        case charls::ApiResult::OK:

+          return EC_Normal;

+ -      case UncompressedBufferTooSmall:

+ +      case charls::ApiResult::UncompressedBufferTooSmall:

+          return EC_JLSUncompressedBufferTooSmall;

+ -      case CompressedBufferTooSmall:

+ +      case charls::ApiResult::CompressedBufferTooSmall:

+          return EC_JLSCompressedBufferTooSmall;

+ -      case ImageTypeNotSupported:

+ +      case charls::ApiResult::ImageTypeNotSupported:

+          return EC_JLSCodecUnsupportedImageType;

+ -      case InvalidJlsParameters:

+ +      case charls::ApiResult::InvalidJlsParameters:

+          return EC_JLSCodecInvalidParameters;

+ -      case ParameterValueNotSupported:

+ +      case charls::ApiResult::ParameterValueNotSupported:

+          return EC_JLSCodecUnsupportedValue;

+ -      case InvalidCompressedData:

+ +      case charls::ApiResult::InvalidCompressedData:

+          return EC_JLSInvalidCompressedData;

+ -      case UnsupportedBitDepthForTransform:

+ +      case charls::ApiResult::UnsupportedBitDepthForTransform:

+          return EC_JLSUnsupportedBitDepthForTransform;

+ -      case UnsupportedColorTransform:

+ +      case charls::ApiResult::UnsupportedColorTransform:

+          return EC_JLSUnsupportedColorTransform;

+ -      case TooMuchCompressedData:

+ +      case charls::ApiResult::TooMuchCompressedData:

+          return EC_JLSTooMuchCompressedData;

+        default:

+          return EC_IllegalParameter;

+ -- 

+ 2.21.0

+ 

@@ -0,0 +1,26 @@ 

+ From 678ec1ddce7370aecaa1e46e9f421cb550edd613 Mon Sep 17 00:00:00 2001

+ From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur@gmail.com>

+ Date: Sun, 28 Jul 2019 22:20:51 +0100

+ Subject: [PATCH 14/16] 3.6.4 define BYTE for CharLS

+ 

+ ---

+  dcmjpls/libsrc/djcodece.cc | 3 +++

+  1 file changed, 3 insertions(+)

+ 

+ diff --git a/dcmjpls/libsrc/djcodece.cc b/dcmjpls/libsrc/djcodece.cc

+ index d91965c25..c6f4a5596 100644

+ --- a/dcmjpls/libsrc/djcodece.cc

+ +++ b/dcmjpls/libsrc/djcodece.cc

+ @@ -70,6 +70,9 @@ BEGIN_EXTERN_C

+  #endif

+  END_EXTERN_C

+  

+ +// No longer defined in charls

+ +typedef unsigned char BYTE;

+ +

+  

+  E_TransferSyntax DJLSLosslessEncoder::supportedTransferSyntax() const

+  {

+ -- 

+ 2.21.0

+ 

@@ -0,0 +1,34 @@ 

+ From a7a973999bbfb30ec7113e6e6a92b2f340654661 Mon Sep 17 00:00:00 2001

+ From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur@gmail.com>

+ Date: Sun, 28 Jul 2019 22:44:56 +0100

+ Subject: [PATCH 15/16] 3.6.4 Update colorTransformation for CharLS 2

+ 

+ ---

+  dcmjpls/libsrc/djcodece.cc | 4 ++--

+  1 file changed, 2 insertions(+), 2 deletions(-)

+ 

+ diff --git a/dcmjpls/libsrc/djcodece.cc b/dcmjpls/libsrc/djcodece.cc

+ index c6f4a5596..707b94dcb 100644

+ --- a/dcmjpls/libsrc/djcodece.cc

+ +++ b/dcmjpls/libsrc/djcodece.cc

+ @@ -578,7 +578,7 @@ OFCondition DJLSEncoderBase::compressRawFrame(

+    jls_params.allowedLossyError = 0; // must be zero for raw mode

+    jls_params.outputBgr = false;

+    // No idea what this one does, but I don't think DICOM says anything about it

+ -  jls_params.colorTransformation = 0;

+ +  jls_params.colorTransformation = charls::ColorTransformation::None;

+  

+    // Unset: jls_params.jfif (thumbnail, dpi)

+  

+ @@ -1005,7 +1005,7 @@ OFCondition DJLSEncoderBase::compressCookedFrame(

+    jls_params.outputBgr = false;

+    jls_params.bitsPerSample = depth;

+    // No idea what this one does, but I don't think DICOM says anything about it

+ -  jls_params.colorTransformation = 0;

+ +  jls_params.colorTransformation = charls::ColorTransformation::None;

+  

+    // This was already checked for a sane value above

+    jls_params.components = samplesPerPixel;

+ -- 

+ 2.21.0

+ 

@@ -0,0 +1,34 @@ 

+ From a9c64548cd7e8e2dc8bf6b5759a7a16ddae1169a Mon Sep 17 00:00:00 2001

+ From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur@gmail.com>

+ Date: Sun, 28 Jul 2019 22:48:27 +0100

+ Subject: [PATCH 16/16] 3.6.4 Update JpegLsEncode for CharLS 2

+ 

+ ---

+  dcmjpls/libsrc/djcodece.cc | 4 ++--

+  1 file changed, 2 insertions(+), 2 deletions(-)

+ 

+ diff --git a/dcmjpls/libsrc/djcodece.cc b/dcmjpls/libsrc/djcodece.cc

+ index 707b94dcb..87120a5b9 100644

+ --- a/dcmjpls/libsrc/djcodece.cc

+ +++ b/dcmjpls/libsrc/djcodece.cc

+ @@ -668,7 +668,7 @@ OFCondition DJLSEncoderBase::compressRawFrame(

+  

+      size_t bytesWritten = 0;

+  

+ -    CharlsApiResultType err = JpegLsEncode(buffer, size, &bytesWritten, framePointer, frameSize, &jls_params);

+ +    CharlsApiResultType err = JpegLsEncode(buffer, size, &bytesWritten, framePointer, frameSize, &jls_params, NULL);

+      result = DJLSError::convert(err);

+  

+      if (result.good())

+ @@ -1075,7 +1075,7 @@ OFCondition DJLSEncoderBase::compressCookedFrame(

+  

+    size_t bytesWritten = 0;

+  

+ -  CharlsApiResultType err = JpegLsEncode(compressed_buffer, compressed_buffer_size, &bytesWritten, framePointer, buffer_size, &jls_params);

+ +  CharlsApiResultType err = JpegLsEncode(compressed_buffer, compressed_buffer_size, &bytesWritten, framePointer, buffer_size, &jls_params, NULL);

+    result = DJLSError::convert(err);

+  

+    if (result.good())

+ -- 

+ 2.21.0

+ 

@@ -1,53 +0,0 @@ 

- From a86cb1e1d622951d8345f0283837b20d8df707d0 Mon Sep 17 00:00:00 2001

- From: Mario Ceresa <mario.ceresa@upf.edu>

- Date: Mon, 15 Dec 2014 12:28:55 +0100

- Subject: [PATCH] Create FindCharLS.cmake

- 

- ---

-  CMake/FindCharLS.cmake | 34 ++++++++++++++++++++++++++++++++++

-  1 file changed, 34 insertions(+)

-  create mode 100644 CMake/FindCharLS.cmake

- 

- diff --git a/CMake/FindCharLS.cmake b/CMake/FindCharLS.cmake

- new file mode 100644

- index 0000000..eaa45b7

- --- /dev/null

- +++ b/CMake/FindCharLS.cmake

- @@ -0,0 +1,34 @@

- +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.9.3

- 

@@ -1,36 +0,0 @@ 

- From 9cc2c06d89d357a22065913abb0ab3ccda5a732b Mon Sep 17 00:00:00 2001

- From: Mario Ceresa <mario.ceresa@upf.edu>

- Date: Mon, 15 Dec 2014 12:22:00 +0100

- Subject: [PATCH] Find and include CharLS

- 

- ---

-  CMake/3rdparty.cmake | 14 ++++++++++++++

-  1 file changed, 14 insertions(+)

- 

- diff --git a/CMake/3rdparty.cmake b/CMake/3rdparty.cmake

- index 9fcca77..2ccda35 100755

- --- a/CMake/3rdparty.cmake

- +++ b/CMake/3rdparty.cmake

- @@ -306,6 +306,22 @@

-      endif()

-    endif()

-  

- +  # Find charls

- +  SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMake)

- +  

- +  if(DCMTK_WITH_CHARLS)

- +    FIND_PACKAGE(CharLS)

- +    INCLUDE_DIRECTORIES(${CHARLS_INCLUDE_DIRS})

- +    SET(CHARLS_LIBS ${CHARLS_LIBRARIES})

- +    if (NOT CHARLS_LIBS)

- +      MESSAGE(STATUS "Warning: CharLS not found. Cannot build!")

- +    else(NOT CHARLS_LIBS)

- +      MESSAGE(STATUS "Info: DCMTK CHARLS support will be enabled")

- +      SET(WITH_CHARLS 1)

- +    endif(NOT CHARLS_LIBS)

- +  endif(DCMTK_WITH_CHARLS)

- +

- +

-  endif()

-  

-  if(NOT DEFINED DCMTK_WITH_STDLIBC_ICONV)

file modified
+27 -11
@@ -1,20 +1,33 @@ 

  Name: dcmtk

  Summary: Offis DICOM Toolkit (DCMTK)

  Version: 3.6.4

- Release: 2%{?dist}

+ Release: 3%{?dist}

  License: BSD

- Source0: http://dicom.offis.de/download/dcmtk/dcmtk362/%{name}-%{version}.tar.gz

+ Source0: ftp://dicom.offis.de/pub/dicom/offis/software/dcmtk/dcmtk364/dcmtk-3.6.4.tar.gz

  URL: http://dicom.offis.de/dcmtk.php.en

  

- Patch1: dcmtk-%{version}-0001-Removed-reference-to-bundled-libcharls.patch

- Patch2: dcmtk-%{version}-0002-Find-and-include-CharLS.patch

- Patch3: dcmtk-3.6.1-0003-Create-FindCharLS.cmake.patch

- Patch4: dcmtk-%{version}-0004-Use-cmake-suggested-location-for-CharLS.patch

- Patch5: dcmtk-3.6.0-0005-Fixed-includes-for-CharLS-1.0.patch

- Patch6: dcmtk-3.6.2-0006-libcharls-changed-api.patch

+ Patch0:     0001-3.6.4-Use-system-CharLS-include.patch

+ Patch1:     0002-3.6.4-Add-FindCharLS.patch

+ Patch2:     0003-3.6.4-Find-and-include-CharLS.patch

+ Patch3:     0004-3.6.4-Use-cmake-suggested-locations-for-CharLS.patch

+ Patch4:     0005-3.6.4-Correct-CharLS-API-call.patch

+ Patch5:     0006-3.6.4-Remove-reference-to-bundled-CharLS.patch

+ Patch6:     0007-3.6.4-Update-JLS_ERROR-to-jpegls_error-in-CharLS-usa.patch

+ Patch7:     0008-3.6.4-correct-JpegLsReadHeader-arguments.patch

+ Patch8:     0009-3.6.4-update-JlsParameters-for-new-CharLS.patch

+ Patch9:     0010-3.6.4-correct-JpegLsDecode-arguments-for-CharLS-2.patch

+ Patch10:    0011-3.6.4-update-ilv-for-new-CharLS.patch

+ Patch11:    0012-3.6.4-Correct-extra-include-for-CharLS.patch

+ Patch12:    0013-3.6.4-Update-errors-to-use-enum-class-in-CharLS-2.patch

+ Patch13:    0014-3.6.4-define-BYTE-for-CharLS.patch

+ Patch14:    0015-3.6.4-Update-colorTransformation-for-CharLS-2.patch

+ Patch15:    0016-3.6.4-Update-JpegLsEncode-for-CharLS-2.patch

+ 

+ 

  

  BuildRequires: gcc

  BuildRequires: gcc-c++

+ BuildRequires: git-core

  BuildRequires: cmake

  BuildRequires: libjpeg-devel

  BuildRequires: libpng-devel
@@ -22,7 +35,7 @@ 

  BuildRequires: libxml2-devel

  BuildRequires: openssl-devel >= 1.0.1

  BuildRequires: zlib-devel

- BuildRequires: CharLS-devel

+ BuildRequires: CharLS-devel >= 2.0.0

  BuildRequires: doxygen

  

  %description
@@ -49,7 +62,7 @@ 

  this if you are developing programs that use the dcmtk libraries.

  

  %prep

- %autosetup -n %{name}-%{version} -p1

+ %autosetup -n %{name}-%{version} -p1 -S git

  

  # Remove bundled libraries

  rm -rf dcmjpls/libcharls/
@@ -117,6 +130,9 @@ 

  %{_libdir}/cmake/%{name}/

  

  %changelog

+ * Sun Jul 28 2019 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 3.6.4-3

+ - Update to use CharLS v2

+ 

  * Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.6.4-2

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

  
@@ -240,7 +256,7 @@ 

  - multiple fixes/enhancements from pdcmtk version 48

  

  * Sat Jan 02 2010 Andy Loening <loening@ alum dot mit dot edu> 3.5.4-2

- - tlslayer.cc patch for openssl 1.0 

+ - tlslayer.cc patch for openssl 1.0

  

  * Thu Feb 02 2006 Andy Loening <loening @ alum dot mit dot edu> 3.5.4-1

  - initial build

Lots of changes to get dcmtk to work with charls 2.

Needs charls to be updated to version 2.0.0 first.

https://src.fedoraproject.org/rpms/CharLS/pull-request/1#

Sent upstream: https://github.com/DCMTK/dcmtk/pull/18

Sorry, I pushed to the main repo by mistake, had it set up as origin. Reverted it immediately, though.

Pull-Request has been closed by ankursinha

4 years ago
Metadata