private static void FillItemArray(List <DPath> list, DElementList eleList, string sqRootPath, int sqIndex) { foreach (DElement ele in eleList) { DicomTag tag = ele.DicomTag; DPath path = DPath.GetDPath(tag, ele.getVR(), "", sqRootPath, sqIndex); path.Enable = (ele.Type != DValueType.Type3 && ele.Type != DValueType.Unknown); path.Catagory = ele.Catagory; list.Add(path); if (ele.VR == DVR.SQ) { int index = -1; foreach (DElementList subList in ele.Sequence) { index++; DPath pathBegin = DPath.GetItemGroupPathBegin(index); DPath pathEnd = DPath.GetItemGroupPathEnd(index); list.Add(pathBegin); FillItemArray(list, subList, path.Path, index); list.Add(pathEnd); } } } }
public void SaveSetting(DPath path, DPath sqPath) { if (path == null) { return; } string strPath = (sqPath == null) ? "" : sqPath.Path; int index = (sqPath == null) ? -1 : 0; string description = this._comboxBoxTag.Text; int tag = GetTag(); DicomTag dicomTag = DHelper.Int2DicomTag(tag); DPath p = DPath.GetDPath(dicomTag, GetVR(), description, strPath, index); path.Description = p.Description; path.Path = p.Path; path.VR = p.VR; }