Issue94

Title a simple instance modification shall not modify FrameOfReferenceUID + ...
Priority bug Status resolved
Superseder Nosy List admin
Assigned To
Keywords Orthanc Core

Created on 2018-06-29.14:51:13 by admin, last changed by admin.

Files
File name Uploaded Type Edit Remove
5b155037-bc5c-42f6-a3a5-510bc60524e2.dcm admin, 2020-06-29.15:18:10 application/dicom
Messages
msg427 (view) Author: admin Date: 2018-06-29.14:51:13
[BitBucket user: Alain Mazy]
[BitBucket date: 2018-06-29.12:51:13]

perform a simple /instances/../modify request with this payload:
```
curl -X POST http://localhost:8042/instances/e294c1b9-64b50db6-4b600ea8-c41de8a4-b7767de5/modify -d '{"Replace" : {"PatientID" : "toto"}, "Force": true}' > modified.dcm
dcmdump modified.dcm | grep "FrameOfReference"

curl -X GET http://localhost:8042/instances/e294c1b9-64b50db6-4b600ea8-c41de8a4-b7767de5/file > original.dcm
dcmdump original.dcm | grep "FrameOfReference"

```

The FrameOfReferenceUID has changed in the modified instance.


Actually, the RelationshipsVisitor is applied and, since the FrameOfReferenceUID is not mentioned in any of the Keep, Remove and Replace, it is "Enabled" and therefore modified.

```
    bool IsEnabled(const DicomTag& tag) const
    {
      return (!that_.IsCleared(tag) &&
              !that_.IsRemoved(tag) &&
              !that_.IsReplaced(tag));
    }
```

When performing simple modification (that is not an Anonymization), we shall probably just not apply the RelationshipVisitor
msg428 (view) Author: admin Date: 2020-06-29.15:18:10
[Bugzilla user: s.jodogne@gmail.com]
[Bugzilla date: 2020-06-29T13:18:10+00:00]

Created attachment 75
5b155037-bc5c-42f6-a3a5-510bc60524e2.dcm
msg429 (view) Author: admin Date: 2018-07-12.12:55:54
[BitBucket user: Sébastien Jodogne]
[BitBucket date: 2018-07-12.10:55:54]

fix issue #94

→ https://hg.orthanc-server.com/orthanc/changeset/062776ab4a21
History
Date User Action Args
2026-07-29 15:51:22admincreate