Mercurial > hg > orthanc
comparison OrthancServer/Sources/ServerToolbox.cpp @ 5224:feba2b0e91bc
Fix a crash in /tools/reconstruct triggered by the Housekeeper plugin when only changing the StorageCompression.
author | Alain Mazy <am@osimis.io> |
---|---|
date | Mon, 03 Apr 2023 22:19:42 +0200 |
parents | 0ea402b4d901 |
children | 72dfa0ac84eb |
comparison
equal
deleted
inserted
replaced
5223:a47b24f231d0 | 5224:feba2b0e91bc |
---|---|
279 InstanceMetadata instanceMetadata; | 279 InstanceMetadata instanceMetadata; |
280 | 280 |
281 std::string resultPublicId; // ignored | 281 std::string resultPublicId; // ignored |
282 std::unique_ptr<DicomInstanceToStore> dicomInstancetoStore(DicomInstanceToStore::CreateFromParsedDicomFile(locker.GetDicom())); | 282 std::unique_ptr<DicomInstanceToStore> dicomInstancetoStore(DicomInstanceToStore::CreateFromParsedDicomFile(locker.GetDicom())); |
283 | 283 |
284 context.GetIndex().GetAllMetadata(instanceMetadata, *it, ResourceType_Instance); | 284 // TODO: TranscodeAndStore and specifically ServerIndex::Store have been "poluted" by the isReconstruct parameter |
285 | 285 // we should very likely refactor it |
286 for (InstanceMetadata::const_iterator itm = instanceMetadata.begin(); | |
287 itm != instanceMetadata.end(); ++itm) | |
288 { | |
289 dicomInstancetoStore->AddMetadata(ResourceType_Instance, itm->first, itm->second); | |
290 } | |
291 | |
292 context.TranscodeAndStore(resultPublicId, dicomInstancetoStore.get(), StoreInstanceMode_OverwriteDuplicate, true); | 286 context.TranscodeAndStore(resultPublicId, dicomInstancetoStore.get(), StoreInstanceMode_OverwriteDuplicate, true); |
293 } | 287 } |
294 } | 288 } |
295 } | 289 } |
296 } | 290 } |