当前位置: 首页>>代码示例>>C#>>正文


C# DicomDataset.Where方法代码示例

本文整理汇总了C#中DicomDataset.Where方法的典型用法代码示例。如果您正苦于以下问题:C# DicomDataset.Where方法的具体用法?C# DicomDataset.Where怎么用?C# DicomDataset.Where使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DicomDataset的用法示例。


在下文中一共展示了DicomDataset.Where方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RegenerateAll

		public void RegenerateAll(DicomDataset dataset) {
			foreach (var ui in dataset.Where(x => x.ValueRepresentation == DicomVR.UI).ToArray()) {
				dataset.Add(ui.Tag, Generate(dataset.Get<DicomUID>(ui.Tag)));
			}

			foreach (var sq in dataset.Where(x => x.ValueRepresentation == DicomVR.SQ).Cast<DicomSequence>().ToArray()) {
				foreach (var item in sq) {
					RegenerateAll(item);
				}
			}
		}
开发者ID:radyworks,项目名称:fo-dicom,代码行数:11,代码来源:DicomUIDGenerator.cs

示例2: RegenerateAll

		public void RegenerateAll(DicomDataset dataset) {
			foreach (var ui in dataset.Where(x => x.ValueRepresentation == DicomVR.UI).ToArray()) {
				var uid = dataset.Get<DicomUID>(ui.Tag);
				if (uid.Type == DicomUidType.SOPInstance || uid.Type == DicomUidType.Unknown)
					dataset.Add(ui.Tag, Generate(uid));
			}

			foreach (var sq in dataset.Where(x => x.ValueRepresentation == DicomVR.SQ).Cast<DicomSequence>().ToArray()) {
				foreach (var item in sq) {
					RegenerateAll(item);
				}
			}
		}
开发者ID:1danielcoelho,项目名称:FellowOakDicomTesting,代码行数:13,代码来源:DicomUIDGenerator.cs

示例3: FromDataset

		/// <summary>
		/// Gets all overlays in a DICOM dataset.
		/// </summary>
		/// <param name="ds">Dataset</param>
		/// <returns>Array of overlays</returns>
		public static DicomOverlayData[] FromDataset(DicomDataset ds) {
			var groups = new List<ushort>();
			groups.AddRange(ds.Where(x => x.Tag.Group >= 0x6000 && x.Tag.Group <= 0x60FF && x.Tag.Element == 0x0010).Select(x => x.Tag.Group));
			var overlays = new List<DicomOverlayData>();
			foreach (var group in groups) {
				// ensure that 6000 group is actually an overlay group
				if (ds.Get<DicomElement>(new DicomTag(group, 0x0010)).ValueRepresentation != DicomVR.US)
					continue;

				try {
					DicomOverlayData overlay = new DicomOverlayData(ds, group);
					overlays.Add(overlay);
				} catch {
					// bail out if not an overlay group
				}
			}
			return overlays.ToArray();
		}
开发者ID:vvboborykin,项目名称:DicomStorage,代码行数:23,代码来源:DicomOverlayData.cs

示例4: HasEmbeddedOverlays

        public static bool HasEmbeddedOverlays(DicomDataset ds)
        {
            var groups = new List<ushort>();
            groups.AddRange(
                ds.Where(x => x.Tag.Group >= 0x6000 && x.Tag.Group <= 0x60FF && x.Tag.Element == 0x0010)
                    .Select(x => x.Tag.Group));

            foreach (var group in groups)
            {
                if (!ds.Contains(new DicomTag(group, DicomTag.OverlayData.Element))) return true;
            }

            return false;
        }
开发者ID:GMZ,项目名称:fo-dicom,代码行数:14,代码来源:DicomOverlayData.cs

示例5: FromDataset

 /// <summary>
 /// Gets all overlays in a DICOM dataset.
 /// </summary>
 /// <param name="ds">Dataset</param>
 /// <returns>Array of overlays</returns>
 public static DicomOverlayData[] FromDataset(DicomDataset ds)
 {
     var groups = new List<ushort>();
     groups.AddRange(ds.Where(x => x.Tag.Group >= 0x6000 && x.Tag.Group <= 0x60FF && x.Tag.Element == 0x0010).Select(x => x.Tag.Group));
     var overlays = new List<DicomOverlayData>();
     foreach (var group in groups) {
         DicomOverlayData overlay = new DicomOverlayData(ds, group);
         overlays.Add(overlay);
     }
     return overlays.ToArray();
 }
开发者ID:jwake,项目名称:fo-dicom,代码行数:16,代码来源:DicomOverlayData.cs


注:本文中的DicomDataset.Where方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。