Пример #1
0
        /// <summary>
        /// Creates a single instance of a ReferencedStudySequence item. Does not modify the ReferencedStudySequence in the underlying collection.
        /// </summary>
        public ISopInstanceReferenceMacro CreateReferencedStudySequence()
        {
            ISopInstanceReferenceMacro iodBase = new SopInstanceReferenceMacro(new DicomSequenceItem());

            iodBase.InitializeAttributes();
            return(iodBase);
        }
Пример #2
0
            /// <summary>
            /// Creates the value of ReferencedRealWorldValueMappingInstanceSequence in the underlying collection. Type 3.
            /// </summary>
            public ISopInstanceReferenceMacro CreateReferencedRealWorldValueMappingInstanceSequence()
            {
                DicomAttribute dicomAttribute = base.DicomAttributeProvider[DicomTags.ReferencedRealWorldValueMappingInstanceSequence];

                if (dicomAttribute.IsNull || dicomAttribute.Count == 0)
                {
                    DicomSequenceItem dicomSequenceItem = new DicomSequenceItem();
                    dicomAttribute.Values = new DicomSequenceItem[] { dicomSequenceItem };
                    SopInstanceReferenceMacro iodBase = new SopInstanceReferenceMacro(dicomSequenceItem);
                    iodBase.InitializeAttributes();
                    return(iodBase);
                }
                return(new SopInstanceReferenceMacro(((DicomSequenceItem[])dicomAttribute.Values)[0]));
            }
Пример #3
0
		/// <summary>
		/// Creates the ReferencedPerformedProcedureStepSequence in the underlying collection. Type 1C.
		/// </summary>
		public ISopInstanceReferenceMacro CreateReferencedPerformedProcedureStepSequence()
		{
			var dicomAttribute = DicomAttributeProvider[DicomTags.ReferencedPerformedProcedureStepSequence];
			if (dicomAttribute.IsNull || dicomAttribute.IsEmpty)
			{
				var dicomSequenceItem = new DicomSequenceItem();
				dicomAttribute.Values = new[] {dicomSequenceItem};
				var sequenceType = new SopInstanceReferenceMacro(dicomSequenceItem);
				sequenceType.InitializeAttributes();
				return sequenceType;
			}
			return new SopInstanceReferenceMacro(((DicomSequenceItem[]) dicomAttribute.Values)[0]);
		}
Пример #4
0
		/// <summary>
		/// Creates the ReferencedPatientSequence in the underlying collection. Type 3.
		/// </summary>
		public ISopInstanceReferenceMacro CreateReferencedPatientSequence()
		{
			DicomAttribute dicomAttribute = base.DicomAttributeProvider[DicomTags.ReferencedPatientSequence];
			if (dicomAttribute.IsNull || dicomAttribute.Count == 0)
			{
				DicomSequenceItem dicomSequenceItem = new DicomSequenceItem();
				dicomAttribute.Values = new DicomSequenceItem[] {dicomSequenceItem};
				ISopInstanceReferenceMacro sequenceType = new SopInstanceReferenceMacro(dicomSequenceItem);
				sequenceType.InitializeAttributes();
				return sequenceType;
			}
			return new SopInstanceReferenceMacro(((DicomSequenceItem[]) dicomAttribute.Values)[0]);
		}
Пример #5
0
		/// <summary>
		/// Creates a single instance of a ReferencedStudySequence item. Does not modify the ReferencedStudySequence in the underlying collection.
		/// </summary>
		public ISopInstanceReferenceMacro CreateReferencedStudySequence()
		{
			ISopInstanceReferenceMacro iodBase = new SopInstanceReferenceMacro(new DicomSequenceItem());
			iodBase.InitializeAttributes();
			return iodBase;
		}
Пример #6
0
		/// <summary>
		/// Creates the ReferencedPerformedProcedureStepSequence in the underlying collection.
		/// </summary>
		public ISopInstanceReferenceMacro CreateReferencedPerformedProcedureStepSequence()
		{
			DicomAttribute referencedPerformedProcedureStepSequence = base.DicomAttributeProvider[DicomTags.ReferencedPerformedProcedureStepSequence];
			if (referencedPerformedProcedureStepSequence.IsNull || referencedPerformedProcedureStepSequence.Count == 0)
			{
				DicomSequenceItem dicomSequenceItem = new DicomSequenceItem();
				referencedPerformedProcedureStepSequence.Values = new DicomSequenceItem[] {dicomSequenceItem};
				SopInstanceReferenceMacro sopInstanceReference = new SopInstanceReferenceMacro(dicomSequenceItem);
				sopInstanceReference.InitializeAttributes();
				return sopInstanceReference;
			}
			return new SopInstanceReferenceMacro(((DicomSequenceItem[]) referencedPerformedProcedureStepSequence.Values)[0]);
		}
Пример #7
0
		/// <summary>
		/// Creates a single instance of a SourceInstanceSequence item. Does not modify the SourceInstanceSequence in the underlying collection.
		/// </summary>
		public ISopInstanceReferenceMacro CreateSourceInstanceSequence()
		{
			var iodBase = new SopInstanceReferenceMacro(new DicomSequenceItem());
			iodBase.InitializeAttributes();
			return iodBase;
		}
Пример #8
0
			/// <summary>
			/// Creates the value of ReferencedRealWorldValueMappingInstanceSequence in the underlying collection. Type 3.
			/// </summary>
			public ISopInstanceReferenceMacro CreateReferencedRealWorldValueMappingInstanceSequence()
			{
				DicomAttribute dicomAttribute = base.DicomAttributeProvider[DicomTags.ReferencedRealWorldValueMappingInstanceSequence];
				if (dicomAttribute.IsNull || dicomAttribute.Count == 0)
				{
					DicomSequenceItem dicomSequenceItem = new DicomSequenceItem();
					dicomAttribute.Values = new DicomSequenceItem[] {dicomSequenceItem};
					SopInstanceReferenceMacro iodBase = new SopInstanceReferenceMacro(dicomSequenceItem);
					iodBase.InitializeAttributes();
					return iodBase;
				}
				return new SopInstanceReferenceMacro(((DicomSequenceItem[]) dicomAttribute.Values)[0]);
			}