• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Dicom.DicomTag类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: DatabaseQueryTransformRule

 public DatabaseQueryTransformRule(string connectionString, DatabaseType dbType, string query, DicomTag[] outputTags, DicomTag[] paramTags) {
     _connectionString = connectionString;
     _dbType = dbType;
     _query = query;
     _output = new List<DicomTag>(outputTags);
     _params = new List<DicomTag>(paramTags);
 }
开发者ID:ZeryZhang,项目名称:fo-dicom,代码行数:7,代码来源:DatabaseQueryTransformRule.cs


示例2: GetDateTime

        /// <summary>
        /// Get a composite <see cref="DateTime"/> instance based on <paramref name="date"/> and <paramref name="time"/> values.
        /// </summary>
        /// <param name="dataset">Dataset from which data should be retrieved.</param>
        /// <param name="date">Tag associated with date value.</param>
        /// <param name="time">Tag associated with time value.</param>
        /// <returns>Composite <see cref="DateTime"/>.</returns>
        public static DateTime GetDateTime(this DicomDataset dataset, DicomTag date, DicomTag time)
        {
            var dd = dataset.Contains(date) ? dataset.Get<DicomDate>(date) : null;
            var dt = dataset.Contains(time) ? dataset.Get<DicomTime>(time) : null;

            var da = dd != null && dd.Count > 0 ? dd.Get<DateTime>(0) : DateTime.MinValue;
            var tm = dt != null && dt.Count > 0 ? dt.Get<DateTime>(0) : DateTime.MinValue;

            return new DateTime(da.Year, da.Month, da.Day, tm.Hour, tm.Minute, tm.Second);
        }
开发者ID:aerik,项目名称:fo-dicom,代码行数:17,代码来源:DicomDatasetExtensions.cs


示例3: AddTagAndReadOut

    public void AddTagAndReadOut()
    {
      var dict = new DicomDictionary();

      var tag = new DicomTag(0x0010, 0x0020);
      var dictEntry = new DicomDictionaryEntry(tag, "TestTagName", "TestTagKeyword", DicomVM.VM_1, false, DicomVR.DT);

      dict.Add(dictEntry);

      Assert.Equal(dictEntry, dict[tag]);
    }
开发者ID:raysearchlabs,项目名称:fo-dicom,代码行数:11,代码来源:DicomDictionaryTest.cs


示例4: Add_MultiVMStringTags_YieldsMultipleValues

        public void Add_MultiVMStringTags_YieldsMultipleValues(DicomTag tag, string[] values, Type expectedType)
        {
            var dataset = new DicomDataset();
            dataset.Add(tag, values);

            Assert.IsType(expectedType, dataset.First(item => item.Tag.Equals(tag)));

            var data = dataset.Get<string[]>(tag);
            Assert.Equal(values.Length, data.Length);
            Assert.Equal(values.Last(), data.Last());
        }
开发者ID:GMZ,项目名称:fo-dicom,代码行数:11,代码来源:DicomDatasetTest.cs


示例5: tryGetImageDateTime

 private static bool tryGetImageDateTime(DicomTag dateTag, DicomTag timeTag, DicomDataset dataset, 
         ref DateTime imageDate, ref DateTime imageTime)
 {
     var dateValue = dataset.Get<DateTime>(dateTag);
     var result = dateValue > DateTime.MinValue;
     if (result)
     {
         imageDate = dateValue;
         imageTime = dataset.Get<DateTime>(timeTag);
     }
     return result;
 }
开发者ID:vvboborykin,项目名称:DicomStorage,代码行数:12,代码来源:Extentions.cs


示例6: GetCorrectedString

 public static string GetCorrectedString(this DicomDataset dataset, ServerOptions serverOptions, DicomTag dicomTag)
 {
     var result = dataset.Get<string>(dicomTag);
     if (serverOptions.Codepage > 0)
     {
         var dicomItem = dataset.FirstOrDefault(x => x.Tag == dicomTag);
         var bytes = ((DicomElement)dicomItem).Buffer.Data;
         result = Encoding.GetEncoding(serverOptions.Codepage).GetString(bytes);
         result = result.Replace('^', ' ');
     }
     return result;
 }
开发者ID:vvboborykin,项目名称:DicomStorage,代码行数:12,代码来源:Extentions.cs


示例7: ToJsonStringTest

 public void ToJsonStringTest()
 {
     const ushort @group = 0x7FE0;
     const ushort element = 0x00FF;
     var target = new DicomTag(group, element);
     const string format = "J";
     IFormatProvider formatProvider = null;
     const string expected = "7FE000FF";
     string actual = string.Empty;
     actual = target.ToString(format, formatProvider);
     Assert.Equal(expected, actual);
 }
开发者ID:1danielcoelho,项目名称:FellowOakDicomTesting,代码行数:12,代码来源:DicomTagTest.cs


示例8: GetDateTime

        public static DateTime GetDateTime(this DicomDataset dataset, DicomTag date, DicomTag time)
        {
            DicomDate dd = dataset.Get<DicomDate>(date);
            DicomTime dt = dataset.Get<DicomTime>(time);

            DateTime da = DateTime.Today;
            if (dd != null && dd.Count > 0) da = dd.Get<DateTime>(0);

            DateTime tm = DateTime.Today;
            if (dt != null && dt.Count > 0) tm = dt.Get<DateTime>(0);

            return new DateTime(da.Year, da.Month, da.Day, tm.Hour, tm.Minute, tm.Second);
        }
