在PACS中,我们存储DICOM,JPEG和PDF文件。我可以使用fo-dicom库毫无问题地下载DICOM图像,但不能下载PDF和JPEG文件。
我想按照Amit Joshi的观点通过HTTP / FTP / FileSystem下载JPEG和PDF文件。为此,我在Cfind请求中添加了DicomTag“ RetrieveURL”,但是响应的数据集没有这个DicomTag,因此属于异常。我不知道获取此DicomTag数据的正确方法是什么。
我正在使用fo-dicom库,而pacs服务器是dcm4chee。
代码:
var studyUID = studyUids[0];
request = CreateSeriesRequestByStudyUID(studyUID);
var serieUids = new List<string>();
var serieRetrieveURLs = new List<string>();
request.OnResponseReceived += (req, response) =>
{
// DebugSerieResponse(response);
serieUids.Add(response.Dataset?.GetSingleValue<string>(DicomTag.SeriesInstanceUID));
serieRetrieveURLs.Add(response.Dataset?.GetSingleValue<string>(DicomTag.RetrieveURL));
};
client.AddRequest(request);
client.SendAsync(QRSer`enter code here`verHost, QRServerPort, false, AET, QRServerAET).Wait();
public DicomCFindRequest CreateSeriesRequestByStudyUID(string studyInstanceUID)
{
// there is a built in function to create a Study-level CFind request very easily:
// return DicomCFindRequest.CreateSeriesQuery(studyInstanceUID);
// but consider to create your own request that contains exactly those DicomTags that
// you realy need pro process your data and not to cause unneccessary traffic and IO load:
var request = new DicomCFindRequest(DicomQueryRetrieveLevel.Series);
request.Dataset.AddOrUpdate(new DicomTag(0x8, 0x5), "ISO_IR 100");
// add the dicom tags with empty values that should be included in the result
request.Dataset.AddOrUpdate(DicomTag.SeriesInstanceUID, "");
request.Dataset.AddOrUpdate(DicomTag.SeriesDescription, "");
request.Dataset.AddOrUpdate(DicomTag.RetrieveURL, "");
request.Dataset.AddOrUpdate(DicomTag.Modality, "");
request.Dataset.AddOrUpdate(DicomTag.NumberOfSeriesRelatedInstances, "");
// add the dicom tags that contain the filter criterias
request.Dataset.AddOrUpdate(DicomTag.StudyInstanceUID, studyInstanceUID);
return request;
}
尽管在请求中包含DicomTag“ RetrieveURL”时仍执行了该请求,但它却变成了异常,如图所示:
非常感谢。