本文整理汇总了C#中StudyXml.Select方法的典型用法代码示例。如果您正苦于以下问题:C# StudyXml.Select方法的具体用法?C# StudyXml.Select怎么用?C# StudyXml.Select使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StudyXml
的用法示例。
在下文中一共展示了StudyXml.Select方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Update
//.........这里部分代码省略.........
StudyDateRaw = attribute.ToString();
StudyDate = DateParser.Parse(StudyDateRaw);
attribute = dataSet[DicomTags.StudyTime];
StudyTimeRaw = attribute.ToString();
time = TimeParser.Parse(StudyTimeRaw);
if (time.HasValue)
StudyTimeTicks = time.Value.TimeOfDay.Ticks;
else
StudyTimeTicks = null;
if (dataSet.Contains(DicomTags.ProcedureCodeSequence))
{
attribute = dataSet[DicomTags.ProcedureCodeSequence];
if (!attribute.IsEmpty && !attribute.IsNull)
{
DicomSequenceItem sequence = ((DicomSequenceItem[])attribute.Values)[0];
ProcedureCodeSequenceCodeValue = sequence[DicomTags.CodeValue].ToString();
ProcedureCodeSequenceCodingSchemeDesignator = sequence[DicomTags.CodingSchemeDesignator].ToString();
}
}
attribute = dataSet[DicomTags.PatientSpeciesDescription];
PatientSpeciesDescription = attribute.ToString();
if (dataSet.Contains(DicomTags.PatientSpeciesCodeSequence))
{
attribute = dataSet[DicomTags.PatientSpeciesCodeSequence];
if (!attribute.IsEmpty && !attribute.IsNull)
{
DicomSequenceItem sequence = ((DicomSequenceItem[])attribute.Values)[0];
PatientSpeciesCodeSequenceCodingSchemeDesignator = sequence[DicomTags.CodingSchemeDesignator].ToString();
PatientSpeciesCodeSequenceCodeValue = sequence[DicomTags.CodeValue].ToString();
PatientSpeciesCodeSequenceCodeMeaning = sequence[DicomTags.CodeMeaning].ToString();
}
}
attribute = dataSet[DicomTags.PatientBreedDescription];
PatientBreedDescription = attribute.ToString();
if (dataSet.Contains(DicomTags.PatientBreedCodeSequence))
{
attribute = dataSet[DicomTags.PatientBreedCodeSequence];
if (!attribute.IsEmpty && !attribute.IsNull)
{
DicomSequenceItem sequence = ((DicomSequenceItem[])attribute.Values)[0];
PatientBreedCodeSequenceCodingSchemeDesignator = sequence[DicomTags.CodingSchemeDesignator].ToString();
PatientBreedCodeSequenceCodeValue = sequence[DicomTags.CodeValue].ToString();
PatientBreedCodeSequenceCodeMeaning = sequence[DicomTags.CodeMeaning].ToString();
}
}
attribute = dataSet[DicomTags.ResponsiblePerson];
ResponsiblePerson = new PersonName(attribute.ToString());
attribute = dataSet[DicomTags.ResponsiblePersonRole];
ResponsiblePersonRole = attribute.ToString();
attribute = dataSet[DicomTags.ResponsibleOrganization];
ResponsibleOrganization = attribute.ToString();
attribute = dataSet[DicomTags.SpecificCharacterSet];
SpecificCharacterSet = attribute.ToString();
var modalities = _studyXml
.Select(s => s.First()[DicomTags.Modality].GetString(0, null))
.Where(value => !String.IsNullOrEmpty(value)).Distinct();
ModalitiesInStudy = DicomStringHelper.GetDicomStringArray(modalities);
var stationNames = _studyXml
.Select(s => s.First()[DicomTags.StationName].GetString(0, null))
.Where(value => !String.IsNullOrEmpty(value)).Distinct();
StationNamesInStudy = DicomStringHelper.GetDicomStringArray(stationNames);
var institutionNames = _studyXml
.Select(s => s.First()[DicomTags.InstitutionName].GetString(0, null))
.Where(value => !String.IsNullOrEmpty(value)).Distinct();
InstitutionNamesInStudy = DicomStringHelper.GetDicomStringArray(institutionNames);
var sopClasses = (from series in _studyXml
from instance in series
where instance.SopClass != null
select instance.SopClass.Uid).Distinct();
SopClassesInStudy = DicomStringHelper.GetDicomStringArray(sopClasses);
#region Meta Info
var sourceAEs = (from series in _studyXml
from instance in series
where !String.IsNullOrEmpty(instance.SourceAETitle)
select instance.SourceAETitle).Distinct();
SourceAETitlesInStudy = DicomStringHelper.GetDicomStringArray(sourceAEs);
#endregion
//these have to be here, rather than in Initialize b/c they are
// computed from the series, which are parsed from the xml.
NumberOfStudyRelatedSeries = _studyXml.NumberOfStudyRelatedSeries;
NumberOfStudyRelatedInstances = _studyXml.NumberOfStudyRelatedInstances;
}