Beispiel #1
0
        /// <summary>
        /// Gets all overlays in a DICOM dataset.
        /// </summary>
        /// <param name="ds">Dataset</param>
        /// <returns>Array of overlays</returns>
        public static DcmOverlayData[] FromDataset(DcmDataset ds)
        {
            List <ushort> groups = new List <ushort>();

            foreach (DcmItem elem in ds.Elements)
            {
                if (elem.Tag.Element == 0x0010)
                {
                    if (elem.Tag.Group >= 0x6000 && elem.Tag.Group <= 0x60FF)
                    {
                        groups.Add(elem.Tag.Group);
                    }
                }
            }
            List <DcmOverlayData> overlays = new List <DcmOverlayData>();

            foreach (ushort group in groups)
            {
                DcmOverlayData overlay = new DcmOverlayData(ds, group);
                overlays.Add(overlay);
            }
            return(overlays.ToArray());
        }
Beispiel #2
0
		/// <summary>
		/// Gets all overlays in a DICOM dataset.
		/// </summary>
		/// <param name="ds">Dataset</param>
		/// <returns>Array of overlays</returns>
		public static DcmOverlayData[] FromDataset(DcmDataset ds) {
			List<ushort> groups = new List<ushort>();
			foreach (DcmItem elem in ds.Elements) {
				if (elem.Tag.Element == 0x0010) {
					if (elem.Tag.Group >= 0x6000 && elem.Tag.Group <= 0x60FF) {
						groups.Add(elem.Tag.Group);
					}
				}
			}
			List<DcmOverlayData> overlays = new List<DcmOverlayData>();
			foreach (ushort group in groups) {
				DcmOverlayData overlay = new DcmOverlayData(ds, group);
				overlays.Add(overlay);
			}
			return overlays.ToArray();
		}
Beispiel #3
0
 public static SingleBitPixelData Create(DcmOverlayData overlayData)
 {
     return new SingleBitPixelData(overlayData.Columns, overlayData.Rows, overlayData.Data);
 }