简体   繁体   中英

Fellow Oak Dicom (fo-dicom) DicomDateRange not working properly

I'm struggling to make C-Find work with some Dicom servers when using the DicomDateRange parameter in C#. Basically I managed to make it work with the (freely available) Conquest Server using the code shown below, but I got no results when connecting to other servers. I mean, I got results when I DON'T use DicomDateRange, but not when I use it. Take for example the free public servers at http://www.dicomserver.co.uk/ and http://www.pixelmed.com/publicdicomserver.html . It just doesn't work. What am I doing wrong? The code used is as follows (I already tried a lot of variations of it, and none worked as expected):

var cfind = DicomCFindRequest.CreateStudyQuery(studyDateTime: new DicomDateRange(new DateTime(1990, 4, 20, 00,00,01), new DateTime(2016, 4, 21,23,59,00)))

I found the solution: the problem was in the "StudyTime" DicomTag. So all I had to do was to erase that tag by placing the line below just before the "AddRequest" line, as follows:

cfind.Dataset.Add(DicomTag.StudyTime, ""); // erases the tag 'StudyTime'
client.AddRequest(cfind);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM