changeset 158:ca2dd8d1a73a

sync
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 14 Dec 2016 16:49:00 +0100
parents bcb6d8e0e089
children 5dc54316d68b
files Orthanc/Core/DicomFormat/DicomMap.h Orthanc/Core/DicomFormat/DicomTag.h Orthanc/Core/Enumerations.cpp Orthanc/Core/FileStorage/FilesystemStorage.h Orthanc/Core/OrthancException.h
diffstat 5 files changed, 13 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/Orthanc/Core/DicomFormat/DicomMap.h	Tue Nov 29 14:26:30 2016 +0100
+++ b/Orthanc/Core/DicomFormat/DicomMap.h	Wed Dec 14 16:49:00 2016 +0100
@@ -47,7 +47,7 @@
   private:
     friend class DicomArray;
     friend class FromDcmtkBridge;
-    friend class ToDcmtkBridge;
+    friend class ParsedDicomFile;
 
     typedef std::map<DicomTag, DicomValue*>  Map;
 
--- a/Orthanc/Core/DicomFormat/DicomTag.h	Tue Nov 29 14:26:30 2016 +0100
+++ b/Orthanc/Core/DicomFormat/DicomTag.h	Wed Dec 14 16:49:00 2016 +0100
@@ -100,6 +100,7 @@
   static const DicomTag DICOM_TAG_SERIES_INSTANCE_UID(0x0020, 0x000e);
   static const DicomTag DICOM_TAG_STUDY_INSTANCE_UID(0x0020, 0x000d);
   static const DicomTag DICOM_TAG_PIXEL_DATA(0x7fe0, 0x0010);
+  static const DicomTag DICOM_TAG_TRANSFER_SYNTAX_UID(0x0002, 0x0010);
 
   static const DicomTag DICOM_TAG_IMAGE_INDEX(0x0054, 0x1330);
   static const DicomTag DICOM_TAG_INSTANCE_NUMBER(0x0020, 0x0013);
@@ -127,6 +128,7 @@
   static const DicomTag DICOM_TAG_TEMPORAL_POSITION_IDENTIFIER(0x0020, 0x0100);
 
   // Tags for C-FIND and C-MOVE
+  static const DicomTag DICOM_TAG_MESSAGE_ID(0x0000, 0x0110);
   static const DicomTag DICOM_TAG_SPECIFIC_CHARACTER_SET(0x0008, 0x0005);
   static const DicomTag DICOM_TAG_QUERY_RETRIEVE_LEVEL(0x0008, 0x0052);
   static const DicomTag DICOM_TAG_MODALITIES_IN_STUDY(0x0008, 0x0061);
--- a/Orthanc/Core/Enumerations.cpp	Tue Nov 29 14:26:30 2016 +0100
+++ b/Orthanc/Core/Enumerations.cpp	Wed Dec 14 16:49:00 2016 +0100
@@ -1083,15 +1083,18 @@
   bool GetDicomEncoding(Encoding& encoding,
                         const char* specificCharacterSet)
   {
-    std::string s = specificCharacterSet;
+    std::string s = Toolbox::StripSpaces(specificCharacterSet);
     Toolbox::ToUpperCase(s);
 
     // http://dicom.nema.org/medical/dicom/current/output/html/part03.html#sect_C.12.1.1.2
     // https://github.com/dcm4che/dcm4che/blob/master/dcm4che-core/src/main/java/org/dcm4che3/data/SpecificCharacterSet.java
     if (s == "ISO_IR 6" ||
-        s == "ISO_IR 192" ||
         s == "ISO 2022 IR 6")
     {
+      encoding = Encoding_Ascii;
+    }
+    else if (s == "ISO_IR 192")
+    {
       encoding = Encoding_Utf8;
     }
     else if (s == "ISO_IR 100" ||
@@ -1238,8 +1241,10 @@
     // http://dicom.nema.org/medical/dicom/current/output/html/part03.html#sect_C.12.1.1.2
     switch (encoding)
     {
+      case Encoding_Ascii:
+        return "ISO_IR 6";
+
       case Encoding_Utf8:
-      case Encoding_Ascii:
         return "ISO_IR 192";
 
       case Encoding_Latin1:
--- a/Orthanc/Core/FileStorage/FilesystemStorage.h	Tue Nov 29 14:26:30 2016 +0100
+++ b/Orthanc/Core/FileStorage/FilesystemStorage.h	Wed Dec 14 16:49:00 2016 +0100
@@ -52,7 +52,7 @@
     boost::filesystem::path GetPath(const std::string& uuid) const;
 
   public:
-    FilesystemStorage(std::string root);
+    explicit FilesystemStorage(std::string root);
 
     virtual void Create(const std::string& uuid,
                         const void* content, 
--- a/Orthanc/Core/OrthancException.h	Tue Nov 29 14:26:30 2016 +0100
+++ b/Orthanc/Core/OrthancException.h	Wed Dec 14 16:49:00 2016 +0100
@@ -45,7 +45,7 @@
     HttpStatus httpStatus_;
 
   public:
-    OrthancException(ErrorCode errorCode) : 
+    explicit OrthancException(ErrorCode errorCode) : 
       errorCode_(errorCode),
       httpStatus_(ConvertErrorCodeToHttpStatus(errorCode))
     {