本文整理汇总了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);
}
}
示例2: PresentationLut
public PresentationLut(DicomUID sopInstance, DicomDataset dataset)
{
if (dataset == null)
{
throw new ArgumentNullException("dataset");
}
dataset.CopyTo(this);
}
示例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;
}
示例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();
}
}
}
示例5: FilmBox
public FilmBox(FilmSession filmSession, DicomUID sopInstance, DicomDataset dataset)
: this(filmSession, sopInstance, dataset.InternalTransferSyntax)
{
dataset.CopyTo(this);
this.InternalTransferSyntax = dataset.InternalTransferSyntax;
}