Bug 94 - a simple instance modification shall not modify FrameOfReferenceUID + ...
Summary: a simple instance modification shall not modify FrameOfReferenceUID + ...
Status: RESOLVED FIXED
Alias: None
Product: Orthanc
Classification: Unclassified
Component: Orthanc Core (show other bugs)
Version: unspecified
Hardware: All All
: --- normal
Assignee: Sébastien Jodogne
URL:
Depends on:
Blocks:
 
Reported: 2020-06-29 15:13 CEST by Sébastien Jodogne
Modified: 2020-06-29 15:21 CEST (History)
0 users

See Also:


Attachments
5b155037-bc5c-42f6-a3a5-510bc60524e2.dcm (58.31 KB, application/dicom)
2020-06-29 15:18 CEST, Sébastien Jodogne
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sébastien Jodogne 2020-06-29 15:13:56 CEST
[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
Comment 1 Sébastien Jodogne 2020-06-29 15:18:10 CEST
Created attachment 75 [details]
5b155037-bc5c-42f6-a3a5-510bc60524e2.dcm
Comment 2 Sébastien Jodogne 2020-06-29 15:21:51 CEST
[BitBucket user: Sébastien Jodogne]
[BitBucket date: 2018-07-12.10:55:54]

fix issue #94

→ https://hg.orthanc-server.com/orthanc/changeset/062776ab4a21