开发者ID:GMZ,项目名称:fo-dicom,代码行数:13,代码来源:DicomDatasetExtensions.cs


示例9: DicomDictionaryEntry

		public DicomDictionaryEntry(DicomTag tag, string name, string keyword, DicomVM vm, bool retired, params DicomVR[] vrs) {
			Tag = tag;

			if (String.IsNullOrWhiteSpace(name))
				Name = Tag.ToString();
			else
				Name = name;

			if (String.IsNullOrWhiteSpace(keyword))
				Keyword = Name;
			else
				Keyword = keyword;

			ValueMultiplicity = vm;
			ValueRepresentations = vrs;
			IsRetired = retired;
		}
开发者ID:ZeryZhang,项目名称:fo-dicom,代码行数:17,代码来源:DicomDictionaryEntry.cs


示例10: EnumerateBothPublicAndPrivateEntries

    public void EnumerateBothPublicAndPrivateEntries()
    {
      var dict = new DicomDictionary();

      var tag1 = new DicomTag(0x0010, 0x0020);
      var dictEntry1 = new DicomDictionaryEntry(tag1, "TestPublicTagName", "TestPublicTagKeyword", DicomVM.VM_1, false, DicomVR.DT);
      var privCreatorDictEntry = new DicomDictionaryEntry(new DicomTag(0x0011, 0x0010), "Private Creator", "PrivateCreator", DicomVM.VM_1, false, DicomVR.LO);
      dict.Add(privCreatorDictEntry);

      DicomPrivateCreator privateCreator = dict.GetPrivateCreator("TESTCREATOR");
      DicomDictionary privDict = dict[privateCreator];

      var dictEntry2 = new DicomDictionaryEntry(DicomMaskedTag.Parse("0011", "xx10"), "TestPrivTagName", "TestPrivTagKeyword", DicomVM.VM_1, false, DicomVR.DT);

      privDict.Add(dictEntry2);
      dict.Add(dictEntry1);

      Assert.True(dict.Contains(dictEntry1));
      Assert.True(dict.Contains(privCreatorDictEntry));
      Assert.True(dict[dictEntry2.Tag.PrivateCreator].Contains(dictEntry2));
      Assert.True(dict.PrivateCreators.Any(pc => dict[pc].Contains(dictEntry2)));
    }
开发者ID:raysearchlabs,项目名称:fo-dicom,代码行数:22,代码来源:DicomDictionaryTest.cs


示例11: EndsWithDicomMatchRule

		public EndsWithDicomMatchRule(DicomTag tag, string value) {
			_tag = tag;
			_value = value;
		}
开发者ID:vvboborykin,项目名称:DicomStorage,代码行数:4,代码来源:DicomMatchRules.cs


示例12: IsEmptyDicomMatchRule

		public IsEmptyDicomMatchRule(DicomTag tag) {
			_tag = tag;
		}
开发者ID:vvboborykin,项目名称:DicomStorage,代码行数:3,代码来源:DicomMatchRules.cs


示例13: EqualsDicomMatchRule

		public EqualsDicomMatchRule(DicomTag tag, string value) {
			_tag = tag;
			_value = value;
		}
开发者ID:vvboborykin,项目名称:DicomStorage,代码行数:4,代码来源:DicomMatchRules.cs


示例14: AppendDicomTransformRule

		public AppendDicomTransformRule(DicomTag tag, string append) {
			_tag = tag;
			_append = append;
		}
开发者ID:ZeryZhang,项目名称:fo-dicom,代码行数:4,代码来源:DicomTransformRules.cs


示例15: ExistsDicomMatchRule

		public ExistsDicomMatchRule(DicomTag tag) {
			_tag = tag;
		}
开发者ID:vvboborykin,项目名称:DicomStorage,代码行数:3,代码来源:DicomMatchRules.cs


示例16: ToLowerDicomTransformRule

		public ToLowerDicomTransformRule(DicomTag tag) {
			_tag = tag;
		}
开发者ID:ZeryZhang,项目名称:fo-dicom,代码行数:3,代码来源:DicomTransformRules.cs


示例17: TrimStringDicomTransformRule

		public TrimStringDicomTransformRule(DicomTag tag, DicomTrimPosition position, string trim) {
			_tag = tag;
			_trim = trim;
			_position = position;
		}
开发者ID:ZeryZhang,项目名称:fo-dicom,代码行数:5,代码来源:DicomTransformRules.cs


示例18: ContainsDicomMatchRule

		public ContainsDicomMatchRule(DicomTag tag, string value) {
			_tag = tag;
			_value = value;
		}
开发者ID:vvboborykin,项目名称:DicomStorage,代码行数:4,代码来源:DicomMatchRules.cs


示例19: RegexDicomMatchRule

		public RegexDicomMatchRule(DicomTag tag, string pattern) {
			_tag = tag;
			_pattern = pattern;
			_regex = new Regex(_pattern);
		}
开发者ID:vvboborykin,项目名称:DicomStorage,代码行数:5,代码来源:DicomMatchRules.cs


示例20: TrimCharactersDicomTransformRule

		public TrimCharactersDicomTransformRule(DicomTag tag, DicomTrimPosition position, char[] trim) {
			_tag = tag;
			_trim = trim;
			_position = position;
		}
开发者ID:ZeryZhang,项目名称:fo-dicom,代码行数:5,代码来源:DicomTransformRules.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Data.DcmDataset类代码示例发布时间:2022-05-24
下一篇:
C# EF.DeviceHiveContext类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap