コード例 #1
0
 public virtual HttpResponseMessage SearchForSeries(IQidoRequestModel request)
 {
     return(SearchForDicomEntity(request,
                                 DefaultDicomQueryElements.GetDefaultSeriesQuery( ),
                                 delegate
                                 (
                                     IObjectArchieveQueryService queryService,
                                     DicomDataset dicomRequest,
                                     IQidoRequestModel qidoResult
                                 )
     {
         return queryService.FindSeriesPaged(dicomRequest, GetQueryOptions(qidoResult));
     }));
 }
コード例 #2
0
 public HttpResponseMessage SearchForInstances(IQidoRequestModel request)
 {
     return(SearchForDicomEntity(request,
                                 DefaultDicomQueryElements.GetDefaultInstanceQuery( ),
                                 delegate
                                 (
                                     IObjectArchieveQueryService queryService,
                                     fo.DicomDataset dicomRequest,
                                     IQidoRequestModel qidoResult
                                 )
     {
         return queryService.FindObjectInstances(dicomRequest, GetQueryOptions(qidoResult));
     }));
 }
コード例 #3
0
        public HttpResponseMessage SearchForStudies
        (
            IQidoRequestModel request
        )
        {
            return(SearchForDicomEntity(request,
                                        DefaultDicomQueryElements.GetDefaultStudyQuery(),
                                        delegate
                                        (
                                            IObjectArchieveQueryService queryService,
                                            fo.DicomDataset dicomRequest,
                                            IQidoRequestModel qidoRequest
                                        )
            {
                IQueryOptions queryOptions = GetQueryOptions(qidoRequest);

                return queryService.FindStudies(dicomRequest, queryOptions);
            }));
        }
コード例 #4
0
        private void AddPreviewInstanceHeader(IEnumerable <DicomDataset> results, HttpResponseMessage response)
        {
            response.Headers.Add("Access-Control-Expose-Headers", Instance_Header_Name);

            foreach (var result in results)
            {
                var    queryDs      = DefaultDicomQueryElements.GetDefaultInstanceQuery();
                string studyUid     = result.Get <string> (DicomTag.StudyInstanceUID, "");
                string seriesUid    = result.Get <string> (DicomTag.SeriesInstanceUID, "");
                var    queryOptions = CreateNewQueryOptions( );

                queryDs.AddOrUpdate(DicomTag.StudyInstanceUID, studyUid);
                queryDs.AddOrUpdate(DicomTag.SeriesInstanceUID, seriesUid);
                queryOptions.Limit  = 1;
                queryOptions.Offset = 0;

                var    instances = QueryService.FindObjectInstances(queryDs, queryOptions);
                string queryStudyUid = null, querySeriesUid = null, queryInstanceUid = null;

                foreach (var instance in instances)
                {
                    queryStudyUid    = instance.Get <string> (DicomTag.StudyInstanceUID, "");
                    querySeriesUid   = instance.Get <string> (DicomTag.SeriesInstanceUID, "");
                    queryInstanceUid = instance.Get <string> (DicomTag.SOPInstanceUID, "");

                    break;
                }

                if (string.IsNullOrWhiteSpace(queryStudyUid) || string.IsNullOrWhiteSpace(querySeriesUid) || string.IsNullOrWhiteSpace(queryInstanceUid))
                {
                    response.Headers.Add(Instance_Header_Name, "");
                }
                else
                {
                    response.Headers.Add(Instance_Header_Name, string.Format("{0}:{1}:{2}", queryStudyUid, querySeriesUid, queryInstanceUid));
                }
            }
        }