Skip to content

Commit

Permalink
Merge pull request #1706 from hjmjohnson/update-gdcm
Browse files Browse the repository at this point in the history
Update gdcm
  • Loading branch information
hjmjohnson committed Mar 16, 2020
2 parents 0933bb3 + b9716ec commit 1e708db
Show file tree
Hide file tree
Showing 33 changed files with 251 additions and 122 deletions.
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,8 @@ Modules/ThirdParty/VNL/src/vxl/v3p/netlib/triangle.c hooks-max-size=670000
Modules/Filtering/Denoising/include/itkPatchBasedDenoisingImageFilter.hxx hooks-max-size=120000
Documentation/ReleaseNotes/* hooks-max-size=300000
Utilities/Doxygen/doxygen.config.in hooks-max-size=150000

Modules/ThirdParty/GDCM/src/gdcm/Source/DataDictionary/gdcmPrivateDefaultDicts.cxx hook-max-size=1021501
Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmopenjpeg/src/lib/openjp2/j2k.c hook-max-size=654063
Modules/ThirdParty/GDCM/src/gdcm/Source/InformationObjectDefinition/Part3.xml hook-max-size=4336000
Source/InformationObjectDefinition/Part3.xml hook-max-size=4336000
2 changes: 1 addition & 1 deletion Modules/ThirdParty/GDCM/src/gdcm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ endif()
#----------------------------------------------------------------------------

project(GDCM
VERSION 3.0.4
VERSION 3.0.5
LANGUAGES CXX C
)
## NOTE: the "DESCRIPTION" feature of project() was introduced in cmake 3.10.0
Expand Down
2 changes: 1 addition & 1 deletion Modules/ThirdParty/GDCM/src/gdcm/Source/Common/gdcmEvent.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public :
virtual void Print(std::ostream& os) const;

/** Return the StringName associated with the event. */
virtual const char * GetEventName(void) const = 0;
virtual const char * GetEventName() const = 0;

/** Check if given event matches or derives from this event. */
virtual bool CheckEvent(const Event*) const = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ class Exception : public std::exception
const unsigned int lineNumber,
const char* const func)
{
assert(desc != NULL);
assert(file != NULL);
assert(func != NULL);
assert(desc != nullptr);
assert(file != nullptr);
assert(func != nullptr);
std::ostringstream oswhat;
oswhat << file << ":" << lineNumber << " (" << func << "):\n";
oswhat << desc;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ const char *System::GetCurrentModuleFileName()
if (dladdr( (void*)&where_am_i, &info ) == 0)
{
size_t len = strlen(info.dli_fname);
if( len >= PATH_MAX ) return 0; // throw error ?
if( len >= PATH_MAX ) return nullptr; // throw error ?
// else
strcpy(path,info.dli_fname);
return path;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const char * const * Testing::GetMediaStorageDataFile(unsigned int file)
{
if( file < Testing::GetNumberOfMediaStorageDataFiles() ) return gdcmMediaStorageDataFiles[file];
// else return the {0x0, 0x0} sentinel:
assert( *gdcmMediaStorageDataFiles[ Testing::GetNumberOfMediaStorageDataFiles() ] == 0 );
assert( *gdcmMediaStorageDataFiles[ Testing::GetNumberOfMediaStorageDataFiles() ] == nullptr );
return gdcmMediaStorageDataFiles[ Testing::GetNumberOfMediaStorageDataFiles() ];
}
const char * Testing::GetMediaStorageFromFile(const char *filepath)
Expand Down Expand Up @@ -119,7 +119,7 @@ const char * const * Testing::GetMD5DataImage(unsigned int file)
{
if( file < Testing::GetNumberOfMD5DataImages() ) return gdcmMD5DataImages[file];
// else return the {0x0, 0x0} sentinel:
assert( *gdcmMD5DataImages[ Testing::GetNumberOfMD5DataImages() ] == 0 );
assert( *gdcmMD5DataImages[ Testing::GetNumberOfMD5DataImages() ] == nullptr );
return gdcmMD5DataImages[ Testing::GetNumberOfMD5DataImages() ];
}

Expand Down Expand Up @@ -447,6 +447,7 @@ static const LossyFile gdcmLossyFilenames[] = {
{ 0,"FUJI-ffff-MONO1-J2K.dcm" },
{ 0,"JPEGLosslessSeNonZero.dcm" },
{ 1,"US-YBR_FULL_422-EVRLE.dcm" },
{ 0,"Osirix10vs8BitsStored.dcm" },
{ 0, nullptr }
};

Expand Down
62 changes: 31 additions & 31 deletions Modules/ThirdParty/GDCM/src/gdcm/Source/Common/zipstreamimpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,21 +129,21 @@ class basic_zip_streambuf : public std::basic_streambuf<charT, traits>
int memory_level,
size_t buffer_size);

~basic_zip_streambuf(void) override;
~basic_zip_streambuf() override;

int sync (void) override;
int sync () override;
int_type overflow (int_type c) override;
std::streamsize flush (void);
std::streamsize flush ();
inline
ostream_reference get_ostream (void) const;
ostream_reference get_ostream () const;
inline
int get_zerr (void) const;
int get_zerr () const;
inline
unsigned long get_crc (void) const;
unsigned long get_crc () const;
inline
unsigned long get_in_size (void) const;
unsigned long get_in_size () const;
inline
long get_out_size(void) const;
long get_out_size() const;

private:

Expand Down Expand Up @@ -189,33 +189,33 @@ class basic_unzip_streambuf :
size_t read_buffer_size,
size_t input_buffer_size);

