I am using a DicomDataSet to add tags and their values as below following:
....
var ds = new DicomDataSet();
ds.Initialize(DicomClassType.StudyRootQueryStudy, DicomDataSetInitializeFlags.None);
ds.InsertElementAndSetValue(DicomTag.QueryRetrieveLevel, "STUDY");
ds.InsertElementAndSetValue(DicomTag.SpecificCharacterSet, "ISO_IR192");
ds.InsertElementAndSetValue(DicomTag.RetrieveURL, "http://localhost/Service/api/wado-rs/studies/" + row.StudyInstanceUID);
....
when I make json per ds I don't see value for 00081190 like json in this link.
making json file snipped code:
string jsonFileNameOut = Path.Combine(@"C:\Study", $"{DateTime.Now.Ticks}.json");
// Save as JSON with no binary data
// For the demo, keep the json output file size small by skipping the pixel data
const DicomDataSetSaveJsonFlags jsonFlags = DicomDataSetSaveJsonFlags.IgnoreBinaryData |
DicomDataSetSaveJsonFlags.TrimWhiteSpace;
ds.SaveJson(jsonFileNameOut, jsonFlags);
why vrvalue representation for RetrieveUrl(81190) tag is UN(unknown), the output is something like below:
[{
"00080005" : {
"vr" : "CS",
"Value" : [
"ISO_IR 192"
]
},
"00080052" : {
"vr" : "CS",
"Value" : [
"STUDY"
]
},
"00081190" : {
"vr" : "UN"
}
}]
I finally got the solution after reading many articles I decide post the solution here for those that don't know this like me.
So in DICOM protocol there are some private tags that
vr(Value Representation) for them isUNby default after parsing tojsonorxmlso they won't present in out put.So we should make private tag to public and set
vrmanually for them like what I do below:the problem resolved by
InsertElementandSetStringValue.