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


C# DicomDataset.CopyTo方法代码示例

本文整理汇总了C#中DicomDataset.CopyTo方法的典型用法代码示例。如果您正苦于以下问题:C# DicomDataset.CopyTo方法的具体用法?C# DicomDataset.CopyTo怎么用?C# DicomDataset.CopyTo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DicomDataset的用法示例。


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

示例1: Transform

		public void Transform(DicomDataset dataset, DicomDataset modifiedAttributesSequenceItem = null) {
			var remove = dataset.EnumerateMasked(_mask).Select(x => x.Tag).ToList();
			foreach (DicomTag tag in remove) {
				dataset.CopyTo(modifiedAttributesSequenceItem, tag);
				dataset.Remove(tag);
			}
		}
开发者ID:ZeryZhang,项目名称:fo-dicom,代码行数:7,代码来源:DicomTransformRules.cs

示例2: PresentationLut

 public PresentationLut(DicomUID sopInstance, DicomDataset dataset)
 {
     if (dataset == null)
     {
         throw new ArgumentNullException("dataset");
     }
     dataset.CopyTo(this);
 }
开发者ID:GMZ,项目名称:fo-dicom,代码行数:8,代码来源:PresentationLut.cs

示例3: FilmSession

        /// <summary>
        /// Construct new film session for specified SOP instance UID
        /// </summary>
        /// <param name="sopInstance">Film session SOP instance UID</param>
        /// <param name="dataset">Film session dataset</param>
        public FilmSession(DicomUID sopClassUID, DicomUID sopInstance, DicomDataset dataset, bool isColor = false)
            : this(sopClassUID, sopInstance)
        {
            if (dataset == null)
            {
                throw new ArgumentNullException("dataset");
            }
            dataset.CopyTo(this);

            this.InternalTransferSyntax = dataset.InternalTransferSyntax;
            IsColor = isColor;
        }
开发者ID:GMZ,项目名称:fo-dicom,代码行数:17,代码来源:FilmSession.cs

示例4: Transform

        public void Transform(DicomDataset dataset, DicomDataset modifiedAttributesSequenceItem = null)
        {
            IDbConnection connection = null;

            try
            {
                if (_dbType == DatabaseType.Odbc) connection = new OdbcConnection(_connectionString);
                else if (_dbType == DatabaseType.MsSql) connection = new SqlConnection(_connectionString);

                using (IDbCommand command = connection.CreateCommand())
                {
                    command.Connection = connection;
                    command.CommandText = _query;

                    for (int i = 0; i < _params.Count; i++)
                    {
                        var str = dataset.Get<string>(_params[i], -1, String.Empty);
                        SqlParameter prm = new SqlParameter(String.Format("@{0}", i), str);
                        command.Parameters.Add(prm);
                    }

                    connection.Open();

                    if (_output.Count == 0)
                    {
                        command.ExecuteNonQuery();
                    }
                    else
                    {
                        using (IDataReader reader = command.ExecuteReader())
                        {
                            if (reader.Read())
                            {
                                for (int i = 0; i < _output.Count; i++)
                                {
                                    dataset.CopyTo(modifiedAttributesSequenceItem, _output[i]);
                                    string str = reader.GetString(i);
                                    dataset.Add(_output[i], str);
                                }
                            }
                        }
                    }

                    connection.Close();

                    connection = null;
                }
            }
            finally
            {
                if (connection != null)
                {
                    if (connection.State == ConnectionState.Closed || connection.State == ConnectionState.Broken) connection.Close();
                    connection.Dispose();
                }
            }
        }
开发者ID:GMZ,项目名称:fo-dicom,代码行数:57,代码来源:DatabaseQueryTransformRule.cs

示例5: FilmBox

 public FilmBox(FilmSession filmSession, DicomUID sopInstance, DicomDataset dataset)
     : this(filmSession, sopInstance, dataset.InternalTransferSyntax)
 {
     dataset.CopyTo(this);
     this.InternalTransferSyntax = dataset.InternalTransferSyntax;
 }
开发者ID:aerik,项目名称:fo-dicom,代码行数:6,代码来源:FilmBox.cs


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