~basic_unzip_streambuf(void) override;
~basic_unzip_streambuf() override;

int_type underflow(void) override;
int_type underflow() override;

/// returns the compressed input istream
inline
istream_reference get_istream (void);
istream_reference get_istream ();
inline
z_stream& get_zip_stream (void);
z_stream& get_zip_stream ();
inline
int get_zerr (void) const;
int get_zerr () const;
inline
unsigned long get_crc (void) const;
unsigned long get_crc () const;
inline
long get_out_size (void) const;
long get_out_size () const;
inline
long get_in_size (void) const;
long get_in_size () const;


private:

void put_back_from_zip_stream (void);
void put_back_from_zip_stream ();

std::streamsize unzip_from_stream (char_type* buffer,
std::streamsize buffer_size);

size_t fill_input_buffer (void);
size_t fill_input_buffer ();

istream_reference _istream;
z_stream _zip_stream;
Expand Down Expand Up @@ -250,21 +250,21 @@ class basic_zip_ostream :
int memory_level = 8,
size_t buffer_size = zstream_default_buffer_size);

~basic_zip_ostream(void) override;
~basic_zip_ostream() override;

inline
bool is_gzip (void) const;
bool is_gzip () const;
inline
basic_zip_ostream<charT, traits>& zflush (void);
void finished (void);
basic_zip_ostream<charT, traits>& zflush ();
void finished ();

// void make_gzip()
// { add_header(); _is_gzip = true; }

private:

basic_zip_ostream<charT,traits>& add_header(void);
basic_zip_ostream<charT,traits>& add_footer(void);
basic_zip_ostream<charT,traits>& add_header();
basic_zip_ostream<charT,traits>& add_footer();

bool _is_gzip;
bool _added_footer;
Expand All @@ -290,20 +290,20 @@ class basic_zip_istream :
size_t input_buffer_size = zstream_default_buffer_size);

inline
bool is_gzip (void) const;
bool is_gzip () const;
inline
bool check_crc (void);
bool check_crc ();
inline
bool check_data_size (void) const;
bool check_data_size () const;
inline
long get_gzip_crc (void) const;
long get_gzip_crc () const;
inline
long get_gzip_data_size(void) const;
long get_gzip_data_size() const;

protected:

int check_header (void);
void read_footer (void);
int check_header ();
void read_footer ();

bool _is_gzip;
long _gzip_crc;
Expand Down

0 comments on commit 1e708db

Please sign in to comment.