What steps will reproduce the problem?
When changing the AcquisitionDateTime tag of a DICOM image using the modify REST API: requests.post( f’http://localhost:8042/instances/{instance_id}/modify’, json={“Replace”: {‘AcquisitionDateTime’: ‘20240404111848’}, “KeepSource”: False, “Force”: True}, auth=( “–”, “–”, ), ) the AcquisitionDateTime isn’t actually modified and stays the same as originally.
I understand changing the AcquisitionDateTime is unusual but images were taken using a ultrasound machine set with the wrong date time settings so I am trying to change the StudyDate, SeriesDate, ContentDate and AcquisitionDateTime to the correct date.
What is the expected output? What do you see instead?
I expect to find the new instances with the new AcquisitionDateTime.
What version of the product are you using? On what operating system?
Im using the orthanc:latest docker image on a linux machine.
Please provide sample, possibly anonymized, DICOM files
These are images from a GE Voluson E10 Ultrasound machine.
the /instances/.../modify route (at instance level, contrarily to /modify at other levels), actually does not modify the instance in place but downloads a modified version of the instance.
Until quite recently, Orthanc did not allow to modify series or studies while keeping their DICOM IDs unmodified because, in DICOM, as soon as you modify a resource, you are supposed to generate new DICOM IDs for traceability reason. This is still the default behavior in Orthanc.
With this default behavior in mind, when you modify a series in place, it actually generates a new series in the study with all instances containing consistent information.
If you modify a single instance of a series and generate a new SOPInstanceUID (which is the recommended way to work in DICOM), you end up with one duplicate instance in the middle of a series and that is getting very messy. That’s one of the reasons why we did not allow it.
I’ll mark this topic for discussion with Sebastien but don’t expect a new feature soon - this is July/August ;-).
Hm im not sure what the difference between a series and instance modification is. It sounds like the instance modification can be solved the same way you have solved the series modification.
I might indeed try to modify the route using a python plugin. Thank you for the idea. Let me know if you add a instance modification feature.