Esempio n. 1
0
        public static DPath GetDPath(DicomTag tag, DVR vr, string description, string sqRootPath, int sqIndex)
        {
            string strG = DHelper.Int2HexString(tag.Group);
            string strE = DHelper.Int2HexString(tag.Element);
            //string name = DHelper.GetTagName((uint)ele.Tag);

            // for shorten the DPath string length 20071010
            string name = "A";

            StringBuilder sb = new StringBuilder();

            if (sqRootPath != null && sqIndex >= 0)
            {
                sb.Append(sqRootPath).Append(Seperator).Append(sqIndex.ToString()).Append(Seperator);
            }
            sb.Append(strG).Append(Seperator).Append(strE).Append(Seperator).Append(name).Append(Seperator);
            string str = sb.ToString();

            DPath dpath = new DPath();

            dpath.Path        = str.TrimEnd(Seperator);
            dpath.Description = description;
            dpath.VR          = vr;
            return(dpath);
        }
Esempio n. 2
0
        public static DPath GetItemGroupPathEnd(int itemIndex)
        {
            DPath p = new DPath();

            SetItemGroupPathEnd(p, itemIndex);
            return(p);
        }
Esempio n. 3
0
 public static void SetItemGroupPathEnd(DPath p, int itemIndex)
 {
     if (p == null)
     {
         return;
     }
     p.Type = DPathType.EndItem;
     p.Path = "End Item " + itemIndex.ToString();
 }
Esempio n. 4
0
        public DPath Clone()
        {
            DPath path = new DPath();

            path.Enable = Enable;
            path.Range  = Range;
            path.Type   = Type;
            path.Path   = Path;
            path.VR     = VR;
            return(path);
        }