示例#1
0
        private List <Dictionary <string, object> > GetResponse(IQueryable <Instance> instanceQueryable, Dictionary <DicomTag, DicomTag> returnTags)
        {
            var resp = new List <Dictionary <string, object> >();

            foreach (var instance in instanceQueryable)
            {
                // Add all tags to the builder
                var builder = new DICOMJSONBuilder(instance.DicomFile);
                foreach (var tag in returnTags.Keys)
                {
                    builder.Add(tag.Group, tag.Element);
                }

                // Add calculated tags (those not in the DICOM file)
                builder.Add(0x0008, 0x1190, null); // retreieve URL - update once we support WADO-RS
                builder.Add(0x0008, 0x0056, "ONLINE");

                resp.Add(builder.GetAttributes());
            }
            return(resp);
        }
        private List <Dictionary <string, object> > GetResponse(IQueryable <Series> seriesQueryable, Dictionary <DicomTag, DicomTag> returnTags)
        {
            var resp = new List <Dictionary <string, object> >();

            foreach (var series in seriesQueryable)
            {
                // Add all tags to the builder
                var builder = new DICOMJSONBuilder(series.Instances.First().Value.DicomFile);
                foreach (var tag in returnTags.Keys)
                {
                    builder.Add(tag.Group, tag.Element);
                }

                // Add calculated tags (those not in the DICOM file)
                builder.Add(0x0008, 0x1190, null); // retreieve URL - update once we support WADO-RS
                builder.Add(0x0008, 0x0056, "ONLINE");
                builder.Add(0x0020, 0x1209, series.NumberOfSeriesRelatedInstances.ToString(CultureInfo.InvariantCulture));

                resp.Add(builder.GetAttributes());
            }
            return(resp);
        }