Exemple #1
0
        public static DicomTimeRangeValue[] GetTimeRange(DicomDataSet ds, long Tag)
        {
            // Get the date range count
            List <string> timeList = ds.GetValue <List <string> >(Tag, null);

            if (timeList == null)
            {
                return(null);
            }

            int count = timeList.Count;

            if (count <= 0)
            {
                return(null);
            }

            DicomTimeRangeValue[] d = new DicomTimeRangeValue[count];

            DicomElement element = ds.FindFirstElement(null, Tag, true);

            if (element != null)
            {
                if (element.Length > 0)
                {
                    for (int i = 0; i < count; i++)
                    {
                        d[i] = ds.GetTimeRangeValue(element, i);
                    }
                    return(d);
                }
            }

            return(null);
        }