private void FillSequenceFromElementRef(DicomDataset rootEleList) { try { DicomVR vr = _element.ValueRepresentation; if (vr == DicomVR.SQ) { Sequence = new DSequence(this); DicomSequence sequence = _element as DicomSequence; for (int i = 0; i < sequence.Items.Count; i++) { DicomDataset list = sequence.Items[i]; DElementList dlist = new DElementList(list, rootEleList); Sequence._add(dlist); } } } catch (Exception err) { DElement errEle = new DElement(_tag, _vr); LogMgt.Logger.Write(err.ToString()); } }
private DicomItem CreateEmptyElement(DicomTag tag, DicomVR vr) { if (vr == DicomVR.SQ) { Sequence = new DSequence(this); } if (vr == DicomVR.AE) { return(new DicomApplicationEntity(tag, EmptyBuffer.Value)); } else if (vr == DicomVR.AS) { return(new DicomAgeString(tag, EmptyBuffer.Value)); } else if (vr == DicomVR.AT) { return(new DicomAttributeTag(tag, EmptyBuffer.Value)); } else if (vr == DicomVR.CS) { return(new DicomCodeString(tag, EmptyBuffer.Value)); } else if (vr == DicomVR.DA) { return(new DicomDate(tag, EmptyBuffer.Value)); } else if (vr == DicomVR.DS) { return(new DicomDecimalString(tag, EmptyBuffer.Value)); } else if (vr == DicomVR.DT) { return(new DicomDateTime(tag, EmptyBuffer.Value)); } else if (vr == DicomVR.FD) { return(new DicomFloatingPointDouble(tag, EmptyBuffer.Value)); } else if (vr == DicomVR.FL) { return(new DicomFloatingPointSingle(tag, EmptyBuffer.Value)); } else if (vr == DicomVR.IS) { return(new DicomIntegerString(tag, EmptyBuffer.Value)); } else if (vr == DicomVR.LO) { return(new DicomLongString(tag, DicomEncoding.Default, EmptyBuffer.Value)); } else if (vr == DicomVR.LT) { return(new DicomLongText(tag, DicomEncoding.Default, EmptyBuffer.Value)); } else if (vr == DicomVR.OB) { return(new DicomOtherByte(tag, EmptyBuffer.Value)); } else if (vr == DicomVR.OD) { return(new DicomOtherDouble(tag, EmptyBuffer.Value)); } else if (vr == DicomVR.OF) { return(new DicomOtherFloat(tag, EmptyBuffer.Value)); } else if (vr == DicomVR.OW) { return(new DicomOtherWord(tag, EmptyBuffer.Value)); } else if (vr == DicomVR.PN) { return(new DicomPersonName(tag, DicomEncoding.Default, EmptyBuffer.Value)); } else if (vr == DicomVR.SH) { return(new DicomShortString(tag, DicomEncoding.Default, EmptyBuffer.Value)); } else if (vr == DicomVR.SL) { return(new DicomSignedLong(tag, EmptyBuffer.Value)); } else if (vr == DicomVR.SQ) { return(new DicomSequence(tag)); } else if (vr == DicomVR.SS) { return(new DicomSignedShort(tag, EmptyBuffer.Value)); } else if (vr == DicomVR.ST) { return(new DicomShortText(tag, DicomEncoding.Default, EmptyBuffer.Value)); } else if (vr == DicomVR.TM) { return(new DicomTime(tag, EmptyBuffer.Value)); } else if (vr == DicomVR.UC) { return(new DicomUnlimitedCharacters(tag, DicomEncoding.Default, EmptyBuffer.Value)); } else if (vr == DicomVR.UI) { return(new DicomUniqueIdentifier(tag, EmptyBuffer.Value)); } else if (vr == DicomVR.UL) { return(new DicomUnsignedLong(tag, EmptyBuffer.Value)); } else if (vr == DicomVR.UN) { return(new DicomUnknown(tag, EmptyBuffer.Value)); } else if (vr == DicomVR.UR) { return(new DicomUniversalResource(tag, DicomEncoding.Default, EmptyBuffer.Value)); } else if (vr == DicomVR.US) { return(new DicomUnsignedShort(tag, EmptyBuffer.Value)); } else if (vr == DicomVR.UT) { return(new DicomUnlimitedText(tag, DicomEncoding.Default, EmptyBuffer.Value)); } return(null); }