changeset 5147:19ccae2e0371

Fix issue #212 (Anonymization process transcodes data and loses resource link)
author Alain Mazy <am@osimis.io>
date Fri, 27 Jan 2023 11:49:28 +0100
parents 4a0dfa23d28c
children 2df546a76e17
files NEWS OrthancServer/Sources/ServerContext.cpp
diffstat 2 files changed, 2 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/NEWS	Fri Jan 27 11:25:56 2023 +0100
+++ b/NEWS	Fri Jan 27 11:49:28 2023 +0100
@@ -45,7 +45,7 @@
 -----------
 
 * Fix decoding of RLE images for which the "Planar Configuration" tag (0028,0006) equals 1
-
+* Fix issue #212 (Anonymization process transcodes data and loses resource link).
 
 version 1.11.2 (2022-08-30)
 ===========================
--- a/OrthancServer/Sources/ServerContext.cpp	Fri Jan 27 11:25:56 2023 +0100
+++ b/OrthancServer/Sources/ServerContext.cpp	Fri Jan 27 11:49:28 2023 +0100
@@ -819,11 +819,7 @@
 
           std::unique_ptr<DicomInstanceToStore> toStore(DicomInstanceToStore::CreateFromParsedDicomFile(*tmp));
           toStore->SetOrigin(dicom->GetOrigin());
-
-          if (isReconstruct) // the initial instance to store already has its own metadata
-          {
-            toStore->CopyMetadata(dicom->GetMetadata());
-          }
+          toStore->CopyMetadata(dicom->GetMetadata());
 
           StoreResult result = StoreAfterTranscoding(resultPublicId, *toStore, mode, isReconstruct);
           assert(resultPublicId == tmp->GetHasher().HashInstance());