diff --git a/Modules/ThirdParty/GDCM/src/gdcm/CMakeLists.txt b/Modules/ThirdParty/GDCM/src/gdcm/CMakeLists.txt
index 37aa45fe0a3..d1406758dcd 100644
--- a/Modules/ThirdParty/GDCM/src/gdcm/CMakeLists.txt
+++ b/Modules/ThirdParty/GDCM/src/gdcm/CMakeLists.txt
@@ -319,7 +319,7 @@ option(GDCM_USE_SYSTEM_PAPYRUS3 "Use system papyrus3" OFF)
option(GDCM_USE_SYSTEM_SOCKETXX "Use system socket++" OFF)
option(GDCM_USE_SYSTEM_LJPEG "Use system ljpeg (ijg lib)" OFF)
option(GDCM_USE_SYSTEM_OPENJPEG "Use system openjpeg" OFF)
-option(GDCM_USE_SYSTEM_CHARLS "Use system CharLS" OFF)
+option(GDCM_USE_SYSTEM_CHARLS "Use system charls" OFF)
mark_as_advanced(
GDCM_USE_SYSTEM_ZLIB
GDCM_USE_SYSTEM_OPENSSL
@@ -352,8 +352,9 @@ else()
endif()
if(GDCM_USE_SYSTEM_CHARLS)
- find_package(CharLS 2.0.0 REQUIRED)
- set(GDCM_CHARLS_LIBRARIES ${CHARLS_LIBRARIES})
+ find_package(charls 2.2.0 REQUIRED)
+ set(GDCM_CHARLS_LIBRARIES charls)
+ message(STATUS "Found charls version " ${charls_VERSION})
else()
set(GDCM_CHARLS_LIBRARIES gdcmcharls)
endif()
diff --git a/Modules/ThirdParty/GDCM/src/gdcm/Source/DataDictionary/gdcmPrivateDefaultDicts.cxx b/Modules/ThirdParty/GDCM/src/gdcm/Source/DataDictionary/gdcmPrivateDefaultDicts.cxx
index 21a92a5e207..77df005bf66 100644
--- a/Modules/ThirdParty/GDCM/src/gdcm/Source/DataDictionary/gdcmPrivateDefaultDicts.cxx
+++ b/Modules/ThirdParty/GDCM/src/gdcm/Source/DataDictionary/gdcmPrivateDefaultDicts.cxx
@@ -469,7 +469,7 @@ static const DICT_ENTRY DICOMV3DataDict [] = {
{0x0019,0x00f0,"CANON_MEC_MR3^10",VR::SL,VM::VM1,"?",false },
{0x0019,0x00f1,"CANON_MEC_MR3^10",VR::FL,VM::VM1,"?",false },
{0x0019,0x00f1,"CANON_MEC_MR3^12",VR::LO,VM::VM1,"?",false },
- {0x0019,0x00f1,"CANON_MEC_MR3^11",VR::SL,VM::VM3,"?",false },
+ {0x0019,0x00f1,"CANON_MEC_MR3^11",VR::SL,VM::VM3,"Diffusion b-value x Toshiba Orientation",false },
{0x0019,0x00f2,"CANON_MEC_MR3^10",VR::FL,VM::VM1,"?",false },
{0x0019,0x00f2,"CANON_MEC_MR3^11",VR::FL,VM::VM3,"?",false },
{0x0019,0x00f3,"CANON_MEC_MR3^10",VR::SL,VM::VM1,"?",false },
@@ -521,7 +521,7 @@ static const DICT_ENTRY DICOMV3DataDict [] = {
{0x0021,0x001f,"CANON_MEC_MR3^10",VR::US,VM::VM1,"?",false },
{0x0021,0x0022,"CANON_MEC_MR3^10",VR::US,VM::VM1,"?",false },
{0x0021,0x0023,"CANON_MEC_MR3^10",VR::SS,VM::VM1,"?",false },
- {0x0029,0x0001,"CANON_MEC_MR3^10",VR::SL,VM::VM1,"?",false },
+ {0x0029,0x0001,"CANON_MEC_MR3^10",VR::SL,VM::VM3,"Diffusion Gradient Orientation / Toshiba Orientation",false },
{0x0029,0x0005,"CANON_MEC_MR3^10",VR::SQ,VM::VM1,"?",false },
{0x0029,0x0006,"CANON_MEC_MR3^10",VR::FL,VM::VM1,"?",false },
{0x0029,0x0007,"CANON_MEC_MR3^10",VR::FL,VM::VM1,"?",false },
@@ -532,7 +532,7 @@ static const DICT_ENTRY DICOMV3DataDict [] = {
{0x0029,0x0051,"CANON_MEC_MR3^10",VR::LO,VM::VM1,"?",false },
{0x0029,0x0052,"CANON_MEC_MR3^10",VR::LO,VM::VM1,"?",false },
{0x0029,0x0054,"CANON_MEC_MR3^10",VR::LO,VM::VM1,"?",false },
- {0x0029,0x0067,"CANON_MEC_MR3^10",VR::FD,VM::VM4,"?",false },
+ {0x0029,0x0067,"CANON_MEC_MR3^10",VR::FD,VM::VM4,"Series Diffusion Info (b-value,x,y,z)",false },
{0x0029,0x0068,"CANON_MEC_MR3^10",VR::SS,VM::VM1,"?",false },
{0x0029,0x006e,"CANON_MEC_MR3^10",VR::OB,VM::VM1,"?",false },
{0x0029,0x0001,"CANON_MEC_MR3",VR::SQ,VM::VM1,"Other Private Data",false },
@@ -1025,7 +1025,7 @@ static const DICT_ENTRY DICOMV3DataDict [] = {
{0x0019,0x00f0,"TOSHIBA_MEC_MR3^11",VR::SL,VM::VM4,"?",false },
{0x0019,0x00f1,"TOSHIBA_MEC_MR3^10",VR::FL,VM::VM1,"?",false },
{0x0019,0x00f1,"TOSHIBA_MEC_MR3^12",VR::LO,VM::VM1,"?",false },
- {0x0019,0x00f1,"TOSHIBA_MEC_MR3^11",VR::SL,VM::VM3,"?",false },
+ {0x0019,0x00f1,"TOSHIBA_MEC_MR3^11",VR::SL,VM::VM3,"Diffusion b-value x Toshiba Orientation",false },
{0x0019,0x00f2,"TOSHIBA_MEC_MR3^10",VR::FL,VM::VM1,"?",false },
{0x0019,0x00f2,"TOSHIBA_MEC_MR3^11",VR::FL,VM::VM3,"?",false },
{0x0019,0x00f3,"TOSHIBA_MEC_MR3^10",VR::SL,VM::VM1,"?",false },
@@ -1077,7 +1077,7 @@ static const DICT_ENTRY DICOMV3DataDict [] = {
{0x0021,0x001f,"TOSHIBA_MEC_MR3^10",VR::US,VM::VM1,"?",false },
{0x0021,0x0022,"TOSHIBA_MEC_MR3^10",VR::US,VM::VM1,"?",false },
{0x0021,0x0023,"TOSHIBA_MEC_MR3^10",VR::SS,VM::VM1,"?",false },
- {0x0029,0x0001,"TOSHIBA_MEC_MR3^10",VR::SL,VM::VM1,"?",false },
+ {0x0029,0x0001,"TOSHIBA_MEC_MR3^10",VR::SL,VM::VM3,"Diffusion Gradient Orientation / Toshiba Orientation",false },
{0x0029,0x0005,"TOSHIBA_MEC_MR3^10",VR::SQ,VM::VM1,"?",false },
{0x0029,0x0006,"TOSHIBA_MEC_MR3^10",VR::FL,VM::VM1,"?",false },
{0x0029,0x0007,"TOSHIBA_MEC_MR3^10",VR::FL,VM::VM1,"?",false },
@@ -1088,7 +1088,7 @@ static const DICT_ENTRY DICOMV3DataDict [] = {
{0x0029,0x0051,"TOSHIBA_MEC_MR3^10",VR::LO,VM::VM1,"?",false },
{0x0029,0x0052,"TOSHIBA_MEC_MR3^10",VR::LO,VM::VM1,"?",false },
{0x0029,0x0054,"TOSHIBA_MEC_MR3^10",VR::LO,VM::VM1,"?",false },
- {0x0029,0x0067,"TOSHIBA_MEC_MR3^10",VR::FD,VM::VM4,"?",false },
+ {0x0029,0x0067,"TOSHIBA_MEC_MR3^10",VR::FD,VM::VM4,"Series Diffusion Info (b-value,x,y,z)",false },
{0x0029,0x0068,"TOSHIBA_MEC_MR3^10",VR::SS,VM::VM1,"?",false },
{0x0029,0x006e,"TOSHIBA_MEC_MR3^10",VR::OB,VM::VM1,"?",false },
{0x0029,0x0089,"TOSHIBA_MEC_MR3",VR::LO,VM::VM1,"?",false },
@@ -1770,7 +1770,7 @@ static const DICT_ENTRY DICOMV3DataDict [] = {
{0x0021,0x001a,"PMTF INFORMATION DATA^10",VR::US,VM::VM1,"?num2?",false },
{0x0021,0x001d,"PMTF INFORMATION DATA^10",VR::IS,VM::VM1,"?num3?",false },
{0x0021,0x001f,"PMTF INFORMATION DATA^10",VR::US,VM::VM1,"?num?",false },
- {0x0029,0x0001,"PMTF INFORMATION DATA^10",VR::SL,VM::VM3,"Diffusion Gradient Orientation / Toshiba Orientation ",false },
+ {0x0029,0x0001,"PMTF INFORMATION DATA^10",VR::SL,VM::VM3,"Diffusion Gradient Orientation / Toshiba Orientation",false },
{0x0029,0x0005,"PMTF INFORMATION DATA^10",VR::SQ,VM::VM1,"?seq?",false },
{0x0029,0x0006,"PMTF INFORMATION DATA^10",VR::FL,VM::VM1,"?num?",false },
{0x0029,0x0007,"PMTF INFORMATION DATA^10",VR::FL,VM::VM1,"?num?",false },
@@ -4045,7 +4045,7 @@ static const DICT_ENTRY DICOMV3DataDict [] = {
{0x0011,0x0040,"GEMS_GDXE_FALCON_04",VR::SL,VM::VM1,"Pasting Overlap",false },
{0x0011,0x0041,"GEMS_GDXE_FALCON_04",VR::IS,VM::VM24,"Sub-image Collimator Vertices",false },
{0x0011,0x0042,"GEMS_GDXE_FALCON_04",VR::LO,VM::VM1,"View IP",false },
- {0x0011,0x0043,"GEMS_GDXE_FALCON_04",VR::IS,VM::VM24,"Key-stone Co-ordinates",false },
+ {0x0011,0x0043,"GEMS_GDXE_FALCON_04",VR::IS,VM::VM24,"Key-stone Coordinates",false },
{0x0011,0x0044,"GEMS_GDXE_FALCON_04",VR::CS,VM::VM1,"Receptor Type",false },
{0x0011,0x0046,"GEMS_GDXE_FALCON_04",VR::LO,VM::VM1_n,"?",false },
{0x0011,0x0047,"GEMS_GDXE_FALCON_04",VR::DS,VM::VM1,"?",false },
diff --git a/Modules/ThirdParty/GDCM/src/gdcm/Source/DataDictionary/privatedicts.xml b/Modules/ThirdParty/GDCM/src/gdcm/Source/DataDictionary/privatedicts.xml
index 5e6141ccee6..473e943f3d0 100644
--- a/Modules/ThirdParty/GDCM/src/gdcm/Source/DataDictionary/privatedicts.xml
+++ b/Modules/ThirdParty/GDCM/src/gdcm/Source/DataDictionary/privatedicts.xml
@@ -3516,7 +3516,7 @@
-
+
diff --git a/Modules/ThirdParty/GDCM/src/gdcm/Source/DataStructureAndEncodingDefinition/gdcmPreamble.h b/Modules/ThirdParty/GDCM/src/gdcm/Source/DataStructureAndEncodingDefinition/gdcmPreamble.h
index b4a8fcd2e1c..16453da44df 100644
--- a/Modules/ThirdParty/GDCM/src/gdcm/Source/DataStructureAndEncodingDefinition/gdcmPreamble.h
+++ b/Modules/ThirdParty/GDCM/src/gdcm/Source/DataStructureAndEncodingDefinition/gdcmPreamble.h
@@ -63,7 +63,6 @@ class GDCM_EXPORT Preamble
}
Preamble& operator=(Preamble const &)
{
- Internal = nullptr;
Create();
return *this;
}
diff --git a/Modules/ThirdParty/GDCM/src/gdcm/Source/DataStructureAndEncodingDefinition/gdcmVR.h b/Modules/ThirdParty/GDCM/src/gdcm/Source/DataStructureAndEncodingDefinition/gdcmVR.h
index 83f2935ee2d..95bda498d09 100644
--- a/Modules/ThirdParty/GDCM/src/gdcm/Source/DataStructureAndEncodingDefinition/gdcmVR.h
+++ b/Modules/ThirdParty/GDCM/src/gdcm/Source/DataStructureAndEncodingDefinition/gdcmVR.h
@@ -178,9 +178,9 @@ class GDCM_EXPORT VR
// For some reason this seems slower on my linux box...
is.seekg(2, std::ios::cur );
#else
- char dum[2];
- is.read(dum, 2);
- if( !(dum[0] == 0 && dum[1] == 0 ))
+ char dumb[2];
+ is.read(dumb, 2);
+ if( !(dumb[0] == 0 && dumb[1] == 0 ))
{
// JDDICOM_Sample4.dcm
gdcmDebugMacro( "32bits VR contains non zero bytes. Skipped" );
@@ -205,8 +205,8 @@ class GDCM_EXPORT VR
// See PS 3.5, Data Element Structure With Explicit VR
if( vrfield & VL32 )
{
- const char dum[2] = {0, 0};
- os.write(dum,2);
+ const char dumb[2] = {0, 0};
+ os.write(dumb,2);
}
return os;
}
diff --git a/Modules/ThirdParty/GDCM/src/gdcm/Source/InformationObjectDefinition/gdcmIODEntry.h b/Modules/ThirdParty/GDCM/src/gdcm/Source/InformationObjectDefinition/gdcmIODEntry.h
index af208f10176..d63cfababfc 100644
--- a/Modules/ThirdParty/GDCM/src/gdcm/Source/InformationObjectDefinition/gdcmIODEntry.h
+++ b/Modules/ThirdParty/GDCM/src/gdcm/Source/InformationObjectDefinition/gdcmIODEntry.h
@@ -51,7 +51,7 @@ Types specified in the Modules in Annex C shall be supported.
class GDCM_EXPORT IODEntry
{
public:
- IODEntry(const char *name = "", const char *ref = "", const char *usag = ""):Name(name),Ref(ref),usage(usag) {
+ IODEntry(const char *name = "", const char *ref = "", const char *inUsage = ""):Name(name),Ref(ref),usage(inUsage) {
}
friend std::ostream& operator<<(std::ostream& _os, const IODEntry &_val);
@@ -64,7 +64,7 @@ class GDCM_EXPORT IODEntry
void SetRef(const char *ref) { Ref = ref; }
const char *GetRef() const { return Ref.c_str(); }
- void SetUsage(const char *usag) { usage = usag; }
+ void SetUsage(const char *inUsage) { usage = inUsage; }
const char *GetUsage() const { return usage.c_str(); }
Usage::UsageType GetUsageType() const;
diff --git a/Modules/ThirdParty/GDCM/src/gdcm/Source/MediaStorageAndFileFormat/gdcmStreamImageWriter.cxx b/Modules/ThirdParty/GDCM/src/gdcm/Source/MediaStorageAndFileFormat/gdcmStreamImageWriter.cxx
index b172f8c2ee3..2ff2fa2f5a9 100644
--- a/Modules/ThirdParty/GDCM/src/gdcm/Source/MediaStorageAndFileFormat/gdcmStreamImageWriter.cxx
+++ b/Modules/ThirdParty/GDCM/src/gdcm/Source/MediaStorageAndFileFormat/gdcmStreamImageWriter.cxx
@@ -150,7 +150,7 @@ int StreamImageWriter::WriteRawHeader(RAWCodec* inCodec, std::ostream* inStream)
//Addition by Manoj
memcpy(&(tmpBuffer1[4*sizeof(uint16_t)]), &fifthTag, sizeof(uint32_t));// Data Element Length 4 bytes
- // Basic OffSet Tabl with No Item Value
+ // Basic OffSet Table with No Item Value
memcpy(&(tmpBuffer1[4*sizeof(uint16_t)+sizeof(uint32_t)]), &sixthTag, sizeof(uint16_t)); //fffe
memcpy(&(tmpBuffer1[5*sizeof(uint16_t)+sizeof(uint32_t)]), &seventhTag, sizeof(uint16_t));//e000
memcpy(&(tmpBuffer1[6*sizeof(uint16_t)+sizeof(uint32_t)]), &eightthTag, sizeof(uint32_t));//00000000H
diff --git a/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcm_charls.h b/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcm_charls.h
index b80451c4903..d2b8d6a78ed 100644
--- a/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcm_charls.h
+++ b/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcm_charls.h
@@ -17,8 +17,8 @@
/* Use the charls library configured for gdcm. */
#include "gdcmTypes.h"
#ifdef GDCM_USE_SYSTEM_CHARLS
-// It is expected that version 2.0.0 is used
-# include
+// It is expected that version >= 2.2.0 is used
+# include
#else
#include "gdcmcharls/charls.h"
#endif
diff --git a/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmext/csa.c b/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmext/csa.c
index ad95a6eca42..bbab6b3914d 100644
--- a/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmext/csa.c
+++ b/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmext/csa.c
@@ -228,7 +228,7 @@ static bool read_info(struct app *self, struct csa_info *i) {
// syngodt (signed)
s = fread_mirror(&i->syngodt, sizeof i->syngodt, 1, self);
ERROR_RETURN(s, 1);
- // numer of items
+ // number of items
s = fread_mirror(&i->nitems, sizeof i->nitems, 1, self);
if (self->csa_type == SV10) assert(i->nitems % 6 == 0);
ERROR_RETURN(s, 1);
diff --git a/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmext/mec_mr3_dict.c b/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmext/mec_mr3_dict.c
index 006ebd21bd5..8b529476f01 100644
--- a/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmext/mec_mr3_dict.c
+++ b/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmext/mec_mr3_dict.c
@@ -208,7 +208,7 @@ static const struct mec_mr3_dict dict[] = {
{0x02, 0x0000a81c, 0xff003200, ""}, //
{0x02, 0x0000a81d, 0xff002a00, ""}, //
{0x02, 0x0000a822, 0x00000500, ""}, //
- {0x02, 0x0000a823, 0xff002c00, "MR Acquition Type"}, //
+ {0x02, 0x0000a823, 0xff002c00, "MR Acquisition Type"}, //
{0x02, 0x0000a824, 0xff002400, ""}, //
{0x02, 0x0000a825, 0xff002400, ""}, //
{0x02, 0x0000a826, 0xff003200, ""}, //
diff --git a/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmext/mec_mr3_io.c b/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmext/mec_mr3_io.c
index ff396833bc8..264e16c1b57 100644
--- a/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmext/mec_mr3_io.c
+++ b/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmext/mec_mr3_io.c
@@ -23,7 +23,13 @@
#include
#include
-#ifndef _MSC_VER
+#if defined(_MSC_VER) || defined(__OpenBSD__)
+#define GDCM_HAS_ICONV 0
+#else
+#define GDCM_HAS_ICONV 1
+#endif
+
+#if GDCM_HAS_ICONV
#include
#endif
#if defined(_MSC_VER) && (_MSC_VER < 1900)
@@ -54,7 +60,7 @@ static size_t stream_read(void *ptr, size_t size, size_t nmemb,
struct app {
struct stream *in;
-#ifndef _MSC_VER
+#if GDCM_HAS_ICONV
iconv_t conv;
#endif
void *shift_jis_buffer;
@@ -62,7 +68,7 @@ struct app {
static struct app *create_app(struct app *self, struct stream *in) {
self->in = in;
-#ifndef _MSC_VER
+#if GDCM_HAS_ICONV
self->conv = iconv_open("utf-8", "shift-jis");
assert(self->conv != (iconv_t)-1);
#endif
@@ -358,7 +364,7 @@ static char *shift_jis_to_utf8(char *str, size_t len, struct app *self) {
const size_t guesstimate = len < 128 ? 128 : len * 2;
self->shift_jis_buffer = realloc(self->shift_jis_buffer, guesstimate);
char *dest_str = self->shift_jis_buffer;
-#ifndef _MSC_VER
+#if GDCM_HAS_ICONV
char *in_str = str;
char *out_str = dest_str;
size_t inbytes = len;
@@ -842,7 +848,7 @@ bool mec_mr3_print(const void *input, size_t len) {
#else
free(data.buffer);
#endif
-#ifndef _MSC_VER
+#if GDCM_HAS_ICONV
iconv_close(self->conv);
#endif
free(self->shift_jis_buffer);
diff --git a/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmjpeg/README.GDCM.txt b/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmjpeg/README.GDCM.txt
index 7e19b0705bf..3d0fd3e549f 100644
--- a/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmjpeg/README.GDCM.txt
+++ b/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmjpeg/README.GDCM.txt
@@ -80,4 +80,4 @@ patch -p0 < previous-gdcm.patch (5)
NOTE for later:
-(shoud we disable getenv just as dcmtk ? there is a ijg flag for that NO_ENV or something similar
+(should we disable getenv just as dcmtk ? there is a ijg flag for that NO_ENV or something similar