[med-svn] [Git][med-team/gdcm][upstream] New upstream version 3.0.3
Gert Wollny
gitlab at salsa.debian.org
Tue Oct 8 09:12:52 BST 2019
Gert Wollny pushed to branch upstream at Debian Med / gdcm
Commits:
0dcd0210 by Gert Wollny at 2019-10-08T08:00:47Z
New upstream version 3.0.3
- - - - -
27 changed files:
- Applications/Cxx/gdcmscanner.cxx
- CMakeLists.txt
- Examples/Cxx/CMakeLists.txt
- + Examples/Cxx/DumpVisusChange.cxx
- Source/Common/gdcmDirectory.cxx
- Source/DataDictionary/gdcmPrivateDefaultDicts.cxx
- Source/DataStructureAndEncodingDefinition/gdcmByteValue.cxx
- Source/DataStructureAndEncodingDefinition/gdcmElement.h
- Source/MediaStorageAndFileFormat/gdcmAnonymizer.cxx
- Source/MediaStorageAndFileFormat/gdcmScanner.cxx
- Source/MediaStorageAndFileFormat/gdcmScanner.h
- Source/MediaStorageAndFileFormat/gdcmStrictScanner.cxx
- Source/MediaStorageAndFileFormat/gdcmStrictScanner.h
- Testing/CMakeLists.txt
- Testing/Source/Common/Python/CMakeLists.txt
- Utilities/CMakeLists.txt
- Utilities/VTK/Applications/gdcmviewer.cxx
- Utilities/VTK/CMakeLists.txt
- Utilities/VTK/vtkgdcm.i
- Utilities/doxygen/CMakeLists.txt
- Utilities/doxygen/man/gdcmscanner.xml
- Utilities/doxygen/man/gdcmviewer.xml
- Wrapping/CMakeLists.txt
- Wrapping/Csharp/CMakeLists.txt
- Wrapping/Java/CMakeLists.txt
- Wrapping/Python/CMakeLists.txt
- Wrapping/Python/docstrings.i
Changes:
=====================================
Applications/Cxx/gdcmscanner.cxx
=====================================
@@ -32,6 +32,10 @@
#include "gdcmTrace.h"
#include "gdcmVersion.h"
#include "gdcmSimpleSubjectWatcher.h"
+#include "gdcmGlobal.h"
+#include "gdcmDicts.h"
+#include "gdcmDict.h"
+#include "gdcmDictEntry.h"
#include <string>
#include <iostream>
@@ -55,12 +59,15 @@ static void PrintHelp()
std::cout << "Usage: gdcmscanner [OPTION] -d directory -t tag(s)" << std::endl;
std::cout << "Scan a directory containing DICOM files.\n";
std::cout << "Parameter (required):" << std::endl;
- std::cout << " -d --dir DICOM directory" << std::endl;
- std::cout << " -t --tag %d,%d DICOM tag(s) to look for" << std::endl;
+ std::cout << " -d --dir DICOM directory" << std::endl;
+ std::cout << " -t --tag %d,%d DICOM tag(s) to look for" << std::endl;
+ std::cout << " -k --keyword %s DICOM keyword(s) to look for" << std::endl;
std::cout << " -P --private-tag %d,%d,%s DICOM private tag(s) to look for" << std::endl;
std::cout << "Options:" << std::endl;
std::cout << " -p --print Print output." << std::endl;
- std::cout << " -r --recursive Recusively descend directory." << std::endl;
+ std::cout << " -r --recursive Recursively descend directory." << std::endl;
+ std::cout << " --strict Use strict parser (faster but less tolerant with bogus DICOM files)." << std::endl;
+ std::cout << " --table Use Table output." << std::endl;
std::cout << "General Options:" << std::endl;
std::cout << " -V --verbose more verbose (warning+error)." << std::endl;
std::cout << " -W --warning print warning info." << std::endl;
@@ -75,7 +82,7 @@ typedef std::vector<gdcm::PrivateTag> VectorPrivateTags;
template < typename TScanner >
static int DoIt(
gdcm::Directory const & d,
- bool const & print ,
+ bool const & print , int table,
VectorTags const & tags,
VectorPrivateTags const & privatetags)
{
@@ -96,7 +103,13 @@ static int DoIt(
std::cerr << "Scanner failed" << std::endl;
return 1;
}
- if (print) s.Print( std::cout );
+ if (print)
+ {
+ if(table)
+ s.PrintTable( std::cout );
+ else
+ s.Print( std::cout );
+ }
return 0;
}
@@ -114,8 +127,12 @@ int main(int argc, char *argv[])
VectorPrivateTags privatetags;
gdcm::Tag tag;
gdcm::PrivateTag privatetag;
+ static const gdcm::Global &g = gdcm::Global::GetInstance();
+ static const gdcm::Dicts &dicts = g.GetDicts();
+ static const gdcm::Dict &pubdict = dicts.GetPublicDict();
int strict = 0;
+ int table = 0;
int verbose = 0;
int warning = 0;
int debug = 0;
@@ -127,25 +144,27 @@ int main(int argc, char *argv[])
//int this_option_optind = optind ? optind : 1;
int option_index = 0;
static struct option long_options[] = {
- {"dir", 1, nullptr, 0},
- {"tag", 1, nullptr, 0},
- {"recursive", 1, nullptr, 0},
- {"print", 1, nullptr, 0},
- {"private-tag", 1, nullptr, 0},
- {"strict", 0, &strict, 1},
+ {"dir", required_argument, nullptr, 'd'},
+ {"tag", required_argument, nullptr, 't'},
+ {"recursive", no_argument, nullptr, 'r'},
+ {"print", no_argument, nullptr, 'p'},
+ {"private-tag", required_argument, nullptr, 'P'},
+ {"keyword", required_argument, nullptr, 'k'},
+ {"strict", no_argument, &strict, 1},
+ {"table", no_argument, &table, 1},
// General options !
- {"verbose", 0, &verbose, 1},
- {"warning", 0, &warning, 1},
- {"debug", 0, &debug, 1},
- {"error", 0, &error, 1},
- {"help", 0, &help, 1},
- {"version", 0, &version, 1},
+ {"verbose", no_argument, nullptr, 'V'},
+ {"warning", no_argument, nullptr, 'W'},
+ {"debug", no_argument, nullptr, 'D'},
+ {"error", no_argument, nullptr, 'E'},
+ {"help", no_argument, nullptr, 'H'},
+ {"version", no_argument, nullptr, 'v'},
{nullptr, 0, nullptr, 0}
};
- c = getopt_long (argc, argv, "d:t:rpP:VWDEhv",
+ c = getopt_long (argc, argv, "d:t:rpP:k:VWDEhv",
long_options, &option_index);
if (c == -1)
{
@@ -155,18 +174,10 @@ int main(int argc, char *argv[])
switch (c)
{
case 0:
+ if (optarg)
{
- //const char *s = long_options[option_index].name;
- //printf ("option %s", s);
- //if (optarg)
- // {
- // if( option_index == 0 ) /* input */
- // {
- // assert( strcmp(s, "input") == 0 );
- // }
- // printf (" with arg %s", optarg);
- // }
- //printf ("\n");
+ const char *s = long_options[option_index].name; (void)s;
+ assert(0);
}
break;
@@ -180,6 +191,20 @@ int main(int argc, char *argv[])
//std::cerr << optarg << std::endl;
break;
+ case 'k':
+ {
+ const char * keyword = optarg;
+ /*const gdcm::DictEntry &dictentry =*/ pubdict.GetDictEntryByKeyword(keyword, tag);
+ if( tag != gdcm::Tag(0xffff,0xffff) )
+ tags.push_back( tag );
+ else
+ {
+ std::cerr << "Invalid keyword: " << keyword << std::endl;
+ return 1;
+ }
+ }
+ break;
+
case 'P':
privatetag.ReadFromCommaSeparatedString(optarg);
privatetags.push_back( privatetag );
@@ -290,10 +315,16 @@ int main(int argc, char *argv[])
gdcm::Directory d;
unsigned int nfiles = d.Load( dirname.c_str(), recursive );
+ if( !nfiles )
+ {
+ std::cerr << "No files found in: " << dirname << std::endl;
+ return 1;
+ }
if( verbose ) d.Print( std::cout );
- std::cout << "done retrieving file list " << nfiles << " files found." << std::endl;
+ if( !table )
+ std::cout << "done retrieving file list " << nfiles << " files found." << std::endl;
if( strict )
- return DoIt<gdcm::StrictScanner>(d,print,tags,privatetags);
- return DoIt<gdcm::Scanner>(d,print,tags,privatetags);
+ return DoIt<gdcm::StrictScanner>(d,print,table,tags,privatetags);
+ return DoIt<gdcm::Scanner>(d,print,table,tags,privatetags);
}
=====================================
CMakeLists.txt
=====================================
@@ -17,7 +17,7 @@ endif()
#----------------------------------------------------------------------------
project(GDCM
- VERSION 3.0.2
+ VERSION 3.0.3
LANGUAGES CXX C
)
## NOTE: the "DESCRIPTION" feature of project() was introduced in cmake 3.10.0
@@ -590,22 +590,6 @@ if(GDCM_STANDALONE)
else()
set(BUILD_APPLICATIONS OFF)
endif()
-add_subdirectory(Utilities)
-add_subdirectory(Source)
-
-if(GDCM_STANDALONE)
- add_subdirectory(Wrapping)
- if(GDCM_WRAP_CSHARP)
- add_subdirectory(Wrapping/Csharp)
- endif()
-endif()
-
-if(GDCM_STANDALONE)
- # After Wrapping please
- if(BUILD_EXAMPLES)
- add_subdirectory(Examples)
- endif()
-endif()
#-----------------------------------------------------------------------------
# Need pthread for the following class:
@@ -618,7 +602,7 @@ if(GDCM_STANDALONE)
endif()
if(GDCM_STANDALONE)
- if(BUILD_TESTING)
+ if(GDCM_BUILD_TESTING)
configure_file(${GDCM_SOURCE_DIR}/CMake/CTestCustom.ctest.in
${GDCM_BINARY_DIR}/CMake/CTestCustom.ctest @ONLY)
file(WRITE ${GDCM_BINARY_DIR}/CTestCustom.cmake
@@ -635,6 +619,21 @@ if(GDCM_STANDALONE)
endif()
endif()
+# After enable_testing()
+add_subdirectory(Utilities)
+add_subdirectory(Source)
+
+if(GDCM_STANDALONE)
+ add_subdirectory(Wrapping)
+endif()
+
+if(GDCM_STANDALONE)
+ # After Wrapping please
+ if(BUILD_EXAMPLES)
+ add_subdirectory(Examples)
+ endif()
+endif()
+
#-----------------------------------------------------------------------------
if(GDCM_STANDALONE)
option(GDCM_DOCUMENTATION "Build source documentation using doxygen." OFF)
@@ -680,6 +679,11 @@ include(CMake/InstallRequiredVTKLibraries.cmake)
endif()
endif()
+# Make sure to run doxygen after everything else (in particular vtkgdcm):
+if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/Utilities/doxygen)
+ add_subdirectory(Utilities/doxygen)
+endif()
+
#-----------------------------------------------------------------------------
# CPack stuff
if(GDCM_STANDALONE) # disabled for ITK distribution of gdcm
=====================================
Examples/Cxx/CMakeLists.txt
=====================================
@@ -35,6 +35,7 @@ set(EXAMPLES_SRCS
PrintLUT
EmptyMask
DumpSiemensBase64
+ DumpVisusChange
TemplateEmptyImage
MakeTemplate
DeriveSeries
=====================================
Examples/Cxx/DumpVisusChange.cxx
=====================================
@@ -0,0 +1,143 @@
+/*=========================================================================
+
+ 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.
+
+=========================================================================*/
+#include "gdcmReader.h"
+#include "gdcmDirectory.h"
+#include "gdcmStringFilter.h"
+
+#include <vector>
+#include <algorithm>
+
+/*
+ */
+static bool process( std::vector<gdcm::DataElement> & ms, const char * filename)
+{
+ using namespace gdcm;
+ Tag pd(0x7fe0,0x0000);
+ std::set<gdcm::Tag> skiptags;
+ skiptags.insert( pd );
+
+ gdcm::Reader reader;
+ reader.SetFileName( filename );
+ if( !reader.ReadUpToTag( pd, skiptags ) )
+ {
+ std::cerr << "Failure to read: " << filename << std::endl;
+ return false;
+ }
+
+ gdcm::File &file = reader.GetFile();
+ gdcm::DataSet &ds1 = file.GetDataSet();
+
+ const gdcm::PrivateTag tseq1(0x5533,0x33,"Visus Change");
+ if( !ds1.FindDataElement( tseq1 ) ) return true;
+ const gdcm::DataElement& seq1 = ds1.GetDataElement( tseq1 );
+
+ SmartPointer<SequenceOfItems> sqi1 = seq1.GetValueAsSQ();
+
+ const size_t nitems = sqi1->GetNumberOfItems();
+ for( size_t item = 1; item < nitems; ++item )
+ {
+ Item &item1 = sqi1->GetItem(item);
+ DataSet &ds2 = item1.GetNestedDataSet();
+ for(DataSet::ConstIterator it = ds2.Begin(); it != ds2.End(); ++it )
+ {
+ DataElement const & de = *it;
+ // cannot simply use std::set here, see there is a discrepancy in between
+ // operator== and operator<.
+ // So only use operator== here:
+ std::vector<DataElement>::iterator vit = std::find(ms.begin(), ms.end(), de);
+ if( vit == ms.end() )
+ ms.push_back(de);
+ }
+ }
+ return true;
+}
+
+int main(int argc, char *argv[])
+{
+ bool usefastpath = true;
+
+ if( argc < 2 ) return 1;
+ using namespace gdcm;
+ const char *filename = argv[1];
+ gdcm::Directory::FilenamesType filenames;
+ if( !gdcm::System::FileExists(filename) )
+ {
+ std::cerr << "Could not find file: " << filename << std::endl;
+ return 1;
+ }
+
+ gdcm::Directory dir;
+ if( gdcm::System::FileIsDirectory(filename) )
+ {
+ unsigned int nfiles = dir.Load(filename, false);
+ if( nfiles == 0 )
+ {
+ std::cerr << "Could not find files: " << filename << std::endl;
+ return 1;
+ }
+ filenames = dir.GetFilenames();
+ }
+ else
+ {
+ filenames.push_back( filename );
+ }
+ gdcm::StringFilter sf;
+
+ Tag pd(0x7fe0,0x0000);
+ std::set<gdcm::Tag> skiptags;
+ skiptags.insert( pd );
+
+ gdcm::Reader reader;
+ reader.SetFileName( filenames[0].c_str() );
+ if( !reader.ReadUpToTag( pd, skiptags ) )
+ {
+ std::cerr << "Could not read file: " << filename << std::endl;
+ return 1;
+ }
+ gdcm::File &file = reader.GetFile();
+ sf.SetFile(file);
+
+ if( usefastpath ) {
+ // Heuristic, assume if private tag cannot be found in first file, skip the directory
+ gdcm::DataSet &ds1 = file.GetDataSet();
+
+ const gdcm::PrivateTag tseq1(0x5533,0x33,"Visus Change");
+ if( !ds1.FindDataElement( tseq1 ) ){
+ std::cerr << "Could not find private tag in first file skipping whole directory: " << filename << std::endl;
+ return 0;
+ }
+ }
+
+ std::vector<DataElement> ms;
+ for(gdcm::Directory::FilenamesType::const_iterator cit = filenames.begin(); cit != filenames.end(); ++cit )
+ {
+ if( !process(ms, cit->c_str()) ) {
+ return 1;
+ }
+ }
+
+ if( !ms.empty() ) {
+ std::sort(ms.begin(), ms.end());
+ std::cout << filename << ",\"";
+ for(std::vector<DataElement>::const_iterator it = ms.begin(); it != ms.end(); ++it )
+ {
+ DataElement const & de = *it;
+ std::string const & s = sf.ToString( de );
+ std::cout << de.GetTag() << " " << s << std::endl;
+ }
+ std::cout << "\"" << std::endl;
+ }
+
+ return 0;
+}
=====================================
Source/Common/gdcmDirectory.cxx
=====================================
@@ -40,7 +40,7 @@ unsigned int Directory::Load(FilenameType const &name, bool recursive)
Toplevel = name;
return Explore( Toplevel, recursive );
}
- return false;
+ return 0;
}
unsigned int Directory::Explore(FilenameType const &name, bool recursive)
=====================================
Source/DataDictionary/gdcmPrivateDefaultDicts.cxx
=====================================
@@ -38,6 +38,18 @@ typedef struct
} DICT_ENTRY;
static const DICT_ENTRY DICOMV3DataDict [] = {
+ {0x7fe1,0x0001,"Bioclinica",VR::UT,VM::VM1,"??",false},
+ {0x7fe1,0x0002,"Bioclinica",VR::LO,VM::VM1,"??",false},
+ {0x7fe1,0x0003,"Bioclinica",VR::LO,VM::VM1,"??",false},
+ {0x5533,0x0033,"Visus Change",VR::SQ,VM::VM1,"Visus Data Save Sequence",false},
+ {0x5533,0x0035,"Visus Change",VR::DA,VM::VM1,"Visus Data Save Date",false},
+ {0x5533,0x0037,"Visus Change",VR::LO,VM::VM1,"Visus Data Save Originator",false},
+ {0x5533,0x0039,"Visus Change",VR::FD,VM::VM1,"Visus Data Save ID",false},
+ {0x5533,0x003b,"Visus Change",VR::TM,VM::VM1,"?Visus Data Save Time?",false},
+ {0x0071,0x0021,"SIEMENS MED PT",VR::UI,VM::VM1,"Registration Matrix UID",false},
+ {0x0071,0x0022,"SIEMENS MED PT",VR::DT,VM::VM1,"Decay Correction DateTime",false},
+ {0x0071,0x0023,"SIEMENS MED PT",VR::FD,VM::VM16,"Registration Matrix",false},
+ {0x0071,0x0024,"SIEMENS MED PT",VR::CS,VM::VM1,"Table Motion",false},
{0x0021,0x0001,"SIEMENS MR SDR 01",VR::LO,VM::VM1,"??",false},
{0x0021,0x0001,"SIEMENS MR SDS 01",VR::IS,VM::VM1,"??",false},
{0x0021,0x0002,"SIEMENS MR SDR 01",VR::LO,VM::VM1,"??",false},
@@ -310,6 +322,7 @@ static const DICT_ENTRY DICOMV3DataDict [] = {
{0x0019,0x0050,"PMTF INFORMATION DATA^10",VR::SL,VM::VM2,"?",false },
{0x0019,0x0051,"PMTF INFORMATION DATA^10",VR::SL,VM::VM2,"?",false },
{0x0019,0x0052,"PMTF INFORMATION DATA^10",VR::LO,VM::VM1,"?",false },
+ {0x0019,0x0052,"PMTF INFORMATION DATA^12",VR::FL,VM::VM2,"?",false },
{0x0019,0x0054,"PMTF INFORMATION DATA^10",VR::US,VM::VM1,"?",false },
{0x0019,0x0055,"PMTF INFORMATION DATA^10",VR::US,VM::VM1,"?",false },
{0x0019,0x0055,"PMTF INFORMATION DATA^11",VR::LO,VM::VM1,"?",false },
@@ -326,10 +339,13 @@ static const DICT_ENTRY DICOMV3DataDict [] = {
{0x0019,0x005d,"PMTF INFORMATION DATA^11",VR::SL,VM::VM1,"?",false },
{0x0019,0x005e,"PMTF INFORMATION DATA^10",VR::SL,VM::VM1,"?",false },
{0x0019,0x005f,"PMTF INFORMATION DATA^10",VR::FL,VM::VM1,"?",false },
+ {0x0019,0x005f,"PMTF INFORMATION DATA^11",VR::FL,VM::VM1,"?",false },
{0x0019,0x0060,"PMTF INFORMATION DATA^10",VR::US,VM::VM1,"?",false },
{0x0019,0x0060,"PMTF INFORMATION DATA^11",VR::SL,VM::VM1,"?",false },
{0x0019,0x0061,"PMTF INFORMATION DATA^10",VR::US,VM::VM1,"?",false },
+ {0x0019,0x0061,"PMTF INFORMATION DATA^11",VR::FL,VM::VM1,"?",false },
{0x0019,0x0062,"PMTF INFORMATION DATA^10",VR::US,VM::VM1,"?",false },
+ {0x0019,0x0062,"PMTF INFORMATION DATA^11",VR::FL,VM::VM1,"?",false },
{0x0019,0x0063,"PMTF INFORMATION DATA^10",VR::FL,VM::VM1,"?",false },
{0x0019,0x0063,"PMTF INFORMATION DATA^11",VR::SL,VM::VM1,"?",false },
{0x0019,0x0064,"PMTF INFORMATION DATA^10",VR::FL,VM::VM1,"?",false },
@@ -348,7 +364,10 @@ static const DICT_ENTRY DICOMV3DataDict [] = {
{0x0019,0x006f,"PMTF INFORMATION DATA^10",VR::SL,VM::VM1,"?",false },
{0x0019,0x006f,"PMTF INFORMATION DATA^11",VR::FL,VM::VM1,"?",false },
{0x0019,0x0070,"PMTF INFORMATION DATA^10",VR::LO,VM::VM1,"?",false },
+ {0x0019,0x0070,"PMTF INFORMATION DATA^11",VR::FL,VM::VM1,"?",false },
{0x0019,0x0071,"PMTF INFORMATION DATA^10",VR::LO,VM::VM1,"?Sequence Options?",false },
+ {0x0019,0x0071,"PMTF INFORMATION DATA^11",VR::SL,VM::VM1,"?",false },
+ {0x0019,0x0072,"PMTF INFORMATION DATA^11",VR::FL,VM::VM1,"?",false },
{0x0019,0x0073,"PMTF INFORMATION DATA^10",VR::LO,VM::VM1,"?Sequence Options?",false },
{0x0019,0x0075,"PMTF INFORMATION DATA^10",VR::LO,VM::VM1,"?",false },
{0x0019,0x0076,"PMTF INFORMATION DATA^10",VR::LO,VM::VM1,"?",false },
@@ -382,8 +401,10 @@ static const DICT_ENTRY DICOMV3DataDict [] = {
{0x0019,0x008a,"PMTF INFORMATION DATA^10",VR::SL,VM::VM1_n,"?",false },
{0x0019,0x008a,"PMTF INFORMATION DATA^11",VR::US,VM::VM1,"?",false },
{0x0019,0x008a,"PMTF INFORMATION DATA^12",VR::US,VM::VM1,"Series Number Global",false },
+ {0x0019,0x008b,"PMTF INFORMATION DATA^11",VR::SL,VM::VM1,"?",false },
{0x0019,0x008b,"PMTF INFORMATION DATA^12",VR::US,VM::VM1,"?",false },
{0x0019,0x008c,"PMTF INFORMATION DATA^10",VR::UL,VM::VM1,"?",false },
+ {0x0019,0x008c,"PMTF INFORMATION DATA^11",VR::SL,VM::VM1,"?",false },
{0x0019,0x008d,"PMTF INFORMATION DATA^10",VR::TM,VM::VM1,"?",false },
{0x0019,0x008e,"PMTF INFORMATION DATA^10",VR::SL,VM::VM1,"?",false },
{0x0019,0x008f,"PMTF INFORMATION DATA^11",VR::SL,VM::VM1,"?",false },
@@ -405,7 +426,7 @@ static const DICT_ENTRY DICOMV3DataDict [] = {
{0x0019,0x009a,"PMTF INFORMATION DATA^12",VR::DS,VM::VM1,"Series Number Local",false },
{0x0019,0x009b,"PMTF INFORMATION DATA^10",VR::FL,VM::VM3,"?",false },
{0x0019,0x009b,"PMTF INFORMATION DATA^11",VR::US,VM::VM1,"?",false },
- {0x0019,0x009b,"PMTF INFORMATION DATA^12",VR::DS,VM::VM1,"?",false },
+ {0x0019,0x009b,"PMTF INFORMATION DATA^12",VR::DS,VM::VM1,"?",false }, // Sometimes IS
{0x0019,0x009c,"PMTF INFORMATION DATA^10",VR::SL,VM::VM1,"?",false },
{0x0019,0x009c,"PMTF INFORMATION DATA^11",VR::FL,VM::VM1,"?",false },
{0x0019,0x009c,"PMTF INFORMATION DATA^12",VR::DS,VM::VM1,"?num?",false },
@@ -443,6 +464,7 @@ static const DICT_ENTRY DICOMV3DataDict [] = {
{0x0019,0x00ab,"PMTF INFORMATION DATA^12",VR::FL,VM::VM3,"?",false },
{0x0019,0x00ac,"PMTF INFORMATION DATA^10",VR::US,VM::VM1,"?",false },
{0x0019,0x00ac,"PMTF INFORMATION DATA^12",VR::FL,VM::VM3,"?",false },
+ {0x0019,0x00ad,"PMTF INFORMATION DATA^10",VR::FL,VM::VM1,"?",false },
{0x0019,0x00ad,"PMTF INFORMATION DATA^11",VR::SL,VM::VM1,"?",false },
{0x0019,0x00ad,"PMTF INFORMATION DATA^12",VR::FL,VM::VM3,"?",false },
{0x0019,0x00ae,"PMTF INFORMATION DATA^10",VR::FL,VM::VM1,"?",false },
@@ -451,6 +473,7 @@ static const DICT_ENTRY DICOMV3DataDict [] = {
{0x0019,0x00af,"PMTF INFORMATION DATA^10",VR::SL,VM::VM1,"?",false },
{0x0019,0x00af,"PMTF INFORMATION DATA^12",VR::FL,VM::VM3,"?",false },
{0x0019,0x00b0,"PMTF INFORMATION DATA^10",VR::SL,VM::VM1,"?",false },
+ {0x0019,0x00b0,"PMTF INFORMATION DATA^11",VR::FL,VM::VM1,"?",false },
{0x0019,0x00b1,"PMTF INFORMATION DATA^10",VR::SL,VM::VM1,"?",false },
{0x0019,0x00b1,"PMTF INFORMATION DATA^11",VR::SL,VM::VM1,"?",false },
{0x0019,0x00b2,"PMTF INFORMATION DATA^11",VR::US,VM::VM1,"?",false },
@@ -468,9 +491,14 @@ static const DICT_ENTRY DICOMV3DataDict [] = {
{0x0019,0x00b9,"PMTF INFORMATION DATA^11",VR::US,VM::VM1,"?",false },
{0x0019,0x00ba,"PMTF INFORMATION DATA^10",VR::FL,VM::VM1,"?",false },
{0x0019,0x00bb,"PMTF INFORMATION DATA^10",VR::FL,VM::VM1,"?",false },
+ {0x0019,0x00bb,"PMTF INFORMATION DATA^11",VR::FL,VM::VM1,"?",false },
{0x0019,0x00bc,"PMTF INFORMATION DATA^10",VR::FL,VM::VM2,"?",false },
+ {0x0019,0x00bc,"PMTF INFORMATION DATA^11",VR::SL,VM::VM1,"?",false },
{0x0019,0x00bd,"PMTF INFORMATION DATA^10",VR::SL,VM::VM1,"?",false },
+ {0x0019,0x00bd,"PMTF INFORMATION DATA^11",VR::SL,VM::VM1,"?",false },
{0x0019,0x00be,"PMTF INFORMATION DATA^10",VR::SL,VM::VM1,"Acquisition Duration",false },
+ {0x0019,0x00be,"PMTF INFORMATION DATA^11",VR::FL,VM::VM1_n,"?",false },
+ {0x0019,0x00bf,"PMTF INFORMATION DATA^11",VR::SL,VM::VM1,"?",false },
{0x0019,0x00c0,"PMTF INFORMATION DATA^11",VR::SL,VM::VM1,"?",false },
{0x0019,0x00c1,"PMTF INFORMATION DATA^10",VR::SL,VM::VM1,"?",false },
{0x0019,0x00c1,"PMTF INFORMATION DATA^11",VR::US,VM::VM1,"?",false },
@@ -488,10 +516,12 @@ static const DICT_ENTRY DICOMV3DataDict [] = {
{0x0019,0x00ca,"PMTF INFORMATION DATA^10",VR::LO,VM::VM1,"Sequence Name",false },
{0x0019,0x00cb,"PMTF INFORMATION DATA^10",VR::UL,VM::VM1,"?",false },
{0x0019,0x00cc,"PMTF INFORMATION DATA^10",VR::UL,VM::VM1,"?",false },
- {0x0019,0x00cc,"PMTF INFORMATION DATA^12",VR::SS,VM::VM1,"?",false },
+ {0x0019,0x00cc,"PMTF INFORMATION DATA^12",VR::SS,VM::VM1_n,"?",false },
{0x0019,0x00cd,"PMTF INFORMATION DATA^10",VR::SL,VM::VM1,"?",false },
+ {0x0019,0x00cd,"PMTF INFORMATION DATA^11",VR::SL,VM::VM3,"?",false },
{0x0019,0x00cd,"PMTF INFORMATION DATA^12",VR::LO,VM::VM1,"?",false },
{0x0019,0x00ce,"PMTF INFORMATION DATA^10",VR::SL,VM::VM1,"?",false },
+ {0x0019,0x00ce,"PMTF INFORMATION DATA^12",VR::UL,VM::VM1,"?",false },
{0x0019,0x00cf,"PMTF INFORMATION DATA^10",VR::SL,VM::VM1,"?acquired series (vs postproc)?",false },
{0x0019,0x00cf,"PMTF INFORMATION DATA^12",VR::FL,VM::VM1,"?",false },
{0x0019,0x00d0,"PMTF INFORMATION DATA^10",VR::US,VM::VM1,"?",false },
@@ -540,8 +570,10 @@ static const DICT_ENTRY DICOMV3DataDict [] = {
{0x0019,0x00ef,"PMTF INFORMATION DATA^12",VR::DS,VM::VM1,"?",false },
{0x0019,0x00f0,"PMTF INFORMATION DATA^10",VR::SL,VM::VM1,"?",false },
{0x0019,0x00f0,"PMTF INFORMATION DATA^11",VR::SL,VM::VM1_n,"?",false },
+ {0x0019,0x00f0,"PMTF INFORMATION DATA^12",VR::LO,VM::VM1,"?",false },
{0x0019,0x00f1,"PMTF INFORMATION DATA^10",VR::FL,VM::VM1,"?",false },
{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,0x00f3,"PMTF INFORMATION DATA^10",VR::SL,VM::VM1,"?",false },
@@ -563,10 +595,13 @@ static const DICT_ENTRY DICOMV3DataDict [] = {
{0x0019,0x00fb,"PMTF INFORMATION DATA^11",VR::FL,VM::VM1,"?",false },
{0x0019,0x00fc,"PMTF INFORMATION DATA^10",VR::FL,VM::VM1,"?",false },
{0x0019,0x00fc,"PMTF INFORMATION DATA^11",VR::FL,VM::VM1,"?",false },
+ {0x0019,0x00fc,"PMTF INFORMATION DATA^12",VR::FL,VM::VM1,"?",false },
{0x0019,0x00fd,"PMTF INFORMATION DATA^10",VR::FL,VM::VM1,"?",false },
{0x0019,0x00fd,"PMTF INFORMATION DATA^11",VR::SL,VM::VM1,"?",false },
+ {0x0019,0x00fd,"PMTF INFORMATION DATA^12",VR::SL,VM::VM1,"?",false },
{0x0019,0x00fe,"PMTF INFORMATION DATA^10",VR::SL,VM::VM1,"?",false },
{0x0019,0x00fe,"PMTF INFORMATION DATA^11",VR::SL,VM::VM1,"?",false },
+ {0x0019,0x00fe,"PMTF INFORMATION DATA^12",VR::SL,VM::VM1,"?",false },
{0x0019,0x00ff,"PMTF INFORMATION DATA^10",VR::SL,VM::VM3,"?",false },
{0x0019,0x00ff,"PMTF INFORMATION DATA^11",VR::SL,VM::VM1,"?",false },
{0x0021,0x0002,"PMTF INFORMATION DATA^10",VR::SL,VM::VM1,"?num?",false },
@@ -600,6 +635,7 @@ static const DICT_ENTRY DICOMV3DataDict [] = {
{0x0029,0x0054,"PMTF INFORMATION DATA^10",VR::LO,VM::VM1,"?study filepath?",false },
{0x0029,0x0067,"PMTF INFORMATION DATA^10",VR::FD,VM::VM4,"Series Diffusion Info (b-value,x,y,z)",false },
{0x0029,0x0068,"PMTF INFORMATION DATA^10",VR::SS,VM::VM1,"?num 1?",false },
+ {0x0029,0x006e,"PMTF INFORMATION DATA^10",VR::OB,VM::VM1,"?",false },
//{0x0029,0x0089,"PMTF INFORMATION DATA",VR::LO,VM::VM1,"?",false }, /* defined below */
{0xe201,0x0002,"PMTF INFORMATION DATA^10",VR::US,VM::VM1,"?",false },
{0xe301,0x0000,"PMTF INFORMATION DATA^10",VR::SH,VM::VM1,"Series Description",false },
@@ -609,6 +645,7 @@ static const DICT_ENTRY DICOMV3DataDict [] = {
{0xe401,0x0003,"PMTF INFORMATION DATA^10",VR::US,VM::VM1,"?num?",false },
{0xe401,0x0004,"PMTF INFORMATION DATA^10",VR::US,VM::VM1,"?num?",false },
{0xe401,0x0005,"PMTF INFORMATION DATA^10",VR::OB,VM::VM1,"?blob?",false },
+ {0xe401,0x0007,"PMTF INFORMATION DATA^10",VR::FL,VM::VM1,"?",false },
{0xe401,0x0008,"PMTF INFORMATION DATA^10",VR::FL,VM::VM1,"?ADC factor?",false },
{0xe401,0x0012,"PMTF INFORMATION DATA^10",VR::FL,VM::VM1,"?num?",false },
{0xe401,0x0013,"PMTF INFORMATION DATA^10",VR::OB,VM::VM1,"Icon DIB (Microsoft Windows 3.X Packed Device-Independent Bitmap)",false },
=====================================
Source/DataStructureAndEncodingDefinition/gdcmByteValue.cxx
=====================================
@@ -30,7 +30,7 @@ namespace gdcm_ns
++l;
}
#else
- assert( !l.IsUndefined() && !l.IsOdd() );
+ gdcmAssertAlwaysMacro( !l.IsUndefined() && !l.IsOdd() );
#endif
// I cannot use reserve for now. I need to implement:
// STL - vector<> and istream
=====================================
Source/DataStructureAndEncodingDefinition/gdcmElement.h
=====================================
@@ -236,10 +236,10 @@ public:
char sep;
//std::cout << "GetLength: " << af->GetLength() << std::endl;
for(unsigned long i=1; i<length;++i) {
- assert( _is );
+ //assert( _is );
// Get the separator in between the values
_is >> std::ws >> sep; //_is.get(sep);
- assert( sep == '\\' ); // FIXME: Bad use of assert
+ //assert( sep == '\\' ); // FIXME: Bad use of assert
_is >> std::ws >> data[i];
}
}
=====================================
Source/MediaStorageAndFileFormat/gdcmAnonymizer.cxx
=====================================
@@ -743,7 +743,7 @@ catch(...)
}
-bool IsVRUI(Tag const &tag)
+static bool IsVRUI(Tag const &tag)
{
static const Global &g = Global::GetInstance();
static const Dicts &dicts = g.GetDicts();
=====================================
Source/MediaStorageAndFileFormat/gdcmScanner.cxx
=====================================
@@ -202,6 +202,51 @@ void Scanner::Print( std::ostream & os ) const
}
}
+static bool IsVRUI(Tag const &tag)
+{
+ static const Global &g = Global::GetInstance();
+ static const Dicts &dicts = g.GetDicts();
+ const DictEntry &dictentry = dicts.GetDictEntry(tag);
+ if( dictentry.GetVR() == VR::UI ) return true;
+ //if( tag == Tag(0x0020,0x000d) // Study Instance UID : UI
+ // || tag == Tag(0x0020,0x0052) //
+ // || tag == Tag(0x0020,0x000e) ) // Series Instance UID : UI
+ // {
+ // return true;
+ // }
+ return false;
+}
+
+void Scanner::PrintTable( std::ostream & os ) const
+{
+ Directory::FilenamesType::const_iterator file = Filenames.begin();
+ for(; file != Filenames.end(); ++file)
+ {
+ const char *filename = file->c_str();
+ assert( filename && *filename );
+ bool b = IsKey(filename);
+ const char *comment = !b ? "could not be read" : "could be read";
+ os << '"' << filename << '"' << "\t";
+ //const FilenameToValue &mapping = Mappings[*tag];
+ TagsType::const_iterator tag = Tags.begin();
+ const TagToValue &mapping = GetMapping(filename);
+ for( ; tag != Tags.end(); ++tag )
+ {
+ const Tag &t = *tag;
+ bool isui = IsVRUI(t);
+ const char *value = "";
+ if( mapping.find(t) != mapping.end() ) {
+ const char * v = mapping.find(t)->second;
+ //const char* value = this->GetValue(filename, *tag);
+ if(v) value = v;
+ }
+ os << '"' << (isui ? String<>::Trim( value ) : value) << '"';
+ os << "\t";
+ }
+ os << "\n";
+ }
+}
+
Scanner::TagToValue const & Scanner::GetMapping(const char *filename) const
{
// assert( Mappings.find(filename) != Mappings.end() );
=====================================
Source/MediaStorageAndFileFormat/gdcmScanner.h
=====================================
@@ -89,6 +89,8 @@ public:
/// Print result
void Print( std::ostream & os ) const override;
+ void PrintTable( std::ostream & os ) const;
+
/// Check if filename is a key in the Mapping table.
/// returns true only of file can be found, which means
/// the file was indeed a DICOM file that could be processed
=====================================
Source/MediaStorageAndFileFormat/gdcmStrictScanner.cxx
=====================================
@@ -211,6 +211,51 @@ void StrictScanner::Print( std::ostream & os ) const
}
}
+static bool IsVRUI(Tag const &tag)
+{
+ static const Global &g = Global::GetInstance();
+ static const Dicts &dicts = g.GetDicts();
+ const DictEntry &dictentry = dicts.GetDictEntry(tag);
+ if( dictentry.GetVR() == VR::UI ) return true;
+ //if( tag == Tag(0x0020,0x000d) // Study Instance UID : UI
+ // || tag == Tag(0x0020,0x0052) //
+ // || tag == Tag(0x0020,0x000e) ) // Series Instance UID : UI
+ // {
+ // return true;
+ // }
+ return false;
+}
+
+void StrictScanner::PrintTable( std::ostream & os ) const
+{
+ Directory::FilenamesType::const_iterator file = Filenames.begin();
+ for(; file != Filenames.end(); ++file)
+ {
+ const char *filename = file->c_str();
+ assert( filename && *filename );
+ bool b = IsKey(filename);
+ const char *comment = !b ? "could not be read" : "could be read";
+ os << '"' << filename << '"' << "\t";
+ //const FilenameToValue &mapping = Mappings[*tag];
+ TagsType::const_iterator tag = Tags.begin();
+ const TagToValue &mapping = GetMapping(filename);
+ for( ; tag != Tags.end(); ++tag )
+ {
+ const Tag &t = *tag;
+ bool isui = IsVRUI(t);
+ const char *value = "";
+ if( mapping.find(t) != mapping.end() ) {
+ const char * v = mapping.find(t)->second;
+ //const char* value = this->GetValue(filename, *tag);
+ if(v) value = v;
+ }
+ os << '"' << (isui ? String<>::Trim( value ) : value) << '"';
+ os << "\t";
+ }
+ os << "\n";
+ }
+}
+
StrictScanner::TagToValue const & StrictScanner::GetMapping(const char *filename) const
{
// assert( Mappings.find(filename) != Mappings.end() );
=====================================
Source/MediaStorageAndFileFormat/gdcmStrictScanner.h
=====================================
@@ -89,6 +89,8 @@ public:
/// Print result
void Print( std::ostream & os ) const override;
+ void PrintTable( std::ostream & os ) const;
+
/// Check if filename is a key in the Mapping table.
/// returns true only of file can be found, which means
/// the file was indeed a DICOM file that could be processed
=====================================
Testing/CMakeLists.txt
=====================================
@@ -2,6 +2,21 @@
find_package(DCMTK)
find_package(DICOM3TOOLS)
+# Special CMake Module required when doing Python Testing
+if(GDCM_WRAP_PYTHON)
+ include(${GDCM_SOURCE_DIR}/CMake/UsePythonTest.cmake)
+endif()
+
+# Special CMake Module required when doing Java Testing
+if(GDCM_WRAP_JAVA)
+ include(${GDCM_SOURCE_DIR}/CMake/UseJavaTest.cmake)
+endif()
+
+# Special CMake Module required when doing C# Testing
+if(GDCM_WRAP_CSHARP)
+ include(${GDCM_SOURCE_DIR}/CMake/UseCSharpTest.cmake)
+endif()
+
add_subdirectory(
Source
)
=====================================
Testing/Source/Common/Python/CMakeLists.txt
=====================================
@@ -1,5 +1,4 @@
# Define the tests for gdcm-python
-# gdcm-python
set(GDCM_PYTHON_TEST_SRCS
TestTesting
)
=====================================
Utilities/CMakeLists.txt
=====================================
@@ -80,10 +80,6 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/getopt)
endif()
endif()
-if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/doxygen)
- add_subdirectory(doxygen)
-endif()
-
# you could be running mingw32 on linux in which case you do NOT want the gdcmuuid lib
APPEND_COPYRIGHT(${CMAKE_CURRENT_SOURCE_DIR}/gdcmuuid/COPYING)
if(NOT WIN32 AND NOT MINGW)
=====================================
Utilities/VTK/Applications/gdcmviewer.cxx
=====================================
@@ -754,7 +754,7 @@ void PrintHelp()
std::cout << "Options:" << std::endl;
std::cout << " --force-rescale force rescale." << std::endl;
std::cout << " --force-spacing force spacing." << std::endl;
- std::cout << " -r --recursive Recusively descend directory." << std::endl;
+ std::cout << " -r --recursive Recursively descend directory." << std::endl;
std::cout << "General Options:" << std::endl;
std::cout << " -V --verbose more verbose (warning+error)." << std::endl;
std::cout << " -W --warning print warning info." << std::endl;
=====================================
Utilities/VTK/CMakeLists.txt
=====================================
@@ -613,7 +613,7 @@ if(GDCM_WRAP_CSHARP)
OUTPUT ${GDCM_LIBRARY_DIR}/vtkgdcm-sharp.dll
COMMAND ${CMAKE_CSHARP_COMPILER} ARGS "/t:library" "/out:${GDCM_LIBRARY_DIR}/vtkgdcm-sharp.dll" "*.cs"
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- DEPENDS "${swig_generated_file_fullname}"
+ DEPENDS ${SWIG_MODULE_vtkgdcmsharpglue_REAL_NAME}
${CMAKE_CURRENT_BINARY_DIR}/AssemblyInfo.cs
COMMENT "csc *.cs"
)
=====================================
Utilities/VTK/vtkgdcm.i
=====================================
@@ -31,12 +31,17 @@
#endif
%{
-//#define VTK_MAJOR_VERSION 6
-//#define VTK_MINOR_VERSION 2
-//#define VTK_BUILD_VERSION 0
-//#define VTK_VERSION "6.2.0"
+//#define VTK_MAJOR_VERSION 7
+//#define VTK_MINOR_VERSION 1
+//#define VTK_BUILD_VERSION 1
+//#define VTK_VERSION "7.1.1"
%}
+#define VTK_OVERRIDE override
+#define VTK_FINAL final
+#define VTK_DELETE_FUNCTION = delete
+#define VTK_NEWINSTANCE
+#define VTK_LEGACY(X)
%{
// Let's reproduce the stack of include, when one would include vtkSetGet:
=====================================
Utilities/doxygen/CMakeLists.txt
=====================================
@@ -124,12 +124,12 @@ if(GDCM_DOCUMENTATION)
COMMAND ${SED_EXECUTABLE}
ARGS -i.tmp -e "'s/${sed_gdcm_source_dir}/gdcm/g'" ${CMAKE_CURRENT_BINARY_DIR}/latex/*.tex
# Command #3
- COMMAND ${CMAKE_MAKE_PROGRAM}
+ COMMAND make
+ ARGS -C ${CMAKE_CURRENT_BINARY_DIR}/latex
DEPENDS #${CMAKE_CURRENT_BINARY_DIR}/latex/refman.tex
-${CMAKE_CURRENT_BINARY_DIR}/latex/Makefile
+ ${CMAKE_CURRENT_BINARY_DIR}/latex/Makefile
#${GDCM_DOC_TARBALL}
COMMENT "GDCM: Creating (patched) pdf of documentation"
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/latex
)
if(PDFOPT_EXECUTABLE)
add_custom_command(
=====================================
Utilities/doxygen/man/gdcmscanner.xml
=====================================
@@ -37,7 +37,7 @@
<title>OPTIONS</title>
<para><literallayout> -p --print Print output.
- -r --recursive Recusively descend directory.
+ -r --recursive Recursively descend directory.
</literallayout></para>
</refsection>
<refsection xml:id="gdcmxml_1general_options">
=====================================
Utilities/doxygen/man/gdcmviewer.xml
=====================================
@@ -42,7 +42,7 @@
<para><literallayout> --force-rescale force rescale (advanced users)
--force-spacing force spacing (advanced users)
- -r --recursive Recusively descend directory
+ -r --recursive Recursively descend directory
</literallayout></para>
</refsection>
<refsection xml:id="gdcmviewer_1general_options">
=====================================
Wrapping/CMakeLists.txt
=====================================
@@ -16,5 +16,5 @@ if(GDCM_WRAP_PERL)
endif()
# C#
if(GDCM_WRAP_CSHARP)
-# add_subdirectory(Csharp)
+ add_subdirectory(Csharp)
endif()
=====================================
Wrapping/Csharp/CMakeLists.txt
=====================================
@@ -1,7 +1,3 @@
-# Special CMake Module required when doing C# Testing
-if(BUILD_TESTING AND GDCM_WRAP_CSHARP)
- include(${GDCM_SOURCE_DIR}/CMake/UseCSharpTest.cmake)
-endif()
# C# Cmd line options:
# http://msdn.microsoft.com/en-us/library/ms379563(VS.80).aspx
# http://msdn.microsoft.com/en-us/library/aa288436(VS.71).aspx
=====================================
Wrapping/Java/CMakeLists.txt
=====================================
@@ -1,8 +1,3 @@
-# Special CMake Module required when doing Java Testing
-if(BUILD_TESTING AND GDCM_WRAP_JAVA)
- include(${GDCM_SOURCE_DIR}/CMake/UseJavaTest.cmake)
-endif()
-
find_package(SWIG REQUIRED)
include(${SWIG_USE_FILE})
option(GDCM_AUTOLOAD_GDCMJNI "Automatically load gdcmjni" ON)
=====================================
Wrapping/Python/CMakeLists.txt
=====================================
@@ -1,7 +1,3 @@
-# Special CMake Module required when doing Python Testing
-if(BUILD_TESTING AND GDCM_WRAP_PYTHON)
- include(${GDCM_SOURCE_DIR}/CMake/UsePythonTest.cmake)
-endif()
# Try to rebuild wrapping a little more often:
include_regular_expression("^(gdcm).*$")
# TODO:
=====================================
Wrapping/Python/docstrings.i
=====================================
The diff for this file was not included because it is too large.
View it on GitLab: https://salsa.debian.org/med-team/gdcm/commit/0dcd02107c08e5a5bfc9ecee271f7ed4bdadb8d9
--
View it on GitLab: https://salsa.debian.org/med-team/gdcm/commit/0dcd02107c08e5a5bfc9ecee271f7ed4bdadb8d9
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/20191008/350549f3/attachment-0001.html>
More information about the debian-med-commit
mailing list