comparison OrthancServer/Plugins/Samples/AdvancedStorage/Plugin.cpp @ 5808:63c025cf6958 attach-custom-data

cleanup
author Alain Mazy <am@orthanc.team>
date Tue, 24 Sep 2024 12:11:25 +0200
parents 8279eaab0d1d
children a451777236fb
comparison
equal deleted inserted replaced
5807:8279eaab0d1d 5808:63c025cf6958
152 } 152 }
153 153
154 Json::Value customDataJson; 154 Json::Value customDataJson;
155 customDataJson["Version"] = 1; 155 customDataJson["Version"] = 1;
156 156
157 // no need to store the path since if we are in the default mode
157 if (namingScheme_ != "OrthancDefault") 158 if (namingScheme_ != "OrthancDefault")
158 { // no need to store the pathc since we are in the default mode 159 {
159 customDataJson["Path"] = path.string(); 160 customDataJson["Path"] = path.string();
160 } 161 }
161 162
162 if (multipleStoragesEnabled_) 163 if (multipleStoragesEnabled_)
163 { 164 {
164 customDataJson["StorageId"] = currentStorageId_; 165 customDataJson["StorageId"] = currentStorageId_;
165 } 166 }
166 167
167 return Orthanc::Toolbox::WriteFastJson(output, customDataJson); 168 return Orthanc::Toolbox::WriteFastJson(output, customDataJson);
168 } 169 }
169 170
170 void AddSplitDateDicomTagToPath(fs::path& path, const Json::Value& tags, const char* tagName, const char* defaultValue = NULL) 171 void AddSplitDateDicomTagToPath(fs::path& path, const Json::Value& tags, const char* tagName, const char* defaultValue = NULL)
171 { 172 {
172 if (tags.isMember(tagName) && tags[tagName].asString().size() == 8) 173 if (tags.isMember(tagName) && tags[tagName].asString().size() == 8)