comparison OrthancFramework/Sources/DicomFormat/DicomValue.h @ 5044:6fed78e13233

Refactored DicomMap to handle sequences when needed
author Alain Mazy <am@osimis.io>
date Tue, 28 Jun 2022 17:45:09 +0200
parents 43e613a7756b
children ea9e2680da6f
comparison
equal deleted inserted replaced
5043:ec5c203a97ea 5044:6fed78e13233
41 private: 41 private:
42 enum Type 42 enum Type
43 { 43 {
44 Type_Null, 44 Type_Null,
45 Type_String, 45 Type_String,
46 Type_Binary 46 Type_Binary,
47 Type_SequenceAsJson
47 }; 48 };
48 49
49 Type type_; 50 Type type_;
50 std::string content_; 51 std::string content_;
52 Json::Value sequenceJson_;
51 53
52 DicomValue(const DicomValue& other); 54 DicomValue(const DicomValue& other);
53 55
54 public: 56 public:
55 DicomValue(); 57 DicomValue();
59 61
60 DicomValue(const char* data, 62 DicomValue(const char* data,
61 size_t size, 63 size_t size,
62 bool isBinary); 64 bool isBinary);
63 65
66 DicomValue(const Json::Value& value);
67
64 const std::string& GetContent() const; 68 const std::string& GetContent() const;
69
70 const Json::Value& GetSequenceContent() const;
65 71
66 bool IsNull() const; 72 bool IsNull() const;
67 73
68 bool IsBinary() const; 74 bool IsBinary() const;
75
76 bool IsString() const;
77
78 bool IsSequence() const;
69 79
70 DicomValue* Clone() const; 80 DicomValue* Clone() const;
71 81
72 #if ORTHANC_ENABLE_BASE64 == 1 82 #if ORTHANC_ENABLE_BASE64 == 1
73 void FormatDataUriScheme(std::string& target, 83 void FormatDataUriScheme(std::string& target,