I have read this bug https://bitbucket.org/sjodogne/orthanc/issues/140/modifying-private-tags-with-rest-api, and I have exactly the same problem.
If I do
curl http://127.0.0.1:8042/instances/8fe8c4f5-ff601003-eca1ab0d-a25e7b9a-da7e7cfc/modify --data ‘{“Replace”:{“JsonITI”:“trues”,“0008-0018”:“9999.7152657385537453357441487784537592753” },“Force”:true}’ > hi.dcm
I get a dicom image but
and if I try
curl http://127.0.0.1:8042/instances/8fe8c4f5-ff601003-eca1ab0d-a25e7b9a-da7e7cfc/modify --data ‘{“Replace”:{“0019,1900”:“aaabbbccc”}, ”PrivateCreator”:”ITI”}’
I receive
{
“HttpError” : “Bad Request”,
“HttpStatus” : 400,
“Message” : “Bad file format”,
“Method” : “POST”,
“OrthancError” : “Bad file format”,
“OrthancStatus” : 15,
“Uri” : “/instances/8fe8c4f5-ff601003-eca1ab0d-a25e7b9a-da7e7cfc/modify”
}
On the other hand when i edit “0019,0019”
curl http://127.0.0.1:8042/instances/8fe8c4f5-ff601003-eca1ab0d-a25e7b9a-da7e7cfc/modify --data ‘{“Replace”:{“0019,0019”:“laodkasdikda”,“0008-0018”:“9999.7152657385537453357441487784537592753” },“Force”:true}’ > hi.dcm
but i allways get a trailing space with: “ITI” or “iti” or “iti”
curl http://127.0.0.1:8042/instances/8fe8c4f5-ff601003-eca1ab0d-a25e7b9a-da7e7cfc/modify --data ‘{“Replace”:{“0019,0019”:“iti”,“0008-0018”:“9999.7152657385537453357441487784537592753” },“Force”:true}’ > hi.dcm
So i do not know if i’m doing something wrong, or bug 140 is still there and i don’t know if this trailing space is because of dciodvfy or because of orthanc.
Thank you very much.