当前位置: 首页>>代码示例>>C#>>正文


C# DicomSequenceItem类代码示例

本文整理汇总了C#中DicomSequenceItem的典型用法代码示例。如果您正苦于以下问题:C# DicomSequenceItem类的具体用法?C# DicomSequenceItem怎么用?C# DicomSequenceItem使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


DicomSequenceItem类属于命名空间,在下文中一共展示了DicomSequenceItem类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AddTagNodes

		private void AddTagNodes(TreeNode parent, DicomSequenceItem record)
		{
			foreach (DicomAttribute attrib in record)
			{
				string name;
				if (attrib is DicomAttributeSQ || attrib is DicomAttributeOB || attrib is DicomAttributeOW || attrib is DicomAttributeOF)
					name = attrib.ToString();
				else
				{
					name = String.Format("{0}: {1}", attrib.Tag.ToString(), attrib.ToString());
				}
				TreeNode tagNode = new TreeNode(name);
				parent.Nodes.Add(tagNode);

				DicomAttributeSQ sqAttrib = attrib as DicomAttributeSQ;
				if (sqAttrib != null)
				{
					for (int i=0; i< sqAttrib.Count; i++)
					{
						TreeNode sqNode = new TreeNode("Sequence Item");
						tagNode.Nodes.Add(sqNode);
						AddTagNodes(sqNode, sqAttrib[i]);
					}
				}
			}
		}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:26,代码来源:DicomdirDisplay.cs

示例2: CreatePurposeOfReferenceCodeSequence

		/// <summary>
		/// Creates the PurposeOfReferenceCodeSequence in the underlying collection. Type 3.
		/// </summary>
		public CodeSequenceMacro CreatePurposeOfReferenceCodeSequence()
		{
			var dicomAttribute = DicomAttributeProvider[DicomTags.PurposeOfReferenceCodeSequence];
			if (dicomAttribute.IsNull || dicomAttribute.IsEmpty)
			{
				var dicomSequenceItem = new DicomSequenceItem();
				dicomAttribute.Values = new[] {dicomSequenceItem};
				var sequenceType = new CodeSequenceMacro(dicomSequenceItem);
				return sequenceType;
			}
			return new CodeSequenceMacro(((DicomSequenceItem[]) dicomAttribute.Values)[0]);
		}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:15,代码来源:SourceImageSequence.cs

示例3: CreateMaskSubtractionSequence

		/// <summary>
		/// Creates the MaskSubtractionSequence in the underlying collection. Type 3.
		/// </summary>
		public IMaskSubtractionSequence CreateMaskSubtractionSequence()
		{
			DicomAttribute dicomAttribute = base.DicomAttributeProvider[DicomTags.MaskSubtractionSequence];
			if (dicomAttribute.IsNull || dicomAttribute.Count == 0)
			{
				DicomSequenceItem dicomSequenceItem = new DicomSequenceItem();
				dicomAttribute.Values = new DicomSequenceItem[] {dicomSequenceItem};
				IMaskSubtractionSequence sequenceType = new MaskSubtractionSequenceItem(dicomSequenceItem);
				sequenceType.InitializeAttributes();
				return sequenceType;
			}
			return new MaskSubtractionSequenceItem(((DicomSequenceItem[]) dicomAttribute.Values)[0]);
		}
开发者ID:khaha2210,项目名称:radio,代码行数:16,代码来源:PresentationStateMask.cs

示例4: CreateMaskSubtractionSequence

		/// <summary>
		/// Creates the MaskSubtractionSequence in the underlying collection. Type 1C.
		/// </summary>
		public MaskSubtractionSequenceIod CreateMaskSubtractionSequence()
		{
			var dicomAttribute = DicomAttributeProvider[DicomTags.MaskSubtractionSequence];
			if (dicomAttribute.IsNull || dicomAttribute.IsEmpty)
			{
				var dicomSequenceItem = new DicomSequenceItem();
				dicomAttribute.Values = new[] {dicomSequenceItem};
				var sequenceType = new MaskSubtractionSequenceIod(dicomSequenceItem);
				sequenceType.InitializeAttributes();
				return sequenceType;
			}
			return new MaskSubtractionSequenceIod(((DicomSequenceItem[]) dicomAttribute.Values)[0]);
		}
开发者ID:kevinpig,项目名称:MyRepository,代码行数:16,代码来源:PresentationStateMask.cs

