简体   繁体   English

会员Oak Dicom(fo-dicom)DicomDateRange无法正常工作

[英]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#. 在C#中使用DicomDateRange参数时,我正在努力使C-Find与某些Dicom服务器配合使用。 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. 基本上,我使用下面显示的代码设法使其与(免费提供的)Conquest Server一起使用,但是连接到其他服务器时没有任何结果。 I mean, I got results when I DON'T use DicomDateRange, but not when I use it. 我的意思是,当我不使用DicomDateRange时获得了结果,但是当我不使用它时却没有。 Take for example the free public servers at http://www.dicomserver.co.uk/ and http://www.pixelmed.com/publicdicomserver.html . http://www.dicomserver.co.uk/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. 我找到了解决方案:问题出在“ 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: 因此,我要做的就是通过将行放在“ AddRequest”行之前的下面来擦除该标签,如下所示:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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