[med-svn] [Git][med-team/gdcm][master] 8 commits: d/watch: Point to latest release
Andreas Tille (@tille)
gitlab at salsa.debian.org
Thu Aug 4 14:03:11 BST 2022
Andreas Tille pushed to branch master at Debian Med / gdcm
Commits:
07cc3f67 by Andreas Tille at 2022-08-04T11:30:33+02:00
d/watch: Point to latest release
- - - - -
e795af57 by Andreas Tille at 2022-08-04T11:31:04+02:00
New upstream version 3.0.14
- - - - -
31119f70 by Andreas Tille at 2022-08-04T11:31:04+02:00
routine-update: New upstream version
- - - - -
e83875ba by Andreas Tille at 2022-08-04T11:31:12+02:00
Update upstream source from tag 'upstream/3.0.14'
Update to upstream version '3.0.14'
with Debian dir 346dd16218e5110a14f2cfc503835776d1e8b7ce
- - - - -
6d699d75 by Andreas Tille at 2022-08-04T11:40:02+02:00
Trim trailing whitespace.
Changes-By: lintian-brush
Fixes: lintian: trailing-whitespace
See-also: https://lintian.debian.org/tags/trailing-whitespace.html
- - - - -
c6f3f779 by Andreas Tille at 2022-08-04T11:40:03+02:00
Update renamed lintian tag names in lintian overrides.
Changes-By: lintian-brush
Fixes: lintian: renamed-tag
See-also: https://lintian.debian.org/tags/renamed-tag.html
- - - - -
9869ff95 by Andreas Tille at 2022-08-04T11:40:09+02:00
Avoid explicitly specifying -Wl,--as-needed linker flag.
Changes-By: lintian-brush
Fixes: lintian: debian-rules-uses-as-needed-linker-flag
See-also: https://lintian.debian.org/tags/debian-rules-uses-as-needed-linker-flag.html
- - - - -
b55c048e by Andreas Tille at 2022-08-04T15:02:39+02:00
Link against vtk9 instead of vtk7
- - - - -
28 changed files:
- + .github/workflows/c-cpp.yml
- Applications/Cxx/gdcmclean.cxx
- CMakeLists.txt
- Examples/Csharp/CMakeLists.txt
- + Examples/Csharp/Cleaner.cs
- Source/Common/gdcmMD5.cxx
- Source/Common/gdcmSHA1.cxx
- Source/Common/gdcmSystem.cxx
- Source/Common/gdcmTerminal.cxx
- Source/DataDictionary/gdcmDictConverter.cxx
- Source/DataDictionary/gdcmPrivateDefaultDicts.cxx
- Source/DataStructureAndEncodingDefinition/gdcmElement.h
- Source/DataStructureAndEncodingDefinition/gdcmMrProtocol.cxx
- Source/InformationObjectDefinition/gdcmXMLDictReader.cxx
- Source/InformationObjectDefinition/gdcmXMLPrivateDictReader.cxx
- Source/MediaStorageAndFileFormat/gdcmCleaner.h
- Source/MessageExchangeDefinition/gdcmPresentationDataValue.cxx
- Utilities/VTK/Examples/Cxx/GenerateRTSTRUCT.cxx
- Wrapping/Csharp/gdcm.i
- Wrapping/Java/gdcm.i
- Wrapping/Python/gdcmswig.i
- appveyor.yml
- debian/changelog
- debian/control
- debian/control.in
- debian/python3-vtkgdcm.lintian-overrides
- debian/rules
- debian/watch
Changes:
=====================================
.github/workflows/c-cpp.yml
=====================================
@@ -0,0 +1,26 @@
+name: C/C++ CI
+
+on:
+ push:
+ branches: [ "release" ]
+ pull_request:
+ branches: [ "release" ]
+
+jobs:
+ example_matrix:
+ strategy:
+ matrix:
+ os: [windows-latest, ubuntu-latest]
+ runs-on: ${{ matrix.os }}
+ steps:
+ - name: checkout source
+ uses: actions/checkout at v3
+ with:
+ submodules: true
+ fetch-depth: 2
+ - name: configure
+ run: cmake -DGDCM_BUILD_DOCBOOK_MANPAGES:BOOL=OFF -DCMAKE_BUILD_TYPE:STRING=None -B build
+ - name: make
+ run: cmake --build build
+ - name: make check
+ run: ctest --test-dir build --parallel 2 --output-on-failure || true
=====================================
Applications/Cxx/gdcmclean.cxx
=====================================
@@ -367,19 +367,6 @@ int main(int argc, char *argv[]) {
return 1;
}
- // preserving is not an actual 'operation':
- if (empty_tags.empty() && empty_privatetags.empty() &&
- empty_dpaths.empty() // empty
- && remove_tags.empty() && remove_privatetags.empty() &&
- remove_dpaths.empty() // remove
- && scrub_tags.empty() && scrub_privatetags.empty() &&
- scrub_dpaths.empty() // scrub
- && empty_vrs.empty() && remove_vrs.empty() // VR
- ) {
- std::cerr << "No operations to be done." << std::endl;
- return false;
- }
-
if (!gdcm::System::FileExists(filename.c_str())) {
std::cerr << "Could not find file: " << filename << std::endl;
return 1;
=====================================
CMakeLists.txt
=====================================
@@ -17,7 +17,7 @@ endif()
#----------------------------------------------------------------------------
project(GDCM
- VERSION 3.0.13
+ VERSION 3.0.14
LANGUAGES CXX C
)
## NOTE: the "DESCRIPTION" feature of project() was introduced in cmake 3.10.0
=====================================
Examples/Csharp/CMakeLists.txt
=====================================
@@ -32,6 +32,7 @@ set(CSHARP_EXAMPLES
if(BUILD_TESTING)
list(APPEND CSHARP_EXAMPLES
BasicAnonymizer
+ Cleaner
ClinicalTrialIdentificationWorkflow
)
endif()
=====================================
Examples/Csharp/Cleaner.cs
=====================================
@@ -0,0 +1,124 @@
+/*=========================================================================
+
+ Program: GDCM (Grassroots DICOM). A DICOM library
+
+ Copyright (c) 2006-2011 Mathieu Malaterre
+ All rights reserved.
+ See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notice for more information.
+
+=========================================================================*/
+
+/**
+ */
+/*
+ * Usage:
+ * $ export LD_LIBRARY_PATH=$HOME/Projects/gdcm/debug-gcc/bin
+ * $ mono bin/Cleaner.exe gdcmData/012345.002.050.dcm out.dcm
+ */
+using System;
+using gdcm;
+
+public class MyWatcher : SimpleSubjectWatcher
+{
+ public MyWatcher(Subject s):base(s,"Override String"){}
+ protected override void StartFilter() {
+ System.Console.WriteLine( "This is my start" );
+ }
+ protected override void EndFilter(){
+ System.Console.WriteLine( "This is my end" );
+ }
+ protected override void ShowProgress(Subject caller, Event evt){
+ ProgressEvent pe = ProgressEvent.Cast(evt);
+ System.Console.WriteLine( "This is my progress: " + pe.GetProgress() );
+ }
+ protected override void ShowIteration(){
+ System.Console.WriteLine( "This is my iteration" );
+ }
+ protected override void ShowAnonymization(Subject caller, Event evt){
+/*
+ * A couple of explanation are necessary here to understand how SWIG work
+ * http://www.swig.org/Doc1.3/Java.html#adding_downcasts
+ *
+ * System.Console.WriteLine( "This is my Anonymization. Type: " + evt.GetEventName() );
+ * System.Type type = evt.GetType();
+ * System.Console.WriteLine( "This is my Anonymization. System.Type: " + type.ToString() );
+ * System.Console.WriteLine( "This is my Anonymization. CheckEvent: " + ae.CheckEvent( evt ) );
+ * System.Console.WriteLine( "This is my Anonymization. Processing Tag #" + ae.GetTag().toString() );
+ */
+ AnonymizeEvent ae = AnonymizeEvent.Cast(evt);
+ if( ae != null )
+ {
+ Tag t = ae.GetTag();
+ System.Console.WriteLine( "This is my Anonymization. Processing Tag #" + t.toString() );
+ }
+ else
+ {
+ System.Console.WriteLine( "This is my Anonymization. Unhandled Event type: " + evt.GetEventName() );
+ }
+ }
+ protected override void ShowAbort(){
+ System.Console.WriteLine( "This is my abort" );
+ }
+}
+
+public class Cleaner
+{
+ public static int Main(string[] args)
+ {
+ gdcm.Global global = gdcm.Global.GetInstance();
+ if( !global.LoadResourcesFiles() )
+ {
+ System.Console.WriteLine( "Could not LoadResourcesFiles" );
+ return 1;
+ }
+
+ string file1 = args[0];
+ string file2 = args[1];
+ Reader reader = new Reader();
+ reader.SetFileName( file1 );
+ bool ret = reader.Read();
+ if( !ret )
+ {
+ return 1;
+ }
+
+ SmartPtrCleaner scleaner = gdcm.Cleaner.New();
+ gdcm.Cleaner cleaner = scleaner.__ref__();
+
+ //SimpleSubjectWatcher watcher = new SimpleSubjectWatcher(cleaner, "Anonymizer");
+ MyWatcher watcher = new MyWatcher(cleaner);
+
+ cleaner.SetFile( reader.GetFile() );
+ cleaner.Empty( new gdcm.VR(gdcm.VR.VRType.PN) );
+ gdcm.DPath dpath = new gdcm.DPath();
+ dpath.ConstructFromString( "/0010,0010" );
+ cleaner.Preserve( dpath );
+ gdcm.Tag t1 = new gdcm.Tag(0x10, 0x30);
+ cleaner.Empty( t1 );
+ gdcm.PrivateTag pt0 = new gdcm.PrivateTag( new gdcm.Tag(0x29,0x60), "SIEMENS MEDCOM HEADER2" );
+ cleaner.Remove( pt0 );
+ gdcm.PrivateTag pt1 = new gdcm.PrivateTag( new gdcm.Tag(0x29,0x10), "SIEMENS CSA HEADER" );
+ gdcm.PrivateTag pt2 = new gdcm.PrivateTag( new gdcm.Tag(0x29,0x20), "SIEMENS CSA HEADER" );
+ cleaner.Scrub( pt1 );
+ cleaner.Scrub( pt2 );
+ if( !cleaner.Clean() )
+ {
+ return 1;
+ }
+
+ Writer writer = new Writer();
+ writer.SetFileName( file2 );
+ writer.SetFile( cleaner.GetFile() );
+ ret = writer.Write();
+ if( !ret )
+ {
+ return 1;
+ }
+
+ return 0;
+ }
+}
=====================================
Source/Common/gdcmMD5.cxx
=====================================
@@ -21,6 +21,10 @@
#endif
#include <fstream>
#include <vector>
+#include <stdio.h>
+#if defined(_MSC_VER) && (_MSC_VER < 1900)
+#define snprintf _snprintf
+#endif
// http://stackoverflow.com/questions/13256446/compute-md5-hash-value-by-c-winapi
namespace gdcm
@@ -39,7 +43,7 @@ bool MD5::Compute(const char *buffer, size_t buf_len, char digest_str[33])
MD5_Update(&ctx, buffer, buf_len);
MD5_Final(digest, &ctx);
for (int di = 0; di < 16; ++di)
- sprintf(digest_str+2*di, "%02x", digest[di]);
+ snprintf(digest_str+2*di, 3, "%02x", digest[di]);
digest_str[2*16] = '\0';
return true;
#elif defined(GDCM_BUILD_TESTING)
@@ -49,7 +53,7 @@ bool MD5::Compute(const char *buffer, size_t buf_len, char digest_str[33])
md5_append(&state, (const md5_byte_t *)buffer, buf_len);
md5_finish(&state, digest);
for (int di = 0; di < 16; ++di)
- sprintf(digest_str+2*di, "%02x", digest[di]);
+ snprintf(digest_str+2*di, 3, "%02x", digest[di]);
digest_str[2*16] = '\0';
return true;
#else
@@ -124,7 +128,7 @@ bool MD5::ComputeFile(const char *filename, char digest_str[33])
for (int di = 0; di < 16; ++di)
{
- sprintf(digest_str+2*di, "%02x", digest[di]);
+ snprintf(digest_str+2*di, 3, "%02x", digest[di]);
}
digest_str[2*16] = '\0';
return true;
=====================================
Source/Common/gdcmSHA1.cxx
=====================================
@@ -20,7 +20,7 @@
#include <string.h> // memcmp
#include <stdlib.h> // malloc
-#include <stdio.h> // sprintf
+#include <stdio.h> // snprintf
/*
*/
@@ -62,7 +62,7 @@ bool SHA1::Compute(const char *buffer, unsigned long buf_len, char digest[])
for (int di = 0; di < 20; ++di)
{
- sprintf(digest+2*di, "%02x", output[di]);
+ snprintf(digest+2*di, 3, "%02x", output[di]);
}
digest[2*20] = '\0';
@@ -131,7 +131,7 @@ bool SHA1::ComputeFile(const char *filename, char digest_str[20*2+1])
for (int di = 0; di < 20; ++di)
{
- sprintf(digest_str+2*di, "%02x", digest[di]);
+ snprintf(digest_str+2*di, 3, "%02x", digest[di]);
}
digest_str[2*20] = '\0';
return true;
=====================================
Source/Common/gdcmSystem.cxx
=====================================
@@ -1100,8 +1100,8 @@ const char *System::GetLocaleCharset()
const char *codeset2;
codeset1 = buf1;
codeset2 = buf2;
- sprintf(buf1, "CP%d", GetConsoleCP());
- sprintf(buf2, "CP%d", GetConsoleOutputCP());
+ snprintf(buf1, sizeof(buf1), "CP%d", GetConsoleCP());
+ snprintf(buf2, sizeof(buf2), "CP%d", GetConsoleOutputCP());
// BUG: both returns 'CP437' on debian + mingw32...
// instead prefer GetACP() call:
@@ -1109,7 +1109,7 @@ const char *System::GetLocaleCharset()
static char buf[2+10+1]; // 2 char, 10 bytes + 0
// GetACP: Retrieves the current Windows ANSI code page identifier for the
// operating system.
- sprintf (buf, "CP%u", GetACP ());
+ snprintf (buf, sizeof(buf), "CP%u", GetACP ());
codeset = CharsetAliasToName(buf);
#endif
=====================================
Source/Common/gdcmTerminal.cxx
=====================================
@@ -16,6 +16,10 @@
#include <iostream>
#include <iostream>
#include <fstream>
+#include <stdio.h>
+#if defined(_MSC_VER) && (_MSC_VER < 1900)
+#define snprintf _snprintf
+#endif
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
@@ -75,12 +79,12 @@ public:
void setbgcolor(int col) { bgcolor = col; }
//std::string resettextcolor() const {
// char command[13];
- // sprintf(command, "%c[%d;%d;%dm", 0x1B, 0, 0, 0);
+ // snprintf(command, sizeof(command), "%c[%d;%d;%dm", 0x1B, 0, 0, 0);
// return command;
//}
std::string textcolor() const {
char command[16];
- int n = sprintf(command, "%c[%d;%d;%dm", 0x1B, attribute, fgcolor + 30, bgcolor + 40);
+ int n = snprintf(command, sizeof(command), "%c[%d;%d;%dm", 0x1B, attribute, fgcolor + 30, bgcolor + 40);
assert( n < 16 ); (void)n;
return command;
}
=====================================
Source/DataDictionary/gdcmDictConverter.cxx
=====================================
@@ -226,7 +226,7 @@ bool DictConverter::Readuint16(const char *raw, uint16_t &ov)
int r = sscanf(raw, "%04x", &v);
assert( r == 1 && "Wrong Value read for uint16");
char sv[4+1];
- r = sprintf(sv, "%04x", v);
+ r = snprintf(sv, sizeof(sv), "%04x", v);
assert( r == 4 && "Wrong Value printed for uint16");
assert( strncmp(raw, sv, 4) == 0 );
ov = v;
=====================================
Source/DataDictionary/gdcmPrivateDefaultDicts.cxx
=====================================
@@ -710,7 +710,7 @@ static const DICT_ENTRY DICOMV3DataDict [] = {
{0x0021,0x008d,"SIEMENS MR SDI 02",VR::FD,VM::VM1,"?",false},
{0x0021,0x008e,"SIEMENS MR SDI 02",VR::ST,VM::VM1,"?",false},
{0x0021,0x00fe,"SIEMENS MR SDI 02",VR::SQ,VM::VM1,"??",false},
- {0x0021,0x00fe,"SIEMENS MR SDS 01",VR::SQ,VM::VM1,"??",false},
+ {0x0021,0x00fe,"SIEMENS MR SDS 01",VR::SQ,VM::VM1,"Series Data Sequence",false},
{0x0089,0x0054,"SYNGO_IMAGING",VR::OW,VM::VM1,"??",false},
{0x0095,0x00fa,"SIENET",VR::PN,VM::VM1,"?Some kind of Patient Name?",false},
{0x8ff1,0x0010,"SSI Image enhancement Group",VR::LO,VM::VM1,"SSI Image enhancement Group Version",false },
@@ -851,7 +851,7 @@ static const DICT_ENTRY DICOMV3DataDict [] = {
{0x0019,0x0038,"PMTF INFORMATION DATA^11",VR::SL,VM::VM1,"?",false },
{0x0019,0x0039,"PMTF INFORMATION DATA^11",VR::FL,VM::VM1,"?",false },
{0x0019,0x003a,"PMTF INFORMATION DATA^10",VR::SL,VM::VM1,"?",false },
- {0x0019,0x003a,"PMTF INFORMATION DATA^11",VR::FL,VM::VM1,"?",false },
+ {0x0019,0x003a,"PMTF INFORMATION DATA^11",VR::FL,VM::VM1,"Repetition Time (/100)",false },
{0x0019,0x003b,"PMTF INFORMATION DATA^10",VR::SL,VM::VM2,"?",false },
{0x0019,0x003c,"PMTF INFORMATION DATA^10",VR::SL,VM::VM1,"?",false },
{0x0019,0x003c,"PMTF INFORMATION DATA^11",VR::FL,VM::VM3,"?",false },
@@ -1020,7 +1020,7 @@ static const DICT_ENTRY DICOMV3DataDict [] = {
{0x0019,0x00a6,"PMTF INFORMATION DATA^11",VR::US,VM::VM1,"?",false },
{0x0019,0x00a6,"PMTF INFORMATION DATA^12",VR::FL,VM::VM1_n,"?",false },
{0x0019,0x00a7,"PMTF INFORMATION DATA^12",VR::FL,VM::VM1,"?",false },
- {0x0019,0x00a8,"PMTF INFORMATION DATA^10",VR::FL,VM::VM1,"?",false },
+ {0x0019,0x00a8,"PMTF INFORMATION DATA^10",VR::FL,VM::VM1,"?Repetition Time (/100)",false },
{0x0019,0x00a8,"PMTF INFORMATION DATA^11",VR::SL,VM::VM1,"?",false },
{0x0019,0x00a8,"PMTF INFORMATION DATA^12",VR::FL,VM::VM1,"?",false },
{0x0019,0x00a9,"PMTF INFORMATION DATA^10",VR::SL,VM::VM1,"?",false },
@@ -1141,7 +1141,7 @@ static const DICT_ENTRY DICOMV3DataDict [] = {
{0x0019,0x00f1,"PMTF INFORMATION DATA^11",VR::SL,VM::VM3,"Diffusion b-value x Toshiba Orientation",false },
{0x0019,0x00f1,"PMTF INFORMATION DATA^12",VR::LO,VM::VM1,"?",false },
{0x0019,0x00f2,"PMTF INFORMATION DATA^10",VR::FL,VM::VM1,"?",false },
- {0x0019,0x00f2,"PMTF INFORMATION DATA^11",VR::FL,VM::VM3,"?",false },
+ {0x0019,0x00f2,"PMTF INFORMATION DATA^11",VR::FL,VM::VM3,"Specific Absorption Rate Values",false },
{0x0019,0x00f3,"PMTF INFORMATION DATA^10",VR::SL,VM::VM1,"?",false },
{0x0019,0x00f3,"PMTF INFORMATION DATA^11",VR::SL,VM::VM1,"?",false },
{0x0019,0x00f4,"PMTF INFORMATION DATA^10",VR::FD,VM::VM1,"?",false },
=====================================
Source/DataStructureAndEncodingDefinition/gdcmElement.h
=====================================
@@ -314,7 +314,11 @@ static int doround(char *buf, unsigned int n) {
return 0;
}
-static int roundat(char *buf, unsigned int i, int iexp) {
+#if defined(_MSC_VER) && (_MSC_VER < 1900)
+#define snprintf _snprintf
+#endif
+
+static int roundat(char *buf, size_t bufLen, unsigned int i, int iexp) {
if (doround(buf, i) != 0) {
iexp += 1;
switch(iexp) {
@@ -334,7 +338,7 @@ static int roundat(char *buf, unsigned int i, int iexp) {
strcpy(buf, "100");
break;
default:
- sprintf(buf, "1e%d", iexp);
+ snprintf(buf, bufLen, "1e%d", iexp);
}
return 1;
}
@@ -353,20 +357,20 @@ static void x16printf(char *buf, int size, Float f) {
size -= 1;
*buf++ = '-';
}
- sprintf(line, "%1.16e", f);
+ snprintf(line, sizeof(line), "%1.16e", f);
if (line[0] == '-') {
f = -f;
size -= 1;
*buf++ = '-';
- sprintf(line, "%1.16e", f);
+ snprintf(line, sizeof(line), "%1.16e", f);
}
*mant = line[0];
i = (int)strcspn(mant, "eE");
mant[i] = '\0';
iexp = (int)strtol(mant + i + 1, nullptr, 10);
- lexp = sprintf(exp, "e%d", iexp);
+ lexp = snprintf(exp, sizeof(exp), "e%d", iexp);
if ((iexp >= size) || (iexp < -3)) {
- i = roundat(mant, size - 1 -lexp, iexp);
+ i = roundat(mant, sizeof(line) - 1, size - 1 -lexp, iexp);
if(i == 1) {
strcpy(buf, mant);
return;
@@ -379,11 +383,11 @@ static void x16printf(char *buf, int size, Float f) {
strcat(buf, exp);
}
else if (iexp >= size - 2) {
- roundat(mant, iexp + 1, iexp);
+ roundat(mant, sizeof(line) - 1, iexp + 1, iexp);
strcpy(buf, mant);
}
else if (iexp >= 0) {
- i = roundat(mant, size - 1, iexp);
+ i = roundat(mant, sizeof(line) - 1, size - 1, iexp);
if (i == 1) {
strcpy(buf, mant);
return;
@@ -396,7 +400,7 @@ static void x16printf(char *buf, int size, Float f) {
}
else {
int j;
- i = roundat(mant, size + 1 + iexp, iexp);
+ i = roundat(mant, sizeof(line) - 1, size + 1 + iexp, iexp);
if (i == 1) {
strcpy(buf, mant);
return;
@@ -410,6 +414,10 @@ static void x16printf(char *buf, int size, Float f) {
clean(buf);
}
}
+#if defined(_MSC_VER) && (_MSC_VER < 1900)
+#undef snprintf
+#endif
+
#endif
template<> inline void EncodingImplementation<VR::VRASCII>::Write(const double* data, unsigned long length, std::ostream &_os) {
=====================================
Source/DataStructureAndEncodingDefinition/gdcmMrProtocol.cxx
=====================================
@@ -16,6 +16,11 @@
#include <map>
#include <string>
+#if defined(_MSC_VER) && (_MSC_VER < 1900)
+#define snprintf _snprintf
+#endif
+
+
namespace gdcm
{
@@ -186,7 +191,7 @@ bool MrProtocol::GetSliceArray( MrProtocol::SliceArray & sa ) const
double v[3];
for( int j = 0; j < 3; ++j )
{
- sprintf( buf, templ1, i, dir[j] );
+ snprintf( buf, sizeof(buf), templ1, i, dir[j] );
const char * valstr = GetMrProtocolByName(buf);
// when not present this means 0.0
double val = 0.0;
@@ -202,7 +207,7 @@ bool MrProtocol::GetSliceArray( MrProtocol::SliceArray & sa ) const
double v[3];
for( int j = 0; j < 3; ++j )
{
- sprintf( buf, templ2, i, dir[j] );
+ snprintf( buf, sizeof(buf), templ2, i, dir[j] );
const char * valstr = GetMrProtocolByName(buf);
// when not present this means 0.0
double val = 0.0;
=====================================
Source/InformationObjectDefinition/gdcmXMLDictReader.cxx
=====================================
@@ -61,7 +61,7 @@ void XMLDictReader::HandleEntry(const char **atts)
assert( v <= 0xFFFF );
char sv[4+1];
- r = sprintf(sv, "%04x", v);
+ r = snprintf(sv, sizeof(sv), "%04x", v);
assert( r == 4 );
if( strncmp(raw, sv, 4) == 0 ) // GroupXX
{
@@ -84,7 +84,7 @@ void XMLDictReader::HandleEntry(const char **atts)
assert( v <= 0xFFFF );
char sv[4+1];
- r = sprintf(sv, "%04x", v);
+ r = snprintf(sv, sizeof(sv), "%04x", v);
assert( r == 4 );
if( strncmp(raw, sv, 4) == 0 )
{
=====================================
Source/InformationObjectDefinition/gdcmXMLPrivateDictReader.cxx
=====================================
@@ -62,7 +62,7 @@ void XMLPrivateDictReader::HandleEntry(const char **atts)
assert( v <= 0xFFFF );
char sv[4+1];
- r = sprintf(sv, "%04x", v);
+ r = snprintf(sv, sizeof(sv), "%04x", v);
assert( r == 4 );
if( strncmp(raw, sv, 4) == 0 ) // GroupXX
{
@@ -109,7 +109,7 @@ void XMLPrivateDictReader::HandleEntry(const char **atts)
assert( v <= 0xFF );
char sv[4+1];
- r = sprintf(sv, "xx%02x", v);
+ r = snprintf(sv, sizeof(sv), "xx%02x", v);
assert( r == 4 );
if( strncmp(raw, sv, 4) == 0 )
{
=====================================
Source/MediaStorageAndFileFormat/gdcmCleaner.h
=====================================
@@ -30,7 +30,7 @@ namespace gdcm {
class GDCM_EXPORT Cleaner : public Subject {
public:
Cleaner();
- ~Cleaner();
+ ~Cleaner() override;
///
bool Empty(Tag const &t);
=====================================
Source/MessageExchangeDefinition/gdcmPresentationDataValue.cxx
=====================================
@@ -165,7 +165,7 @@ DataSet PresentationDataValue::ConcatenatePDVBlobs(const std::vector<Presentatio
#if 0
char fn[512];
static int i = 0;
- sprintf( fn, "/tmp/debugimp%d", i++ );
+ snprintf( fn, sizeof(fn), "/tmp/debugimp%d", i++ );
std::ofstream d( fn, std::ios::binary );
d.write( theEntireBuffer.c_str(), theEntireBuffer.size() );
d.close();
@@ -205,7 +205,7 @@ DataSet PresentationDataValue::ConcatenatePDVBlobsAsExplicit(const std::vector<P
#if 0
char fn[512];
static int i = 0;
- sprintf( fn, "/tmp/debugex%d", i++ );
+ snprintf( fn, sizeof(fn), "/tmp/debugex%d", i++ );
std::ofstream d( fn, std::ios::binary );
d.write( theEntireBuffer.c_str(), theEntireBuffer.size() );
d.close();
=====================================
Utilities/VTK/Examples/Cxx/GenerateRTSTRUCT.cxx
=====================================
@@ -127,7 +127,7 @@ int main(int argc, char *argv[])
while (std::find(theFileNames.begin(), theFileNames.end(), thePotentialName) != theFileNames.end())
{
char buff[255];
- sprintf(buff,"%d",count);
+ snprintf(buff,sizeof(buff),"%d",count);
thePotentialName = theDirName + "/" + "GDCMTestRTStruct." + buff + "." + theRTSeries[q] + ".dcm";
}
writer->SetFileName( thePotentialName.c_str());
=====================================
Wrapping/Csharp/gdcm.i
=====================================
@@ -117,6 +117,7 @@ public class";
#include "gdcmBasicOffsetTable.h"
//#include "gdcmLO.h"
#include "gdcmCSAElement.h"
+#include "gdcmMrProtocol.h"
#include "gdcmPDBElement.h"
#include "gdcmFileSet.h"
@@ -142,6 +143,8 @@ public class";
#include "gdcmSubject.h"
#include "gdcmCommand.h"
#include "gdcmAnonymizer.h"
+#include "gdcmDPath.h"
+#include "gdcmCleaner.h"
#include "gdcmFileAnonymizer.h"
#include "gdcmFileStreamer.h"
#include "gdcmSystem.h"
@@ -240,6 +243,8 @@ public class";
#include "gdcmImageRegionReader.h"
#include "gdcmJSON.h"
#include "gdcmFileDecompressLookupTable.h"
+#include "gdcmEmptyMaskGenerator.h"
+#include "gdcmEquipmentManufacturer.h"
using namespace gdcm;
%}
@@ -645,6 +650,8 @@ EXTEND_CLASS_PRINT(gdcm::Fragment)
EXTEND_CLASS_PRINT(gdcm::PDBElement)
%include "gdcmPDBHeader.h"
EXTEND_CLASS_PRINT(gdcm::PDBHeader)
+%include "gdcmMrProtocol.h"
+EXTEND_CLASS_PRINT(gdcm::MrProtocol)
%include "gdcmCSAElement.h"
EXTEND_CLASS_PRINT(gdcm::CSAElement)
%include "gdcmCSAHeader.h"
@@ -709,6 +716,7 @@ EXTEND_CLASS_PRINT(gdcm::Scanner)
EXTEND_CLASS_PRINT(gdcm::StrictScanner)
%template(SmartPtrAno) gdcm::SmartPointer<gdcm::Anonymizer>;
+%template(SmartPtrCleaner) gdcm::SmartPointer<gdcm::Cleaner>;
//%ignore gdcm::Anonymizer::Anonymizer;
@@ -718,6 +726,8 @@ EXTEND_CLASS_PRINT(gdcm::StrictScanner)
//%feature("unref") Anonymizer "coucou $this->Delete();"
// http://www.swig.org/Doc1.3/SWIGPlus.html#SWIGPlus%5Fnn34
%include "gdcmAnonymizer.h"
+%include "gdcmDPath.h"
+%include "gdcmCleaner.h"
%apply char[] { char* value_data }
%include "gdcmFileAnonymizer.h"
%clear char* value_data;
@@ -970,3 +980,5 @@ EXTEND_CLASS_PRINT(gdcm::BoxRegion)
%clear char* inreadbuffer;
%include "gdcmJSON.h"
%include "gdcmFileDecompressLookupTable.h"
+%include "gdcmEmptyMaskGenerator.h"
+%include "gdcmEquipmentManufacturer.h"
=====================================
Wrapping/Java/gdcm.i
=====================================
@@ -70,6 +70,7 @@
#include "gdcmBasicOffsetTable.h"
//#include "gdcmLO.h"
#include "gdcmCSAElement.h"
+#include "gdcmMrProtocol.h"
#include "gdcmPDBElement.h"
#include "gdcmFileSet.h"
@@ -95,6 +96,8 @@
#include "gdcmSubject.h"
#include "gdcmCommand.h"
#include "gdcmAnonymizer.h"
+#include "gdcmDPath.h"
+#include "gdcmCleaner.h"
#include "gdcmFileAnonymizer.h"
#include "gdcmFileStreamer.h"
#include "gdcmSystem.h"
@@ -193,6 +196,8 @@
#include "gdcmImageRegionReader.h"
#include "gdcmJSON.h"
#include "gdcmFileDecompressLookupTable.h"
+#include "gdcmEmptyMaskGenerator.h"
+#include "gdcmEquipmentManufacturer.h"
using namespace gdcm;
%}
@@ -644,6 +649,8 @@ EXTEND_CLASS_PRINT(gdcm::Fragment)
EXTEND_CLASS_PRINT(gdcm::PDBElement)
%include "gdcmPDBHeader.h"
EXTEND_CLASS_PRINT(gdcm::PDBHeader)
+%include "gdcmMrProtocol.h"
+EXTEND_CLASS_PRINT(gdcm::MrProtocol)
%include "gdcmCSAElement.h"
EXTEND_CLASS_PRINT(gdcm::CSAElement)
%include "gdcmCSAHeader.h"
@@ -817,6 +824,7 @@ EXTEND_CLASS_PRINT(gdcm::StrictScanner)
%clear MappingType;
%template(SmartPtrAno) gdcm::SmartPointer<gdcm::Anonymizer>;
+%template(SmartPtrCleaner) gdcm::SmartPointer<gdcm::Cleaner>;
//%ignore gdcm::Anonymizer::Anonymizer;
@@ -826,6 +834,8 @@ EXTEND_CLASS_PRINT(gdcm::StrictScanner)
//%feature("unref") Anonymizer "coucou $this->Delete();"
// http://www.swig.org/Doc1.3/SWIGPlus.html#SWIGPlus%5Fnn34
%include "gdcmAnonymizer.h"
+%include "gdcmDPath.h"
+%include "gdcmCleaner.h"
%include "gdcmFileAnonymizer.h"
%apply char[] { char* array }
%template(SmartPtrFStreamer) gdcm::SmartPointer<gdcm::FileStreamer>;
@@ -1017,3 +1027,5 @@ EXTEND_CLASS_PRINT(gdcm::BoxRegion)
%clear signed char* inreadbuffer;
%include "gdcmJSON.h"
%include "gdcmFileDecompressLookupTable.h"
+%include "gdcmEmptyMaskGenerator.h"
+%include "gdcmEquipmentManufacturer.h"
=====================================
Wrapping/Python/gdcmswig.i
=====================================
@@ -96,6 +96,8 @@
#include "gdcmSubject.h"
#include "gdcmCommand.h"
#include "gdcmAnonymizer.h"
+#include "gdcmDPath.h"
+#include "gdcmCleaner.h"
#include "gdcmFileAnonymizer.h"
#include "gdcmFileStreamer.h"
#include "gdcmSystem.h"
@@ -581,6 +583,7 @@ EXTEND_CLASS_PRINT(gdcm::Scanner)
EXTEND_CLASS_PRINT(gdcm::StrictScanner)
%template(SmartPtrAno) gdcm::SmartPointer<gdcm::Anonymizer>;
+%template(SmartPtrCleaner) gdcm::SmartPointer<gdcm::Cleaner>;
//%ignore gdcm::Anonymizer::Anonymizer;
@@ -590,6 +593,8 @@ EXTEND_CLASS_PRINT(gdcm::StrictScanner)
//%feature("unref") Anonymizer "coucou $this->Delete();"
// http://www.swig.org/Doc1.3/SWIGPlus.html#SWIGPlus%5Fnn34
%include "gdcmAnonymizer.h"
+%include "gdcmDPath.h"
+%include "gdcmCleaner.h"
%apply char[] { char* value_data }
%include "gdcmFileAnonymizer.h"
%clear char* value_data;
=====================================
appveyor.yml
=====================================
@@ -171,7 +171,7 @@ deploy:
artifact: nuget_package
- provider: GitHub
auth_token:
- secure: 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
+ secure: Fn2cUcuBMVpvBXDzTQiUm2kqZ4AA39z4iyFUS3BsaPWjJEbJgFpmJYoJm2twjVpk
release: $(appveyor_repo_tag_name)
description: 'Release of GDCM $(appveyor_repo_tag_name)'
# github automatically does source zip/tarball for us
=====================================
debian/changelog
=====================================
@@ -1,3 +1,12 @@
+gdcm (3.0.14-1) UNRELEASED; urgency=medium
+
+ * Team upload.
+ * d/watch: Point to latest release
+ * Link against vtk9 instead of vtk7
+ Closes: #1013156
+
+ -- Andreas Tille <tille at debian.org> Thu, 04 Aug 2022 11:30:12 +0200
+
gdcm (3.0.13-3) unstable; urgency=medium
[ Mohammed Bilal ]
@@ -98,7 +107,7 @@ gdcm (3.0.8-1) unstable; urgency=medium
[ Gert Wollny ]
* New upstream version 3.0.8
- [ Alexander Volkov ]
+ [ Alexander Volkov ]
* debian/{rules, control}: Don't build CLI bindings when the "nocil" build
profile is enabled
=====================================
debian/control
=====================================
@@ -22,19 +22,19 @@ Build-Depends: castxml,
libpoppler-private-dev,
libsocket++-dev,
libssl-dev,
- libvtk7-dev,
- libvtk7-java [!hppa !hurd-any !kfreebsd-any],
+ libvtk9-dev,
+ libvtk9-java [!hppa !hurd-any !kfreebsd-any],
libxml2-dev,
libz-dev,
mono-devel [amd64 armel armhf i386 mipsel kfreebsd-amd64 kfreebsd-i386 powerpc ppc64 ppc64el s390x arm64] <!nocil>,
ninja-build,
pvrg-jpeg,
python3-dev,
- python3-vtk7,
+ python3-vtk9,
swig,
uuid-dev,
xsltproc
-Build-Depends-Indep: doxygen, doxygen-latex, ghostscript, graphviz, vtk7-doc
+Build-Depends-Indep: doxygen, doxygen-latex, ghostscript, graphviz, vtk9-doc
Build-Conflicts: libopenjpeg-dev
Standards-Version: 4.6.1
Vcs-Browser: https://salsa.debian.org/med-team/gdcm
@@ -191,7 +191,7 @@ Description: Grassroots DICOM VTK tools and utilities
Package: gdcm-doc
Architecture: all
Section: doc
-Depends: doc-base, vtk7-doc, ${misc:Depends}
+Depends: doc-base, vtk9-doc, ${misc:Depends}
Description: Grassroots DICOM documentation
Grassroots DiCoM is a C++ library for DICOM medical files. It is
automatically wrapped to python/C#/Java (using swig). It supports
=====================================
debian/control.in
=====================================
@@ -22,19 +22,19 @@ Build-Depends: castxml,
libpoppler-private-dev,
libsocket++-dev,
libssl-dev,
- libvtk7-dev,
- libvtk7-java [!hppa !hurd-any !kfreebsd-any],
+ libvtk9-dev,
+ libvtk9-java [!hppa !hurd-any !kfreebsd-any],
libxml2-dev,
libz-dev,
mono-devel [@DEB_MONO_ARCHS@] <!nocil>,
ninja-build,
pvrg-jpeg,
python3-dev,
- python3-vtk7,
+ python3-vtk9,
swig,
uuid-dev,
xsltproc
-Build-Depends-Indep: doxygen, doxygen-latex, ghostscript, graphviz, vtk7-doc
+Build-Depends-Indep: doxygen, doxygen-latex, ghostscript, graphviz, vtk9-doc
Build-Conflicts: libopenjpeg-dev
Standards-Version: 4.6.1
Vcs-Browser: https://salsa.debian.org/med-team/gdcm
@@ -191,7 +191,7 @@ Description: Grassroots DICOM VTK tools and utilities
Package: gdcm-doc
Architecture: all
Section: doc
-Depends: doc-base, vtk7-doc, ${misc:Depends}
+Depends: doc-base, vtk9-doc, ${misc:Depends}
Description: Grassroots DICOM documentation
Grassroots DiCoM is a C++ library for DICOM medical files. It is
automatically wrapped to python/C#/Java (using swig). It supports
=====================================
debian/python3-vtkgdcm.lintian-overrides
=====================================
@@ -8,4 +8,4 @@ python3-vtkgdcm: no-symbols-control-file
python3-vtkgdcm: package-name-doesnt-match-sonames
# This seems to be needed for the python module
-python3-vtkgdcm: non-dev-pkg-with-shlib-symlink
+python3-vtkgdcm: link-to-shared-library-in-wrong-package
=====================================
debian/rules
=====================================
@@ -5,7 +5,6 @@
# results in linking error
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
-export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
=====================================
debian/watch
=====================================
@@ -1,3 +1,3 @@
version=4
opts="filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%@PACKAGE at -$1.tar.gz%" \
- https://github.com/malaterre/GDCM/releases .*/v?@ANY_VERSION@\.tar\.gz
+ https://github.com/malaterre/GDCM/releases/latest .*/v?@ANY_VERSION@\.tar\.gz
View it on GitLab: https://salsa.debian.org/med-team/gdcm/-/compare/5903291028be7c3a03c038ad913a52f55828625a...b55c048e9954fcf829ec941c44495c34c8e78891
--
View it on GitLab: https://salsa.debian.org/med-team/gdcm/-/compare/5903291028be7c3a03c038ad913a52f55828625a...b55c048e9954fcf829ec941c44495c34c8e78891
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20220804/73e27711/attachment-0001.htm>
More information about the debian-med-commit
mailing list