示例5: CreateReferencedSopSequence

		/// <summary>
		/// Creates the value of ReferencedSopSequence in the underlying collection. Type 1.
		/// </summary>
		public ISopInstanceReferenceMacro CreateReferencedSopSequence()
		{
			DicomAttribute dicomAttribute = base.DicomAttributeProvider[DicomTags.ReferencedSopSequence];
			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]);
		}
开发者ID:kevinpig,项目名称:MyRepository,代码行数:16,代码来源:CompositeObjectReferenceMacro.cs

示例6: TestSequenceImplicitVr2

		public void TestSequenceImplicitVr2()
		{
			var syntax = TransferSyntax.ImplicitVrLittleEndian;
			var sq = new DicomAttributeSQ(DicomTags.IconImageSequence);

			var item1 = new DicomSequenceItem();
			item1[DicomTags.AccessionNumber].SetStringValue("ABCDEFG");
			sq.AddSequenceItem(item1);

			var item2 = new DicomSequenceItem();
			item2[DicomTags.AccessionNumber].SetStringValue("XYZ");
			sq.AddSequenceItem(item2);

			// note: both sequence and item delimiter tags are calculated as part of the sequence - the item considers only the total length of its contents

			// item1_length = contents(16)
			Assert.AreEqual(16, item1[DicomTags.AccessionNumber].CalculateWriteLength(syntax, DicomWriteOptions.None), "Attr1 Length");
			Assert.AreEqual(16, item1.CalculateWriteLength(syntax, DicomWriteOptions.None), "Item1 Length");

			// item2_length = contents(12)
			Assert.AreEqual(12, item2[DicomTags.AccessionNumber].CalculateWriteLength(syntax, DicomWriteOptions.None), "Attr2 Length");
			Assert.AreEqual(12, item2.CalculateWriteLength(syntax, DicomWriteOptions.None), "Item2 Length");

			// sq_length = tag(4) + len(4) + item_tag(4) + item_len(4) + item1_length(16) + item_delimiter_tag(4) + item_delimiter_len(4)
			//                             + item_tag(4) + item_len(4) + item2_length(12) + item_delimiter_tag(4) + item_delimiter_len(4)
			//                             + sq_delimiter_tag(4) + sq_delimiter_len(4)
			var options = DicomWriteOptions.None;
			Assert.AreEqual(76, sq.CalculateWriteLength(syntax, options), "SQ Length (Options={0})", options);

			// sq_length = tag(4) + len(4) + item_tag(4) + item_len(4) + item1_length(16) + item_delimiter_tag(4) + item_delimiter_len(4)
			//                             + item_tag(4) + item_len(4) + item2_length(12) + item_delimiter_tag(4) + item_delimiter_len(4)
			options = DicomWriteOptions.ExplicitLengthSequence;
			Assert.AreEqual(68, sq.CalculateWriteLength(syntax, options), "SQ Length (Options={0})", options);

			// sq_length = tag(4) + len(4) + item_tag(4) + item_len(4) + item1_length(16)
			//                             + item_tag(4) + item_len(4) + item2_length(12)
			//                             + sq_delimiter_tag(4) + sq_delimiter_len(4)
			options = DicomWriteOptions.ExplicitLengthSequenceItem;
			Assert.AreEqual(60, sq.CalculateWriteLength(syntax, options), "SQ Length (Options={0})", options);

			// sq_length = tag(4) + len(4) + item_tag(4) + item_len(4) + item1_length(16)
			//                             + item_tag(4) + item_len(4) + item2_length(12)
			options = DicomWriteOptions.ExplicitLengthSequence | DicomWriteOptions.ExplicitLengthSequenceItem;
			Assert.AreEqual(52, sq.CalculateWriteLength(syntax, options), "SQ Length (Options={0})", options);
		}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:45,代码来源:SequenceTests.cs

示例7: GraphicAnnotationSequenceItem

		/// <summary>
		/// Initializes a new instance of the <see cref="GraphicAnnotationSequenceItem"/> class.
		/// </summary>
		/// <param name="dicomSequenceItem">The dicom sequence item.</param>
		public GraphicAnnotationSequenceItem(DicomSequenceItem dicomSequenceItem) : base(dicomSequenceItem) {}
开发者ID:nhannd,项目名称:Xian,代码行数:5,代码来源:GraphicAnnotationSequenceItem.cs

