private void FindSOPInstances(DicomAssociation association, PatientInfo patient, StudyInfo study, List <SOPInstanceIdentifier> sopInstanceIdentifiers) { var seriesSearchKey = new SeriesIdentifier(patient.PatientID, study.StudyInstanceUID); var seriesList = PerformCFind <SeriesIdentifier, SeriesInfo>(association, seriesSearchKey); foreach (var series in seriesList) { Console.WriteLine($">> Series: {series.Modality} {series.SeriesTime} '{series.SeriesDescription}' {series.NumberOfSeriesRelatedInstances}"); FindSOPInstances(association, patient, study, series, sopInstanceIdentifiers); } }
private void FindSOPInstances(DicomAssociation association, PatientInfo patient, StudyInfo study, SeriesInfo series, List <SOPInstanceIdentifier> sopInstanceIdentifiers) { var sopInstanceSearchKey = new SOPInstanceIdentifier(patient.PatientID, study.StudyInstanceUID, series.SeriesInstanceUID); var sopInstanceList = PerformCFind <SOPInstanceIdentifier, SOPInstanceInfo>(association, sopInstanceSearchKey); foreach (var sopInstance in sopInstanceList) { sopInstanceIdentifiers.Add(new SOPInstanceIdentifier(patient.PatientID, study.StudyInstanceUID, series.SeriesInstanceUID) { SOPClassUID = sopInstance.SOPClassUID, SOPInstanceUID = sopInstance.SOPInstanceUID }); var sopClass = (DicomUID)sopInstance.SOPClassUID; Console.WriteLine($">>> SOP Instance: {sopClass} ({sopInstance.SOPInstanceUID})"); } }