示例8: CreatePetFrameTypeSequence

		/// <summary>
		/// Creates the PetFrameTypeSequence in the underlying collection. Type 1.
		/// </summary>
		public PetFrameTypeSequenceItem CreatePetFrameTypeSequence()
		{
			var dicomAttribute = DicomAttributeProvider[DicomTags.PetFrameTypeSequence];
			if (dicomAttribute.IsNull || dicomAttribute.IsEmpty)
			{
				var dicomSequenceItem = new DicomSequenceItem();
				dicomAttribute.Values = new[] {dicomSequenceItem};
				var sequenceType = new PetFrameTypeSequenceItem(dicomSequenceItem);
				return sequenceType;
			}
			return new PetFrameTypeSequenceItem(((DicomSequenceItem[]) dicomAttribute.Values)[0]);
		}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:15,代码来源:PetFrameTypeFunctionalGroup.cs

示例9: PetFrameTypeSequenceItem

		/// <summary>
		/// Initializes a new instance of the <see cref="PetFrameTypeSequenceItem"/> class.
		/// </summary>
		/// <param name="dicomSequenceItem">The DICOM sequence item.</param>
		public PetFrameTypeSequenceItem(DicomSequenceItem dicomSequenceItem)
			: base(dicomSequenceItem) {}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:6,代码来源:PetFrameTypeFunctionalGroup.cs

示例10: ReferencedSopSequenceType

			/// <summary>
			/// Initializes a new instance of the <see cref="ReferencedSopSequence"/> class.
			/// </summary>
			/// <param name="dicomSequenceItem">The dicom sequence item.</param>
			public ReferencedSopSequenceType(DicomSequenceItem dicomSequenceItem) : base(dicomSequenceItem) {}
开发者ID:kevinpig,项目名称:MyRepository,代码行数:5,代码来源:HierarchicalSeriesInstanceReferenceMacro.cs

示例11: XRayCalibrationDeviceUsageFunctionalGroup

		/// <summary>
		/// Initializes a new instance of the <see cref="XRayCalibrationDeviceUsageFunctionalGroup"/> class.
		/// </summary>
		/// <param name="dicomSequenceItem">The DICOM sequence item.</param>
		public XRayCalibrationDeviceUsageFunctionalGroup(DicomSequenceItem dicomSequenceItem)
			: base(dicomSequenceItem) {}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:6,代码来源:XRayCalibrationDeviceUsageFunctionalGroup.cs

示例12: MakeVoiLutSequenceB

		private static void MakeVoiLutSequenceB(DicomAttributeCollection dataSet)
		{
			DicomAttribute sequence = dataSet[DicomTags.VoiLutSequence];
			DicomSequenceItem[] items = (DicomSequenceItem[])sequence.Values;
			DicomSequenceItem[] newItems = new DicomSequenceItem[items.Length - 1];
			newItems[0] = items[0];
			newItems[1] = items[2];
			sequence.Values = newItems;
		}
开发者ID:khaha2210,项目名称:radio,代码行数:9,代码来源:StudyXmlTests.cs

示例13: ReferencedSopInstanceMacSequence

		/// <summary>
		/// Initializes a new instance of the <see cref="ReferencedSopInstanceMacSequence"/> class.
		/// </summary>
		/// <param name="dicomSequenceItem">The dicom sequence item.</param>
		public ReferencedSopInstanceMacSequence(DicomSequenceItem dicomSequenceItem) : base(dicomSequenceItem) {}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:5,代码来源:ReferencedSopInstanceMacSequence.cs

示例14: MrDiffusionFunctionalGroup

		/// <summary>
		/// Initializes a new instance of the <see cref="MrDiffusionFunctionalGroup"/> class.
		/// </summary>
		/// <param name="dicomSequenceItem">The DICOM sequence item.</param>
		public MrDiffusionFunctionalGroup(DicomSequenceItem dicomSequenceItem)
			: base(dicomSequenceItem) {}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:6,代码来源:MrDiffusionFunctionalGroup.cs

示例15: MrDiffusionSequenceItem

		/// <summary>
		/// Initializes a new instance of the <see cref="MrDiffusionSequenceItem"/> class.
		/// </summary>
		/// <param name="dicomSequenceItem">The DICOM sequence item.</param>
		public MrDiffusionSequenceItem(DicomSequenceItem dicomSequenceItem)
			: base(dicomSequenceItem) {}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:6,代码来源:MrDiffusionFunctionalGroup.cs


注:本文中的DicomSequenceItem类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。